Perfect Thanks.. <br><br>Is there a definition on what relates to what error code (404 - NO_ROUTE_DESTINATION)? I looked in the src/switch_channel.c but it just defines it&nbsp; NO_ROUTE_DESTINATION.<br><br><div class="gmail_quote">
On Mon, Jul 7, 2008 at 12:35 AM, Brian West &lt;<a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You can do this with the continue_on_fail session variable.<br>
<br>
404 = NO_ROUTE_DESTINATION<br>
500 &amp; 503 = NORMAL_TEMPORARY_FAILURE<br>
and 485 is USER_BUSY<br>
<br>
So if you set the variable continue_on_fail to a comma separated list<br>
ie:<br>
<br>
&lt;action application=&quot;set&quot;<br>
data=&quot;NO_ROUTE_DESTINATION,NORMAL_TEMPORARY_FAILURE&quot;/&gt;<br>
&lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/<a href="http://blah.com/5551212" target="_blank">blah.com/5551212</a>&quot;/&gt;<br>
&lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/<a href="http://blah2.com/5551212" target="_blank">blah2.com/5551212</a>&quot;/&gt;<br>
<br>
This would cause the dialplan to continue processing if <a href="http://blah.com" target="_blank">blah.com</a><br>
returned any of the above causes.<br>
<br>
<a href="http://wiki.freeswitch.org/wiki/Channel_Variables#continue_on_fail" target="_blank">http://wiki.freeswitch.org/wiki/Channel_Variables#continue_on_fail</a><br>
<br>
<a href="http://wiki.freeswitch.org/wiki/Hangup_causes" target="_blank">http://wiki.freeswitch.org/wiki/Hangup_causes</a><br>
<br>
/b<br>
<div><div></div><div class="Wj3C7c"><br>
<br>
On Jul 6, 2008, at 11:09 PM, Joseph Bajin wrote:<br>
<br>
&gt;<br>
&gt; I will use xml_curl to query a db for the cheapest routes to use.<br>
&gt; It will come back with a couple of different gateways to use. (LCR<br>
&gt; idea) Based on the response I get from the first gateway<br>
&gt; (404,503,500, 486), I want to either reroute to another gateway or<br>
&gt; send back to the &nbsp;originator the result that I found (486 in this<br>
&gt; case, other messages should be rerouted unless we hit the last and<br>
&gt; then send back a final response).<br>
&gt;<br>
&gt; How can I do that in a dialplan? Can you point me some documention<br>
&gt; maybe?<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<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>
</blockquote></div><br><br clear="all"><br>-- <br>--Joe<br><br>&quot;Success is easy if you think of it like Rust: It&#39;s inevitable if you keep at it. Guys claim there are magic moments, but that&#39;s just bullshit.&quot; --Fred Franzia (The famous wine guy)