Ok, So I have done a lot of playing and it seems that I cannot run the Auth_function inline as it won’t allow me to. I get an error in the log.
It therefore means that the result of it is not available for when the condition is parsed.
So my question is, How do I make Freeswitch hang up the call if the Auth fails?
Any help would be much appreciated as I am banging my head against this!
Regards
If I put the inline=“true” in the action that calls auth_function then it fails to return any results in the log output.
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
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="hangup" data="${bridge_hangup_cause}"/>
</condition>
And I check the freeswitch log and see
2017-07-02 17:28:12.885037 [INFO] mod_dptools.c:1724 AUTH_RESULT=OK
2017-07-02 17:28:12.885037 [INFO] mod_dptools.c:1724 credit_time=7199
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@freeswitch.orghttp://www.freeswitchsolutions.comOfficial FreeSWITCH Sites
http://www.freeswitch.orghttp://confluence.freeswitch.orghttp://www.cluecon.com
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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.orghttp://www.freeswitchsolutions.comOfficial FreeSWITCH Sites
http://www.freeswitch.orghttp://confluence.freeswitch.org
http://www.cluecon.com
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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.orghttp://www.freeswitchsolutions.comOfficial FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.orghttp://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com
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