<HTML>
<HEAD>
<TITLE>Re: [Freeswitch-users] how to avoid many &quot;|&quot; in bridge application?</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>That still wouldn&#8217;t work... An action has 2 parameters application and data... And deeper then that and you have to start re-arranging all sorts of things...<BR>
<BR>
Continue_on_fail and hangup_after_bridge like tony pointed out are what you want if you don&#8217;t want to use the | delimiting ... I use these all the time with gateway counts &gt; 10 just stacking additional actions for each bridge line<BR>
<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"><B>From: </B>&quot;Carlos S. Antunes&quot; &lt;csa@nowthor.com&gt;<BR>
<B>Organization: </B>Nowthor Corporation<BR>
<B>Reply-To: </B>&lt;freeswitch-users@lists.freeswitch.org&gt;<BR>
<B>Date: </B>Tue, 25 Aug 2009 22:50:08 -0400<BR>
<B>To: </B>&lt;freeswitch-users@lists.freeswitch.org&gt;<BR>
<B>Subject: </B>Re: [Freeswitch-users] how to avoid many &quot;|&quot; in bridge application?<BR>
<BR>
Anthony,<BR>
<BR>
Yes, you are right, I was thinking strictly in terms of SIP gateways. I guess that instead on the tag &quot;gateway&quot;, one could use &quot;channel&quot;? For example:<BR>
<BR>
&lt;action application=&quot;bridge&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;!-- set some kind of *bridge-specific* variable --&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;channel order=1 data=&quot;sofia/gateway/gw-1/1$1&quot;/&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;channel order=1 data=&quot;sofia/gateway/gw-2/1$1&quot;/&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;channel order=2 data=&quot;sofia/gateway/gw-3/1$1&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- set some kind of *channel-specific* variable --&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;/channel &gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;channel order=3 data=&quot;sofia/gateway/gw-4/1$1&quot;/&gt;<BR>
&lt;/action&gt;<BR>
<BR>
Would this be acceptable to you?<BR>
<BR>
Regarding the combinations of continue_on_fail and hangup_after bridge, I'll give that a try although I suspect it will result in less structured and harder to understand markup...<BR>
<BR>
Thanks!<BR>
<BR>
Carlos<BR>
<BR>
Anthony Minessale wrote: <BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>This suggestion violates the scope boundaries.<BR>
&nbsp;<BR>
gateways are specific concept to mod_sofia so a &lt;gateway&gt; tag in &lt;action&gt; (part of agnostic xml dialplan)<BR>
does not flow properly.<BR>
&nbsp;<BR>
you can also use combinations of continue_on_fail and hangup_after bridge so you can<BR>
just put each bridge statement in it's own action.<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
On Tue, Aug 25, 2009 at 9:06 AM, Carlos S. Antunes &lt;csa@nowthor.com&gt; wrote:<BR>
&nbsp;<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Max,<BR>
&nbsp;<BR>
I would like to see something similar too. For example, it would be<BR>
wonderful if one could specify multiple gateways to try like this or<BR>
something similar:<BR>
&nbsp;<BR>
&lt;action application=&quot;bridge&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;!-- set some kind of *bridge-specific* parameter/variable --&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;gateway order=1 data=&quot;sofia/gateway/gw-1/1$1&quot;/&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;gateway order=1 data=&quot;sofia/gateway/gw-2/1$1&quot;/&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;gateway order=2 data=&quot;sofia/gateway/gw-3/1$1&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!-- set some kind of *gw-specific* parameter/variable --&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;/gateway&gt;<BR>
&nbsp;&nbsp;&nbsp;&lt;gateway order=3 data=&quot;sofia/gateway/gw-4/1$1&quot;/&gt;<BR>
&lt;/action&gt;<BR>
&nbsp;<BR>
One would be able to avoid the &quot;[]&quot; and &quot;{}&quot; hacks and combine<BR>
sequential and simultaneous trying of gateways.<BR>
&nbsp;<BR>
What do the developers think of this?<BR>
&nbsp;<BR>
<FONT COLOR="#888888">Carlos<BR>
&nbsp;</FONT> <BR>
&nbsp;<BR>
<BR>
Max Ivanov wrote:<BR>
&gt; Nowdays I 'm forced to put multiple &quot;|&quot; to find first free gateway, ie<BR>
&gt; sofia/gateway/panas111/1000|sofia/gateway/panas112/1000|sofia/gateway/panas113/1000<BR>
&gt; ,<BR>
&gt; the whole sting is tooo long, is there any shorter way to write same thing? Like<BR>
&gt; &quot;sofia/gateway/panas*/1000&quot; will try all gateways matching the pattern.<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; FreeSWITCH-users mailing list<BR>
&gt; FreeSWITCH-users@lists.freeswitch.org<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>
&gt;<BR>
&gt;<BR>
&nbsp;<BR>
_______________________________________________<BR>
FreeSWITCH-users mailing list<BR>
&nbsp;FreeSWITCH-users@lists.freeswitch.org<BR>
&nbsp;<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
&nbsp;<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
&nbsp;<BR>
-- <BR>
Anthony Minessale II<BR>
&nbsp;<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>
&nbsp;<BR>
AIM: anthm<BR>
&nbsp;MSN:anthony_minessale@hotmail.com <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">&lt;mailto:MSN%3Aanthony_minessale@hotmail.com&gt;</a> <BR>
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">&lt;mailto:PAYPAL%3Aanthony.minessale@gmail.com&gt;</a> <BR>
IRC: irc.freenode.net <a href="http://irc.freenode.net">&lt;http://irc.freenode.net&gt;</a> #freeswitch<BR>
&nbsp;<BR>
FreeSWITCH Developer Conference<BR>
&nbsp;sip:888@conference.freeswitch.org <a href="mailto:sip%3A888@conference.freeswitch.org">&lt;mailto:sip%3A888@conference.freeswitch.org&gt;</a> <BR>
&nbsp;iax:guest@conference.freeswitch.org/888 <a href="http://iax:guest@conference.freeswitch.org/888">&lt;http://iax:guest@conference.freeswitch.org/888&gt;</a> <BR>
&nbsp;googletalk:conf+888@conference.freeswitch.org <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">&lt;mailto:googletalk%3Aconf%2B888@conference.freeswitch.org&gt;</a> <BR>
pstn:213-799-1400<BR>
&nbsp;<BR>
<BR>
<HR ALIGN=CENTER SIZE="4" WIDTH="90%"><BR>
_______________________________________________<BR>
FreeSWITCH-users mailing list<BR>
FreeSWITCH-users@lists.freeswitch.org<BR>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
&nbsp;&nbsp;<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT></FONT></BLOCKQUOTE></BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
FreeSWITCH-users mailing list<BR>
FreeSWITCH-users@lists.freeswitch.org<BR>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>