<p>Read up on mod distributor on the wiki.</p>
<div class="gmail_quote">On May 14, 2011 12:12 PM, &quot;Anton VG&quot; &lt;<a href="mailto:anton.vazir@gmail.com">anton.vazir@gmail.com</a>&gt; wrote:<br type="attribution">&gt; You did not understand. I INTENTIONALLY dialing the bad gateway, and<br>
&gt; I&#39;m looking for a proper way to determine that gateway is bad in my<br>&gt; ESL dialplan, by catching the proper event/reply/whatever,<br>&gt; And much preferably without tricks, like esl.api(&#39;sofia status gateway<br>
&gt; GatewayWhichIsDown&#39;)<br>&gt; <br>&gt; When in production, and there is more than a single route, there will<br>&gt; be plenty of cases, when you dial a bad gateway, so there should be a<br>&gt; way for ESL dialplan to determine that a gateway is not callable for a<br>
&gt; moment, the reason WHY and  to retry with another one.<br>&gt; <br>&gt; The trick above is bad, since:<br>&gt; 1. blocking api query, before evey single gateway call attempt.<br>&gt; 2. Gateway maybe known in UP state, but the state is stale, in dial in<br>
&gt; fact will go to DOWN gateway. So, dialplan will screw<br>&gt; <br>&gt; Possibly I should ask in DEV list...<br>&gt; <br>&gt; 2011/5/14 Madovsky &lt;<a href="mailto:infos@madovsky.org">infos@madovsky.org</a>&gt;:<br>&gt;&gt; maybe your gateway is blocking some numbers<br>
&gt;&gt;<br>&gt;&gt; ----- Original Message -----<br>&gt;&gt; From: &quot;Anton VG&quot; &lt;<a href="mailto:anton.vazir@gmail.com">anton.vazir@gmail.com</a>&gt;<br>&gt;&gt; To: &quot;FreeSWITCH Users Help&quot; &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a>&gt;<br>
&gt;&gt; Sent: Saturday, May 14, 2011 12:23 PM<br>&gt;&gt; Subject: Re: [Freeswitch-users] ESL: No events fired when there is error on<br>&gt;&gt; submitted API command, like originate sofia to non-existent gateway<br>&gt;&gt;<br>
&gt;&gt;<br>&gt;&gt;&gt; The same goes for gateway, which is just down. No events, signalling<br>&gt;&gt;&gt; that call will not succeed. And no events fired.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; 2011-05-14 21:19:32.002929 [ERR] mod_sofia.c:4050 Gateway is down!<br>
&gt;&gt;&gt; 2011-05-14 21:19:32.002929 [ERR] switch_ivr_originate.c:2447 Cannot<br>&gt;&gt;&gt; create outgoing channel of type [sofia] cause: [NETWORK_OUT_OF_ORDER]<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Am I missing the way to get info in the ESL about gateways, which are<br>
&gt;&gt;&gt; out of order, or there is simple no way, without hacking the code?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt; FreeSWITCH-users mailing list<br>&gt;&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt;&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt;&gt; <a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; FreeSWITCH-users mailing list<br>&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt; <a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br>&gt;&gt;<br>&gt; <br>&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">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div>