<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi,<div><br></div><div>Thanks. This is good for Calling Card type IVR application but I am using it for my SIP UA for authorization only where authorization is required when I make a call from extension 1000. 1000 is a registered user in billing. Can you please provide a simple example with this ANI Authorization scenerio. Also I am getting the following in debug which means radius response values are not being populated in credit_amount, credit_time and return_code attributes. Please help me. </div><div><br></div><div><div>2010-11-04 18:09:53.396212 [DEBUG] mod_rad_auth.c:491 sending radius packet ...</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:497 RADIUS Authentication OK</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: BILING_MODEL</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 109, pec:9, (BILING_MODEL)</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_AMOUNT</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 101, pec:9, (CREDIT_AMOUNT)</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CURRENCY</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 110, pec:9, (CURRENCY)</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: PREFFERED_LANG</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 107, pec:9, (PREFFERED_LANG)</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: CREDIT_TIME</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 102, pec:9, (CREDIT_TIME)</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: H323-IVR-IN:DIRATION</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 1, pec:9, (H323-IVR-IN:DIRATION)</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:519 Handle attribute: RADIUS_RETURN_CODE</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_rad_auth.c:529 No found out attribute id: 103, pec:9, (RADIUS_RETURN_CODE)</div><div>EXECUTE sofia/internal/1000@192.168.0.100 set(execute_on_answer=sched_hangup + /> <action application=)</div><div>2010-11-04 18:09:54.571999 [DEBUG] mod_dptools.c:816 sofia/internal/1000@192.168.0.100 SET [execute_on_answer]=[sched_hangup + /> <action application=]</div><div>EXECUTE sofia/internal/1000@192.168.0.100 log(INFO biling_model=)</div><div>2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 biling_model=</div><div>EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_amount=)</div><div>2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_amount=</div><div>EXECUTE sofia/internal/1000@192.168.0.100 log(INFO currency=)</div><div>2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 currency=</div><div>EXECUTE sofia/internal/1000@192.168.0.100 log(INFO preffered_lang=)</div><div>2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 preffered_lang=</div><div>EXECUTE sofia/internal/1000@192.168.0.100 log(INFO credit_time=)</div><div>2010-11-04 18:09:54.571999 [INFO] mod_dptools.c:946 credit_time=</div><div><br></div><br><hr id="stopSpelling">Date: Thu, 4 Nov 2010 00:10:28 +0100<br>From: tculjaga@gmail.com<br>To: freeswitch-users@lists.freeswitch.org<br>Subject: Re: [Freeswitch-users] Radius AAA<br><br>hello, <br><br>auth_function application returns a "OK" or "NOK" result in a channel variable (in this example ANI_AUTH_RESULT). You need to evaluate the result and act accordingly.<br><br>here is some example (part of my IVR) that checks the user's ANI id if its known to the billing just prompts for destination number if not, prompts for PIN.<br>
<br><br> <extension name="ANIorPIN"><br> <condition field="destination_number" expression="^ANIorPIN$"><br> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/><br>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${caller_id_number}, in 1234, out ANI_AUTH_RESULT"/><br> <action application="execute_extension" data="CheckANI XML NXIVR"/><br>
</condition><br> </extension><br><br><br> <extension name="CheckANI"><br> <condition field="destination_number" expression="^CheckANI$"/><br> <condition field="${ANI_AUTH_RESULT}" expression="^NOK$"><br>
<action application="log" data="INFO ################# UNKNOWN ANI, go to ENTER PIN ################\n"/><br> <action application="execute_extension" data="EnterPIN XML NXIVR"/><br>
<br> <action application="log" data="INFO ################# I KNOW WHO YOU ARE go to get destination number ################\n"/><br> <anti-action inline="true" application="export" data="UNAME=${caller_id_number}"/><br>
<anti-action inline="true" application="export" data="PASSWD=1234"/><br> <anti-action application="execute_extension" data="GetDstNum XML NXIVR"/><br>
</condition><br> </extension><br><br><br> <extension name="EnterPIN"><br> <condition field="destination_number" expression="^EnterPIN$"><br> <action application="set" data="playback_delimiter=!"/><br>
<action application="set" data="playback_terminators=#*0123456789"/><br> <action application="read" data="${PIN_MIN_DIG} ${PIN_MAX_DIG} ${PIN_ERR_PR}!${CARD_NUMBER_PR} PIN ${PIN_TIMEOUT} *"/><br>
<action application="set" data="credit_amount=h323-credit-amount=0"/><br> <action inline="true" application="set" data="PIN_RETRIES=${expr(${PIN_RETRIES}+1)}"/><br>
<action application="execute_extension" data="ParsePIN XML NXIVR"/><br><br> <action application="log" data="INFO PIN=${PIN}"/><br> <action application="log" data="INFO UNAME=${UNAME}"/><br>
<action application="log" data="INFO PASSWD=${PASSWD}"/><br><br> <action inline="true" application="export" data="DIALED_NUMBER="""/><br>
<br> <action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/><br> <action application="set" data="auto_hunt=true"/><br>
<action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/><br> <action application="execute_extension" data="CheckPIN XML NXIVR"/><br> </condition><br>
</extension><br><br><br> <extension name="GetDstNum"><br> <condition field="destination_number" expression="^GetDstNum$"><br> <action application="set" data="bind_meta_key=#"/><br>
<action application="bind_meta_app" data="0 a a transfer::LongDTMF XML NXIVR"/><br><br> <action application="set" data="playback_delimiter=!"/><br> <action application="set" data="playback_terminators=#*0123456789"/><br>
<action application="read" data="${DST_MIN_DIG} ${DST_MAX_DIG} ${DST_ERR_PR}!${ENTER_DEST_PR} DN ${DST_TIMEOUT} *"/><br> <action application="execute_extension" data="TranslateLocal XML NXIVR"/><br>
<action inline="true" application="set" data="DST_RETRIES=${expr(${DST_RETRIES}+1)}"/><br> <action application="execute_extension" data="ParseDN XML NXIVR"/><br>
<action application="auth_function" data="in ${DIALED_NUMBER}, in ${UNAME}, in ${PASSWD}, out AUTH_RESULT"/><br> <action application="set" data="CALLINGNUMBER=${caller_id_number}"/><br>
<action application="execute_extension" data="PARSE_RET_CODE XML NXIVR"/><br> <action application="execute_extension" data="CheckDstNum XML NXIVR"/><br> </condition><br>
</extension><br><br><br><br><br><br><br><br><br><br><br><br>
<br>_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org</div>                                            </body>
</html>