[Freeswitch-users] transfer on fail in originate string for A Leg

Bote Man bote_radio at botecomm.com
Sun Apr 12 07:56:10 MSD 2015


There is the FreeSWITCH channel variable ‘failure_causes’ which can be set to the various cause codes.

 

There is also ‘continue_on_fail’ which can be set to “true” in the dialplan to continue regardless of the type of failure on the B-leg in a bridge command. I don’t know if it will work in your transfer scenario, but maybe you can work some magic with these to accomplish what you want? I suspect you will need to rework your dialplan approach to use this, though.

 

See this humongous wiki page:

https://freeswitch.org/confluence/display/FREESWITCH/Channel+Variables#ChannelVariables-continue_on_fail

 

Bote

 

 

 

 

From: Jayesh Nambiar
Sent: Saturday, 11 April, 2015 07:44
Subject: [Freeswitch-users] transfer on fail in originate string for A Leg

 

Hi,

I am looking at parking the A Leg of the call when the B Leg in the originate string fails for any reason. In the current scenario the A Leg just hangs up even if it has the park_after_bridge variable set to true. Basically, the park_after_bridge comes into the picture when the B leg is answered and then B Leg hangs up. I tried the following and it worked:

originate {transfer_on_fail='USER_BUSY BRIDGE_FAIL XML bridge_fail',park_after_bridge=true}sofia/abc/1234 at dest_ip &bridge(sofia/abc/5678 at dest_ip)

Then I have a dialplan as:

<context name=bridge_fail>

  <extension name="bridge_fail">

    <condition field="destination_number" expression="BRIDGE_FAIL">

      <action application="park"/>

    </condition>

  </extension>

</context>

 

This works perfectly when the B-Leg fails with USER_BUSY response and I figured that if I comma separate the hangup causes it will work for the causes that I have defined. But I want the A Leg to get parked if the B Leg fails in any scenario so that I dont miss out on some weird Hangup Cause. I read about auto_cause which can be used in place of the HANGUP Causes but that doesn't seem to work as expected.

 

Is there a straight forward way where I can replace the USER_BUSY with a string which will catch all hangup cause and allow the call to be taken to destination and context defined?? Any assistance will be of great help.

 

Thanks,

 

- Jayesh

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150411/252c61aa/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list