[Asterisk-Users] Asterisk with PortaOne Radius client- problem in accounting script with OH323

Carlos Assaad cassaad at polariscomms.com
Fri Feb 25 07:04:35 MST 2005


Dear all,

I have installed asterisk 1.0.5 on redhat 9  
I have installed also, asterisk-oh323 0.6.5 module (successfully
compiled and installed) 

Now When I am trying to get asterisk communicate with a Radius (in my
case: it's the VoiceMaster Radius) 
I was able to do the following: 
After installing all recommended to download and install radius client
for asterisk 
(http://www.voip-info.org/tiki-index.php?page=PortaOne+Radius+auth ),
but without applying the patches because I wasn't able to apply them on
version 1.0.5
I run ast-rad-acct.pl in the background (successfully)
I run the agi script from within asterisk contexts
I was able to send an Access-Request and to get authenticated by
obtaining a reply from the Radius server. 

What I did NOT succeed to do, is the accounting part of this radius
client.

When trying to do an outgoing call in my following context, I keep
getting the below error from the perl accounting script running in
background: 

Here is the context:
 
[astrad]

exten => 5444,1,SetVar(RADIUS_Server=IP_RADIUS)
exten => 5444,2,SetVar(RADIUS_Secret=Secret_RADIUS)
exten => 5444,3,SetVar(NAS_IP_Address=ASTERISK_IP)
exten => 5444,4,SetAccount(${CALLERIDNUM})
exten =>
5444,5,agi,radauthentic.pl|AuthorizeBy=Account&IfFailed=DoNotHangup; a
copy of agi-rad-auth.pl 
exten =>
5444,6,agi,radauthor.pl|AuthorizeBy=Account&IfFailed=DoNotHangup; a
customized copy of agi-rad-auth.pl
exten => 5444,7,Goto(astrad2,5444,1)

[astrad2]

exten => 5444,1,Read(dest_number,IVR,skip)
exten => 5444,2,Dial(OH323/${dest_number}@Gateway_IP,40)  ; outgoing
call
exten => 5444,3,Hangup

Please find the error below, generated by the perl script ast-rad-acc.pl
without being able to send any packet to Radius after the outgoing call:

Use of uninitialized value in
 concatenation (.) or string at ./ast-rad-acc.pl line 244, <GEN744> line
278.
 
main::send_acc('LINK_END',1109334310,'LINK_START',1109334302,'CALL_END',
1109334310,'ACCOUNT
CODE',9612345678,'CAUSE',...) called at ./ast-rad-acc.pl line 227
 
main::status_callback('Event','Hangup','Channel','OH323/L19615','Cause',
0,'Uniqueid',110933
4287.3) called at /usr/lib/perl5/site_perl/5.8.0/Asterisk/Manager.pm
line 316
 
Asterisk::Manager::eventcallback('Asterisk::Manager=HASH(0x8776868)','Ev
ent','Hangup','Uniq
ueid',1109334287.3,'Channel','OH323/L19615','Cause',0,...) called at
/usr/lib/perl5/site_perl/5.8.0
/Asterisk/Manager.pm line 331
 
Asterisk::Manager::handleevent('Asterisk::Manager=HASH(0x8776868)')
called at /usr/lib/perl
5/site_perl/5.8.0/Asterisk/Manager.pm line 323
 
Asterisk::Manager::eventloop('Asterisk::Manager=HASH(0x8776868)') called
at ./ast-rad-acc.p
l line 113
        eval {...} called at ./ast-rad-acc.pl line 113
...

Although, when limiting my context to an incoming call to asterisk, the
accounting packet is sent successfully to RADIUS.

Is the radius client package works with any type of Channels on asterisk
or just SIP and ZAP as shown in the examples?


I will appreciate it if anyone could help in this matter, or give me a
response.
Thanks in advance,

Carlos.





More information about the asterisk-users mailing list