[Freeswitch-users] mod_rad_auth dial plan condition to match radius result

Joseph Waite joelists at tm.net.uk
Sun Jul 2 21:45:20 UTC 2017


If I put the inline=“true” in the action that calls auth_function then it fails to return any results in the log output.


> On 2 Jul 2017, at 18:28, Vallimamod Abdullah <vma at vallimamod.org> wrote:
> 
> Hi,
> 
> Try adding inline="true" to the action returning the result you want to check.
> There is a nice explanation on the wiki on how the dialplan works and why this is necessary if you want to use the result of an action in a subsequent condition.
> 
> Best regards,
> -- 
> Vallimamod Abdullah
> SIP Solutions
> vma at sipsolutions.fr <mailto:vma at sipsolutions.fr>.
> 
>> On 2 Jul 2017, at 18:30, Jospeh Waite <joelists at tm.net.uk <mailto:joelists at tm.net.uk>> wrote:
>> 
>> Hi Guys
>> 
>> Nearly there with mod_rad_auth, I have it being called in my dial plan and its sending the Radisu auth and working as expected.
>> 
>> I now want to put a condition so that in the event of Radius Auth failing the dial plan will end and not allow the call to be made.
>> 
>> I have put the following in the dial plan
>> 
>>         <action application="auth_function" data="in ${DIALED_NUMBER}, in ${USERNAME}, in ${PASSWD}, out AUTH_RESULT"/>
>> 
>>   <action application="log" data="INFO  AUTH_RESULT=${AUTH_RESULT}"/>
>>   <action application="log" data="INFO  credit_time=${credit_time}"/>
>>   <action application="log" data="INFO  return_code=${return_code}"/>
>>    <condition field="${return_code}" expression="^16$">
>> 
>>             <action application="set" data="execute_on_answer=sched_hangup +${credit_time} alloted_timeout" />
>>             <action application="bridge" data="{sip_invite_from_uri=sip:${sip_from_user}@${sip_network_ip}}sofia/internal/${destination_number}@185.35.229.30:5060 <sip:${sip_from_user}@${sip_network_ip}}sofia/internal/${destination_number}@185.35.229.30:5060>" />
>>             <action application="hangup" data="${bridge_hangup_cause}"/>
>>         </condition>
>> 
>> 
>> And I check the freeswitch log and see
>> 
>> EXECUTE sofia/external/07966677711 at 185.8.92.3 <mailto:sofia/external/07966677711 at 185.8.92.3> log(INFO  AUTH_RESULT=OK)
>> 2017-07-02 17:28:12.885037 [INFO] mod_dptools.c:1724  AUTH_RESULT=OK
>> EXECUTE sofia/external/07966677711 at 185.8.92.3 <mailto:sofia/external/07966677711 at 185.8.92.3> log(INFO  credit_time=7199)
>> 2017-07-02 17:28:12.885037 [INFO] mod_dptools.c:1724  credit_time=7199
>> EXECUTE sofia/external/07966677711 at 185.8.92.3 <mailto:sofia/external/07966677711 at 185.8.92.3> log(INFO  return_code=16)
>> 2017-07-02 17:28:12.885037 [INFO] mod_dptools.c:1724  return_code=16
>> 
>> 
>> But it fails to execute the bit within the condition.
>> 
>> 
>> Any Ideas of how to make this work?
>> 
>> Regards
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>> http://www.freeswitchsolutions.com
>> 
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>> 
>> 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
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> 
> 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/20170702/78a20823/attachment.html>


More information about the FreeSWITCH-users mailing list