<html><body bgcolor="#FFFFFF"><div>The Sofia api command will show you the status of a gateway and if it exists. Perhaps you can use that in some way?</div><div><br></div><div>Sofia status gateway &lt;name&gt;<br><br>Steve on iPhone</div><div><br>On 14 Aug 2010, at 23:34, Fraser Redmond &lt;<a href="mailto:fraserredmond@gmail.com">fraserredmond@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>Thanks Jay, I had a similar thought - I already set a global var in /conf/vars.xml so I'm checking that.<br><br>Ideally I'd like to check if the gateway is registered too, though I guess that's different than whether it exists or not.<br>

<br clear="all">Cheers,<br>Fraser<br><br><br>
<br><br><div class="gmail_quote">On Sat, Aug 14, 2010 at 10:40 PM, jay binks <span dir="ltr">&lt;<a href="mailto:jaybinks@gmail.com"><a href="mailto:jaybinks@gmail.com">jaybinks@gmail.com</a></a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Can a gateway set a channel variable ??<br>
<br>
If so you can have the gateways define a var like<br>
"gateway-available-MYGATEWAY" then test for THAT in your dial plan<br>
....<br>
<br>
<br>
Jay<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On 15/08/2010, at 7:32 AM, Fraser Redmond &lt;<a href="mailto:fraserredmond@gmail.com"><a href="mailto:fraserredmond@gmail.com">fraserredmond@gmail.com</a></a>&gt; wrote:<br>
<br>
&gt; I want to have different gateways defined on dev and prod servers, but with the same dialplan code used between them.<br>
&gt;<br>
&gt; Is there an API function I can put in a condition to detect if a gateway exists? (I had a look through google and the wiki, and the closest looking thing was domain_exists.)<br>
&gt;<br>
&gt; Or am I meant to just try bridging to it, and dealing with a failure?<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Fraser<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></a><br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a><br>
<a href="http://www.freeswitch.org" target="_blank"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></a><br>
</blockquote></div><br>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br></div></blockquote></body></html>