Continue dialplan execution on 503, NOT on early media.
Hi, I have a problem with a specific carrier which I have three interconnects with where they are rejecting with 503 on a CAPs limit. To work around this after all interconnects have been attempted I am trying to pause for 1s then attempt the three interconnects out to this carrier again: <extension name="to carrier"> <condition field="${sip_to_params}" expression="tgrp=carrier"/> <condition field="destination_number" expression="^(.+)"> <action application="set" data="bypass_media=true"/> <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE"/> <action application="set" data="fail_on_single_reject=!NORMAL_TEMPORARY_FAILURE"/> <action application="bridge" data="sofia/gateway/carrier1/+$1|sofia/gateway/carrier2/+$1|sofia/gateway/carrier3/+$1"/> <action application="sleep" data="2000"/> <action application="bridge" data="sofia/gateway/carrier1/+$1|sofia/gateway/carrier2/+$1|sofia/gateway/carrier3/+$1"/> </condition> </extension> This all works well, except I get a large number of call attempts which result in a 183 (+ SDP) followed by a 480 and these cause the dialplan to continue with the failure reason NO_USER_RESPONSE which is not listed in the continue_on_fail reasons. I want to give up immediately on these calls. I tried the ignore_early_media=true, but the problem with this approach is that FreeSWITCH considers calls which ring for longer than 60 seconds as a timeout and clears back, which is not desirable. Is there any other approach to reroute to alternate carriers, and sleep if necessary only on 503 and not retry on all other causes, including 18x? Thanks, Neil. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Continue-dialplan-execution-on... Sent from the freeswitch-users mailing list archive at Nabble.com.
Sorry, I also meant to say that I had tried "hangup_after_Bridge=true" as well and this has no effect, 183 > 480 calls are still retried after 2 seconds. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Continue-dialplan-execution-on... Sent from the freeswitch-users mailing list archive at Nabble.com.
This should work, but only if ignore_early_media is false (or not set) On 8 November 2012 16:07, peely <freeswitch@peely.com> wrote:
Sorry, I also meant to say that I had tried "hangup_after_Bridge=true" as well and this has no effect, 183 > 480 calls are still retried after 2 seconds.
-- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Continue-dialplan-execution-on... Sent from the freeswitch-users mailing list archive at Nabble.com.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
None of the combinations seemed to do what I needed without ignore_early_media, and ignore_early_media had its own consequences. It seems there's no way of stopping the dialplan from proceeding after receipt of media, but continue for other reasons. The lua script seems to work like a charm however. If my observations are correct and final, shall I add this to the continue_on_fail wiki? -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Continue-dialplan-execution-on... Sent from the freeswitch-users mailing list archive at Nabble.com.
So after widening my forum searching, and suspecting I might need to script something I copied a similar issue with USER_BUSY responses. I've created a lua script which hangs up if the content disposition is early_media: endpoint_disposition = session:getVariable("endpoint_disposition"); if (endpoint_disposition == "EARLY MEDIA") then session:hangup(); end Then, added it to my dial plan: <extension name="to carrier"> <condition field="${sip_to_params}" expression="tgrp=carrier"/> <condition field="destination_number" expression="^(.+)"> <action application="set" data="bypass_media=true"/> <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE"/> <action application="set" data="fail_on_single_reject=!NORMAL_TEMPORARY_FAILURE"/> <action application="set" data="hangup_after_bridge=true"/> <action application="bridge" data="sofia/gateway/carrier1/+$1|sofia/gateway/carrier2/+$1|sofia/gateway/carrier3/+$1"/> *<action application="lua" data="killearlymedia.lua"/>* <action application="sleep" data="2000"/> <action application="bridge" data="sofia/gateway/carrier1/+$1|sofia/gateway/carrier2/+$1|sofia/gateway/carrier3/+$1"/> </condition> </extension> This seems to do what I need. Neil. -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/Continue-dialplan-execution-on... Sent from the freeswitch-users mailing list archive at Nabble.com.
participants (2)
-
peely
-
Steven Ayre