CW Radius for Asterisk

Overview



We can bring good news for everyone who interested in CW RADIUS for Asterisk, which allows to integrate any billing software with Asterisk open source PBX, we pleased to announce release of RADIUS that works and provides compatability with many billing software (i.e IBSng free version, Mind CTI.)

Taking into account flexibility and fast development of Asterisk, this software in combination with prepaid and postpaid billing software, becomes powerful platform for Calling card and VoIP providers as well as businesses that want to track phone calls and time spent on each call. We welcome billing providers for cooperation in futher development of CW RADIUS. If you have any questions do not hesitate and visit our web site.

You CAN



Authentication:


  • authenticate users via RADIUS protocol
  • use global RADIUS server settings and individual RADIUS server settings for different extensions
  • authenticate by general "account + password", which can mean anything depending on the service you are willing to implement i.e. ANI authorization, prepaid cards...
  • authenticate SIP,IAX,ZAP,H323,MGCP users via RADIUS (secure, pass Digest over RADIUS)
  • if "credit time" is provided in radius reply, then call timer will be set and asterisk will disconnect call automatically, or
  • you can process RADIUS reply attributes in extensions.conf in order to create IVR response, or use responses that comes with Asterisk, see examples below.
  • accept and decrypt routing information from billing software , then you can pass resulting string directly to Dial application using this feature you can dial multiply SIP,IAX,ZAP,H323,MGCP destinations using different user/pass pairs ! (requires path to Dial application)


Accounting:

  • generate Stop RADIUS records for incoming and outgoing call legs


You CAN NOT:


Accounting:

  • generate Start or Alive records, which is doable easily for connected calls, but
  • you can not generate Start - Stop records for failed calls, so you can not monitor your asterisk configuration failures via RADIUS. For instance you may have a dozen of call attempts on some channel failed due to some configuration error. This is limitation of Asterisk architecture and needs some serious work.


Description
Module: aaa_ibsng_r.so


Description: Contains the billing functions for IBSng billing system. The module emulates the GNUGK� RADIUS interface to IBSng billing system. Tested with IBSng free version A1.13
Application: aaa_Authorize(UserID[@Password])

Type: IVR application

Description: Authorization by UserID & Password

Return values:



Variable Value Comments

aaa_Result 0 Authorized successfully

aaa_Result 1 Failed


Application: aaa_Resolve(UserID@Password/Destination)

Type: IVR application

Description: Authorization by UserID & Password plus Checks if Destination authorized to call. The Application sends CALL START message to billing if the call authorized successfully.

Return values:

Variable Value Comments

aaa_Result 0 Authorized successfully
aaa_Result 1 Failed
aaa_Credit_Time1 N.NN H323-credit-time. The max time allowed to talk in seconds
aaa_Return_Code N H323-return-code








Application: CDR COLLECTOR

Type: Background process

Description: Sends CALL STOP message to the Billing if call has the ACCOUNTCODE defined.



Configuration examples:
Example 1: Preauthentificated customers
aaa_ibsng.conf

[general]
radserver=127.0.0.1
radsecret=asterisk
NAS=127.0.0.1
authport=1812
acctport=1813


sip.conf

[123456789]
type=friend
username=123456789
accountcode=123456789
secret=1234
context=prepaid_preauth


extensions.conf

[prepaid_preauth]
exten => _X.,1,SetVar(DST_CTX=@prepaid_outbound)
exten => _X.,2,SetVar(UserID=${ACCOUNTCODE})
; Password in billing should be same for all customers
exten => _X.,3,SetVar(UserPass=1122334455)
exten => _X.,4,Answer
exten => _X.,5,NoCDR()
exten => _X.,6,Goto(40)
exten => _X.,40,aaa_Resolve(${UserID}@${UserPass}/${EXTEN})
exten => _X.,41,GotoIf($[${aaa_Result} > 0]?50)
exten => _X.,42,Dial(Local/${MACRO_EXTEN}${DST_CTX})
exten => _X.,43,Goto(500)
exten => _X.,50,Macro(Say_Resolve_Error)
exten => _X.,51,Goto(500)
exten => _X.,500,Playback(goodbye)
exten => _X.,503,Hangup


Example 2: Debit cards
aaa_ibsng.conf

[general]
radserver=127.0.0.1
radsecret=asterisk
NAS=127.0.0.1
authport=1812
acctport=1813


extensions.conf

[prepaid_cards]
exten => *0,1,SetVar(UserIDLen=8)
exten => *0,2,SetVar(UserPassLen=6)
exten => *0,3,NoCDR()
exten => *0,4,Answer
exten => *0,5,Goto(10)
exten => *0,10,Playback(please-enter-your)
exten => *0,11,Read(UserID,card-number,${UserIDLen})
exten => *0,12,Read(UserPass,,${UserPassLen})
exten => *0,13,aaa_Authorize(${UserID}@${UserPass})
exten => *0,14,GotoIf($[${aaa_Result} = 0]?30)
exten => *0,15,Goto(20)
exten => *0,20,Playback(card-number-invalid)
exten => *0,21,Goto(10)
exten => *0,30,Read(Destination,telephone-number)
exten => *0,31,GotoIf($["${Destination}" != ""]?40)
exten => *0,32,Goto(30)
exten => *0,40,aaa_Resolve(${UserID}@${UserPass}/${Destination})
exten => *0,41,GotoIf($[${aaa_Result} > 0]?50)
exten => *0,42,Dial(Local/${Destination}${DST_CTX})
exten => *0,43,Goto(500)
exten => *0,50,Macro(Say_Resolve_Error)
exten => *0,51,Goto(500)
exten => *0,500,Playback(goodbye)
exten => *0,501,Hangup

Overview



We can bring good news for everyone who interested in CW RADIUS for Asterisk, which allows to integrate any billing software with Asterisk open source PBX, we pleased to announce release of RADIUS that works and provides compatability with many billing software (i.e IBSng free version, Mind CTI.)

Taking into account flexibility and fast development of Asterisk, this software in combination with prepaid and postpaid billing software, becomes powerful platform for Calling card and VoIP providers as well as businesses that want to track phone calls and time spent on each call. We welcome billing providers for cooperation in futher development of CW RADIUS. If you have any questions do not hesitate and visit our web site.

You CAN



Authentication:


  • authenticate users via RADIUS protocol
  • use global RADIUS server settings and individual RADIUS server settings for different extensions
  • authenticate by general "account + password", which can mean anything depending on the service you are willing to implement i.e. ANI authorization, prepaid cards...
  • authenticate SIP,IAX,ZAP,H323,MGCP users via RADIUS (secure, pass Digest over RADIUS)
  • if "credit time" is provided in radius reply, then call timer will be set and asterisk will disconnect call automatically, or
  • you can process RADIUS reply attributes in extensions.conf in order to create IVR response, or use responses that comes with Asterisk, see examples below.
  • accept and decrypt routing information from billing software , then you can pass resulting string directly to Dial application using this feature you can dial multiply SIP,IAX,ZAP,H323,MGCP destinations using different user/pass pairs ! (requires path to Dial application)


Accounting:

  • generate Stop RADIUS records for incoming and outgoing call legs


You CAN NOT:


Accounting:

  • generate Start or Alive records, which is doable easily for connected calls, but
  • you can not generate Start - Stop records for failed calls, so you can not monitor your asterisk configuration failures via RADIUS. For instance you may have a dozen of call attempts on some channel failed due to some configuration error. This is limitation of Asterisk architecture and needs some serious work.


Description
Module: aaa_ibsng_r.so


Description: Contains the billing functions for IBSng billing system. The module emulates the GNUGK� RADIUS interface to IBSng billing system. Tested with IBSng free version A1.13
Application: aaa_Authorize(UserID[@Password])

Type: IVR application

Description: Authorization by UserID & Password

Return values:



Variable Value Comments

aaa_Result 0 Authorized successfully

aaa_Result 1 Failed


Application: aaa_Resolve(UserID@Password/Destination)

Type: IVR application

Description: Authorization by UserID & Password plus Checks if Destination authorized to call. The Application sends CALL START message to billing if the call authorized successfully.

Return values:

Variable Value Comments

aaa_Result 0 Authorized successfully
aaa_Result 1 Failed
aaa_Credit_Time1 N.NN H323-credit-time. The max time allowed to talk in seconds
aaa_Return_Code N H323-return-code








Application: CDR COLLECTOR

Type: Background process

Description: Sends CALL STOP message to the Billing if call has the ACCOUNTCODE defined.



Configuration examples:
Example 1: Preauthentificated customers
aaa_ibsng.conf

[general]
radserver=127.0.0.1
radsecret=asterisk
NAS=127.0.0.1
authport=1812
acctport=1813


sip.conf

[123456789]
type=friend
username=123456789
accountcode=123456789
secret=1234
context=prepaid_preauth


extensions.conf

[prepaid_preauth]
exten => _X.,1,SetVar(DST_CTX=@prepaid_outbound)
exten => _X.,2,SetVar(UserID=${ACCOUNTCODE})
; Password in billing should be same for all customers
exten => _X.,3,SetVar(UserPass=1122334455)
exten => _X.,4,Answer
exten => _X.,5,NoCDR()
exten => _X.,6,Goto(40)
exten => _X.,40,aaa_Resolve(${UserID}@${UserPass}/${EXTEN})
exten => _X.,41,GotoIf($[${aaa_Result} > 0]?50)
exten => _X.,42,Dial(Local/${MACRO_EXTEN}${DST_CTX})
exten => _X.,43,Goto(500)
exten => _X.,50,Macro(Say_Resolve_Error)
exten => _X.,51,Goto(500)
exten => _X.,500,Playback(goodbye)
exten => _X.,503,Hangup


Example 2: Debit cards
aaa_ibsng.conf

[general]
radserver=127.0.0.1
radsecret=asterisk
NAS=127.0.0.1
authport=1812
acctport=1813


extensions.conf

[prepaid_cards]
exten => *0,1,SetVar(UserIDLen=8)
exten => *0,2,SetVar(UserPassLen=6)
exten => *0,3,NoCDR()
exten => *0,4,Answer
exten => *0,5,Goto(10)
exten => *0,10,Playback(please-enter-your)
exten => *0,11,Read(UserID,card-number,${UserIDLen})
exten => *0,12,Read(UserPass,,${UserPassLen})
exten => *0,13,aaa_Authorize(${UserID}@${UserPass})
exten => *0,14,GotoIf($[${aaa_Result} = 0]?30)
exten => *0,15,Goto(20)
exten => *0,20,Playback(card-number-invalid)
exten => *0,21,Goto(10)
exten => *0,30,Read(Destination,telephone-number)
exten => *0,31,GotoIf($["${Destination}" != ""]?40)
exten => *0,32,Goto(30)
exten => *0,40,aaa_Resolve(${UserID}@${UserPass}/${Destination})
exten => *0,41,GotoIf($[${aaa_Result} > 0]?50)
exten => *0,42,Dial(Local/${Destination}${DST_CTX})
exten => *0,43,Goto(500)
exten => *0,50,Macro(Say_Resolve_Error)
exten => *0,51,Goto(500)
exten => *0,500,Playback(goodbye)
exten => *0,501,Hangup

Created by: comwealth, Last modification: Mon 11 of Jun, 2012 (04:15 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+