<div dir="ltr">XML curl is to "take over" the dialplan, with your own code providing the dialplan XML. I don't think that's what you want at all.<div><br><div>Sounds like you just want to get the response information, that's something small -- an embedded <a href="https://wiki.freeswitch.org/wiki/Lua">lua</a> script to set a channel var, or even a <a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_system">system</a> call -- just beware initialization time.</div>
<div><br></div><div>If you had the information directly (or JSON?), you could simply use <a href="https://wiki.freeswitch.org/wiki/Mod_curl">mod_curl</a> but I don't think that will parse this for you.</div><div>Actually, you could use mod_curl to save to a variable, and then use <a href="http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_regex">regex</a> to pull out the part you want (see last example).</div>
<div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi Marcus<br></span></div></div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">BestFone</span></div>
<br><br><div class="gmail_quote">On Mon, May 12, 2014 at 9:09 PM, Victor Chukalovskiy <span dir="ltr"><<a href="mailto:victor.chukalovskiy@gmail.com" target="_blank">victor.chukalovskiy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Good day,<br>
<br>
I have a web server that I can request as following:<br>
<a href="http://192.168.1.2/pqrs/route?tn=4165555555" target="_blank">http://192.168.1.2/pqrs/route?tn=4165555555</a><br>
<br>
And it will respond with xml containing LRN which looks like this:<br>
<br>
<pqrsd><br>
<api>pqrsd</api><br>
<operation>route</operation><br>
<status>success</status><br>
<tn><a href="tel:4165555555" value="+14165555555" target="_blank">4165555555</a></tn><br>
<region>canada</region><br>
<b> <rn>4160000001</rn></b><br>
<spid/><br>
<spName/><br>
<routedBy>none</routedBy><br>
</pqrsd><br>
<br>
<br>
Can I use mod_xml_curl to make LRN queries from XML dialplan and put
LRN from the response into a channel variable? Is it suitable for
such real-time queries?<br>
If so, how should I setup mod_xml_curl? WiKi mostly goes over
standard stuff such as getting directory, dialplan, ACL etc<br>
<br>
Thank you,<br>
-Victor<br>
<br>
<br>
</div>
<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></div>