[Freeswitch-users] Radius AAA
Abid Saleem
abid_freeswitch at live.com
Tue Nov 2 06:33:31 PDT 2010
Hi,
Any help on the below please. I think FS is not getting any values in the variables like credit_amount and credit_time etc as I can see the following in level 7 debug.
2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:0, (billing_model)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: credit_amount2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:0, (credit_amount)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:0, (PREFFERED_LANG)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: credit_time2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:0, (credit_time)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:0, (H323-IVR-IN:DIRATION)2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:519 Handle attribute: radius_return_code2010-11-02 18:12:01.722180 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:0, (radius_return_code)EXECUTE sofia/internal/1000 at 192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=)2010-11-02 18:12:01.722180 [DEBUG] mod_dptools.c:816 sofia/internal/1000 at 192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=]EXECUTE sofia/internal/1000 at 192.168.0.100 log(INFO billing_model=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 billing_model=EXECUTE sofia/internal/1000 at 192.168.0.100 log(INFO credit_amount=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 credit_amount=EXECUTE sofia/internal/1000 at 192.168.0.100 log(INFO currency=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 currency=EXECUTE sofia/internal/1000 at 192.168.0.100 log(INFO preffered_lang=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 preffered_lang=EXECUTE sofia/internal/1000 at 192.168.0.100 log(INFO credit_time=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 credit_time=EXECUTE sofia/internal/1000 at 192.168.0.100 log(INFO h323_ivr_duration=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 h323_ivr_duration=EXECUTE sofia/internal/1000 at 192.168.0.100 log(INFO return_code=)2010-11-02 18:12:01.722180 [INFO] mod_dptools.c:946 return_code=EXECUTE sofia/internal/1000 at 192.168.0.100 bind_meta_app(1 b s execute_extension::dx XML features)
From: abid_freeswitch at live.com
To: freeswitch-users at lists.freeswitch.org
Subject: RE: [Freeswitch-users] Radius AAA
Date: Mon, 1 Nov 2010 19:09:33 +0500
Dear Tihomir,
Thanks for your email. Well I was able to load and test the module. It is sending the access request to Radius successfully but module is not caring about any Radius return code. It just routes the call whatever the response code is. For example when I call with an unauthenticated user and Radius returns return code =2, it still routes the call. Where and how can I define the actions based on appropriate return codes from Radius. Any examples are appreciated
ALso when try to use the following config to auto hangup the call according to returned credit time, it just does not allow the call at all.
Below is my dialplan/default.xml config file entry. Please help.
<context name="default"> <extension name="Local_Extension"> <condition field="destination_number" expression="^(10[01][0-9])$"> <action application="set" data="dialed_extension=$1"/> <action application="export" data="dialed_extension=$1"/> <action application="log" data="INFO Before Auth "/>
<action inline="true" application="set" data="CALLID=h323-conf-id=${uuid}"/> <action inline="true" application="set" data="SERVICENUM=h323-prompt-id=${destination_number}"/> <action inline="true" application="set" data="TRANSACTIONID=h323-ivr-out=transactionID:1234"/> <!-- <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> --> <action inline="true" application="set" data="CALLINGNUMBER=${caller_id_number}"/> <!--action inline="true" application="set" data="USERNAME="/--> <!-- <action inline="true" application="set" data="USERNAME=209354"/> --> <action inline="true" application="set" data="PASSWD="/> <action inline="true" application="set" data="DIALED_NUMBER=${destination_number}"/>
<action application="sleep" data="2000"/> <action application="auth_function" data="in ${destination_number}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/>
<action application="log" data="INFO AUTH_RESULT=${AUTH_RESULT}"/> <action application="log" data="INFO billing_model=${billing_model}"/> <action application="log" data="INFO credit_amount=${credit_amount}"/> <action application="log" data="INFO currency=${currency}"/> <action application="log" data="INFO preffered_lang=${preffered_lang}"/> <action application="log" data="INFO credit_time=${credit_time}"/> <action application="log" data="INFO h323_ivr_duration=${h323_ivr_duration}"/> <action application="log" data="INFO return_code=${return_code}"/> <!--action application="sched_hangup" data="+${credit_time:17:-1} ${Core-UUID}"/>--> <!--action application="execute_extension" data="AUTH XML default"/>--> <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> --> <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/> <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/> <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/> <action application="set" data="ringback=${us-ring}"/> <action application="set" data="transfer_ringback=$${hold_music}"/> <action application="set" data="call_timeout=30"/> <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> --> <action application="set" data="hangup_after_bridge=true"/> <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> --> <action application="set" data="continue_on_fail=true"/> <action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/> <action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/> <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/> <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>--> <action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/> <action application="bridge" data="user/${dialed_extension}@${domain_name}"/> <action application="answer"/> <action application="sleep" data="1000"/> <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/> </condition> </extension>
Best Regards----------------Abid Saleem
Date: Mon, 25 Oct 2010 12:28:49 +0200
From: tculjaga at gmail.com
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] Radius AAA
On Sun, Oct 24, 2010 at 10:44 PM, Nazim Aghabayov <nazim.aghabayov at gmail.com> wrote:
Hi! Could yu please check if module is actually loaded?
freeswitch at internal> module_exists mod_rad_auth
true
What do you mean by: "it is not being called at all" ?
Does it throw an error or what?
also, please can you paste your config (dialplan/rad_auth.conf) and yur lvl7 debug here ?
if its too large use pastebin.
T.
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20101102/7657973f/attachment-0001.html
More information about the FreeSWITCH-users
mailing list