[Freeswitch-users] Override sip hangup cause - transfer bridge call
Milan Milosavljević
milanca at gmail.com
Thu Apr 13 00:25:40 MSD 2017
If a bridged call fails I transfer it to 'to503' extension to overwrite
hangup cause. Some carriers reject `bridge` call with hangup code like
normal_temporary_failure which i need to override with 503/34. Here is the
dialplan and extension to transfer to.
<action application="set" data="continue_on_fail=true"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="bridge" data=" ...bridge data... "/>
<action application="transfer" data="to503"/>
<extension name="to503">
<condition field="${proto_specific_hangup_cause}" expression="^(.*)$">
<action application="set" data="sip_ignore_remote_cause=true"/>
<action application="respond" data="503"/>
<action application="hangup" data="NORMAL_CIRCUIT_CONGESTION"/>
</condition>
</extension>
It works fine but in saved xml_cdr file that i process later
'sip_network_ip' variable is wrong, its taken from some of the other
incoming calls and looks always random. How can i please get right ip from
originated call? If i set leg to "transfer" data="-bleg to503" i get
NORMAL_CLEARING as hangup code, with -both i get what i need but IP is
incorrect.
Maybe there is a way to respond with 503 without transferring the call to
extension. If i simply respond with data='503' without transfer i get 503
but 41 instead of 503/34 NORMAL_CIRCUIT_CONGESTION.
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20170412/23ec6a7d/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list