Hello,
Continue on fail works if you run it from the dial plan. When I originate there's no dial plan associated with the first leg and hence it hangs up anyways. This variable transfer_on_fail works good, all it needs is a string which will be true for all hang up causes except NORMAL_CLEARING and things should be fine.
- Jayesh
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:
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@dest_ip &bridge(sofia/abc/5678@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
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org