<div dir="ltr">I'm not quite sure of the use case. Do any of these help?<div>1) specify a server, not an IP, and then let DNS determine where it goes.</div><div>2) use a small lua script to set the channel variable based on whatever you need - an sql query, some logic.. and then use that variable in the bridge string.</div>
<div><br></div><div>Those help? If not, please explain more what problem you are trying to solve.</div><div><br clear="all"><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif"><span style="font-size:small">-Avi</span></span></div>
<br><br><div class="gmail_quote">On Sun, Jan 8, 2012 at 3:34 PM, fieldpeak <span dir="ltr"><<a href="mailto:fieldpeak@gmail.com">fieldpeak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p class="MsoNormal"><span style="color:#1f497d">Dear
friends,<br>
<br>
i have FS for PSTN outbound call using below dial plan, <br>
<br>
</span><extension name="CallToPSTN" ><br>
<condition field="destination_number"
expression="^(0\d+)$" ><br>
<action application="bridge"
data="sofia/internal/$1@<span style="background:yellow">1.2.3.4</span>"
/><br>
</condition><br>
</extension><span style="color:#1f497d"><br>
<br>
While, now i need dynamically specify the outbound GW’s IP address according to
the return result of the external command before routing in the source code ,
e.g. if the external command return FS the IP address of OB GW <span style="background:#ffff33">6.7.8.9</span>, then <br>
<br>
<action application="bridge" data="sofia/internal/$1@<span style="background:#ffff33">6.7.8.9</span>" /><br>
<br>
however, i don't know which function i should call within the source code to
realize it, could anybody help to advise, </span></p>
<p class="MsoNormal"><span style="color:#1f497d"><span>P.S. </span>i know there is existing module “mod_xml_curl”
can realize similar function, however, I could not use it for this case…</span></p>
<p class="MsoNormal"><span style="color:#1f497d"> </span></p>
<span style="color:#1f497d">thanks a
lot!<br><br>Regards,<br>Charles<br>
</span>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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>
<br></blockquote></div><br></div></div>