But how does get_avail_gw find out it&#39;s avail? <br>It would have to try making the call so you would call over it to find out it&#39;s ok to call then pass that back up to bridge?<br><br>You can try to hide the complexity but you still have to stash it somewhere.<br>
<br>So if you don&#39;t like looking at it consider making a script or a C mod to hide it.<br><br>Here&#39;s one cool way you can do with just regular dialplan.<br><br><br>    &lt;extension name=&quot;gateways&quot;&gt;<br>
      &lt;condition field=&quot;destination_number&quot; expression=&quot;gateway_macro&quot;&gt;<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_bridge=true&quot;/&gt;<br>
        &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw1/${dialed_number}&quot;/&gt;<br>        &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw2/${dialed_number}&quot;/&gt;<br>        &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw3/${dialed_number}&quot;/&gt;<br>
        &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw4/${dialed_number}&quot;/&gt;<br>        &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/gw5/${dialed_number}&quot;/&gt;<br>      &lt;/condition&gt;<br>
    &lt;/extension&gt;<br><br>    &lt;extension name=&quot;myext&quot;&gt;<br>      &lt;condition field=&quot;destination_number&quot; expression=&quot;^(whatever)$&quot;&gt;<br>        &lt;action application=&quot;set&quot; data=&quot;dialed_number=$1&quot;/&gt;<br>
        &lt;action application=&quot;transfer&quot; data=&quot;gateway_macro&quot;/&gt;<br>      &lt;/condition&gt;<br>    &lt;/extension&gt;<br><br>change whatever to your favorite regex<br>so now all you have to do is set dialed_number and transfer to gateway_macro (you could have many of these with different names)<br>
<br><br>One way or another all your real goal seems to be is hiding the complexity so *shrug* here&#39;s and easy way with existing tools.<br><br><br><br><div class="gmail_quote">On Wed, Aug 26, 2009 at 12:44 AM, Max Ivanov <span dir="ltr">&lt;<a href="mailto:ivanov.maxim@gmail.com">ivanov.maxim@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">&gt;<br>
&gt; Continue_on_fail and hangup_after_bridge like tony pointed out are what you<br>
&gt; want if you don’t want to use the | delimiting ... I use these all the time<br>
&gt; with gateway counts &gt; 10 just stacking additional actions for each bridge<br>
&gt; line<br>
<br>
</div>Let&#39;s imagine that I need to call 1000,1001,1002 via  gw1,gw2,gw3 by<br>
choosing first available. How dialplan would look like?<br>
<br>
continue_on_fail=True<br>
hangup_after_bridge=True<br>
bridge gw1/1000<br>
bridge gw1/1001<br>
bridge gw1/1002<br>
bridge gw2/1000<br>
bridge gw2/1001<br>
bridge gw2/1002<br>
bridge gw3/1000<br>
bridge gw3/1001<br>
bridge gw3/1002<br>
<br>
Is it easy to understand? From my point of view it&#39;s not. Compare to this:<br>
continue_on_fail=True<br>
hangup_after_bridge=True<br>
bridge ${get_avail_gw(gw1,gw2,gw3)}/1000<br>
bridge ${get_avail_gw(gw1,gw2,gw3)}/1001<br>
bridge ${get_avail_gw(gw1,gw2,gw3)}/1002<br>
<div><div></div><div class="h5"><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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>