Introduction
As a courtesy contribution to the Asterisk community PortaOne has created a general public license client that brings RADIUS AAA capabilities to Asterisk PBX. This piece of software is entirely written in Perl. Therefore, it is 100% portable and easy to understand and customize. RADIUS attributes are used according to Cisco VSA Voice Implementation Guide which provides compatibility with billing platforms, including PowerRadius.
Features
The client allows implementing numerous authentications and accounting features, including:
* Users’ authentication via RADIUS protocol
* Use of global RADIUS server settings and individual RADIUS server settings for different extensions
* Authentication by general “account + password”, which can mean anything depending on the service you are willing to implement i.e. ANI authorization, prepaid cards, etc.
* Authentication of SIP users via RADIUS (secure, pass Digest over RADIUS)
* Automated disconnect and call timer settings if “credit time” is provided in radius reply
* Processing of RADIUS reply attributes in extensions.conf in order to create IVR response
* Stop RADIUS records generation for incoming and outgoing call legs
* More information about this RADIUS client, its installation and configuration examples can be found on the VoIP Wiki.
Installation
1. Install from CPAN
sudo perl -MCPAN -e shell;
install Config::IniFiles
install Crypt::CBC
install Crypt::DES
install Authen::Radius
2. Install Asterisk::AGI and Asterisk::Manager (unfortunately it is not on CPAN yet!)
3. Include
load => res_agi.so
into Asterisk's modules.conf
4. Copy agi-rad-auth.pl into asterisk's agi directory, usually /usr/local/share/asterisk/agi-bin (defined in asterisk.conf)
5. Edit manager.conf using the example included, settings must correspond to settings in ast-rad-acc.pl
6. Include ast-rad-acc.pl into system startup sequence
7. Edit extensions.conf using example included
8. Make sure that your Asterisk includes all related bug fixes and patches, namely:
- SIPGetHeaders for chan_sip (derived from chan_sip2 )
- Outbound SIP cnannel DNID bug fix
- Outbound Zap cnannel DNID bug fix
- Manager API DNID bug fix
- Dial application patch Dial(SIP/number:secret:authid@host)
- chan_sip externalauth=yes
- Inbounnd ast_set_callerid chan_zap bug fix
- SIP remote ip for manager API
Download
Download asterisk-radius-aaa.tar.gz

