Yeah, that&#39;s a fun one. You&#39;ll probably need to concoct a configuration making use of continue_on_fail and failure_causes chan vars. You&#39;ll also need to figure out all the ways in which each gateway&#39;s carrier might fail the call. Oh, and &quot;no answer&quot; is also a &quot;failure&quot; so you&#39;ll need to find a way to handle that differently than the other &quot;failure&quot; conditions. Perhaps after each bridge attempt you could all a lua script that checks the value of bridge_hangup_cause and then decide what to do with the call, i.e. on a no answer you could transfer the call to a voicemail extension but on any other failure cause you could simply exit the script and let the dialplan continue processing.<br>
<br>Just as a starter maybe something like this:<br><br>&lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>&lt;action application=&quot;set&quot; data=&quot;hangup_after_brdige=false&quot;/&gt;<br>
&lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw1/$1&quot;/&gt;<br>&lt;action application=&quot;lua&quot; data=&quot;check_cause.lua&quot;/&gt;<br>&lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw2/$1&quot;/&gt;<br>
&lt;action application=&quot;lua&quot; data=&quot;check_cause.lua&quot;/&gt;<br>&lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw3/$1&quot;/&gt;<br>&lt;action application=&quot;lua&quot; data=&quot;check_cause.lua&quot;/&gt;<br>
<br>You&#39;ll need to make sure the lua script also checks to see if the previous bridge was answered and if so then hangup the call, otherwise it will keep trying the next bridge command.<br><br>Have fun with that one! :)<br>
<br>-Michael<br><br><div class="gmail_quote">On Mon, Dec 24, 2012 at 9:36 AM, Sean Devoy <span dir="ltr">&lt;<a href="mailto:sdevoy@bizfocused.com" target="_blank">sdevoy@bizfocused.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I need a little help with a complex XML dialplan.  Also, I am on the Stable release so I do not believe the much needed nested conditions exists for me yet.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">My problem is faulty gateway providers who periodically fail to connect the call with [temp failure] because “our routing tables where not up to date.”<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">So what I am after is an xml dialplan to do this<u></u><u></u></p><p class="MsoNormal">If (it is a 10 or 11 digit dial)<u></u><u></u></p><p class="MsoNormal">                Dial using gateway 1<u></u><u></u></p>
<p class="MsoNormal">                If no answer<u></u><u></u></p><p class="MsoNormal">                                Go to voice mail<u></u><u></u></p><p class="MsoNormal">                Else if gateway failure <u></u><u></u></p>
<p class="MsoNormal">                                Dial using gateway 2<u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">                If no answer<u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">
                                Go to voice mail<u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">                Else if gateway failure <u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">                                Dial using gateway 3<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:1.0in">                If no answer<u></u><u></u></p><p class="MsoNormal" style="margin-left:1.0in">                                Go to voice mail<u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">
                                Else if gateway failure<u></u><u></u></p><p class="MsoNormal" style="margin-left:.5in">                                                Play a message that the number is screwed!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Perhaps I need to breakdown and use a scripting language like LUA or JavaScript for this, but I would rather keep everything in XML if possible.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Any thoughts?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Happy Holidays to all,<u></u><u></u></p><p class="MsoNormal">Sean<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br><br>