<div dir="ltr">This is true.<div>You _can_ do it all via sql queries in the dialplan it self, but you're going to need a lot of regexp'ing, not to mention variable manipulation, etc. it could really get convoluted.</div><div>It really is simpler just to do xml_curl. A simple php would suffice.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 5, 2021 at 1:34 AM <<a href="mailto:krice@freeswitch.org">krice@freeswitch.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_2416878058136514508WordSection1"><p class="MsoNormal">Mod_xml_curl isn’t a bit heavy for this. This is exactly what it was designed to do. It also makes it where you are returning a much smaller dialplan. The curl request then eliminates a potential pile of regex hits that are quite expensive to parse thru.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> FreeSWITCH-users <<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>> <b>On Behalf Of </b>Avi Marcus<br><b>Sent:</b> Thursday, November 4, 2021 2:42 PM<br><b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br><b>Subject:</b> Re: [Freeswitch-users] Developers / packagers here?<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">mod_xml_curl seems a bit heavy for this.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">You can write a short js or lua script to do the odbc query and assign it to a channel variable.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I'm not sure about accessing a _foreign_ odbc source though, or if it only accesses the freeswitch core db.<br><br>The info isn't loading for me... <a href="https://freeswitch.org/confluence/display/FREESWITCH/Lua+FreeSWITCH+Dbh" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/Lua+FreeSWITCH+Dbh</a><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><br clear="all"><u></u><u></u></p><div><div><div><div><div><p class="MsoNormal">-Avi Marcus<br>BestFone<u></u><u></u></p></div></div></div></div></div></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Nov 4, 2021 at 9:24 PM John Covici <<a href="mailto:covici@ccs.covici.com" target="_blank">covici@ccs.covici.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><p class="MsoNormal">I think you should be able to dl all this with mod_xml_curl.  This<br>module will give you the xml you need after searching whatever<br>database you need -- and it can be on a per-call basis.  One thing<br>though, you might be better using a real programming language for<br>these use cases.  Freeswitch is more of a toolkit whereas asterisk is<br>more of a pbx specific arrangement.<br><br>On Thu, 04 Nov 2021 05:47:06 -0400,<br>Antony Stone wrote:<br>> <br>> On Wednesday 03 November 2021 at 22:00:14, Mike Jerris wrote:<br>> <br>> > It’s a module abandoned 7-8 years ago in the contrib repo that we have<br>> > never maintained and has never been part of the FS packaging.  We<br>> > generally don’t package unmaintained code but you are welcome to use it if<br>> > you choose and it still works.  The db layers have gone through some<br>> > evolution since then, what exactly are you trying to accomplish, it may<br>> > already be available elsewhere.<br>> <br>> I have a few use cases:<br>> <br>> 1. Inbound calls come in to a DDI range I have, and need to be forwarded on to <br>> users' mobile phones.  This list of DDI --> mobile number mappings is fairly <br>> large, and maintained externally to the telephony platform, therefore I want <br>> to do a dynamic lookup of the DDI to find out which mobile number to forward a <br>> call on to.<br>> <br>> 2. Users dialling out have different destinations they're allowed to call, and <br>> again the details about who is allowed to call where are maintained by people <br>> nothing to do with operating the telephony platform, so I want to do a <br>> database lookup of each user as they place a call to see whether the <br>> destination they're dialling is in their allowed list.<br>> <br>> 3. Outbound providers charge us for placing calls to different destinations, <br>> and the prices change (typically monthly, but sometimes more often), and I <br>> need to do accurate live per-call accounting to keep track of users' and <br>> groups' spend levels.<br>> <br>> I've done all the above in Asterisk using its ODBC connectivity, so I'm <br>> looking for the best way to execute arbitrary SQL statements in a FreeSwitch <br>> dialplan.<br>> <br>> > > On Oct 29, 2021, at 10:21 AM, Antony Stone wrote:<br>> > > <br>> > > Hi.<br>> > > <br>> > > Can anyone tell me why<br>> > > <a href="https://freeswitch.org/confluence/display/FREESWITCH/mod_odbc_query" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/mod_odbc_query</a> is<br>> > > not built as part of the standard Debian packages available from<br>> > > <a href="https://files.freeswitch.org/repo/deb/" target="_blank">https://files.freeswitch.org/repo/deb/</a> ?<br>> > > <br>> > > Thanks,<br>> > > <br>> > > <br>> > > Antony.<br>> <br>> -- <br>> "640 kilobytes (of RAM) should be enough for anybody."<br>> <br>>  - Bill Gates<br>> <br>>                                                    Please reply to the list;<br>>                                                          please *don't* CC me.<br>> <br>> _________________________________________________________________________<br>> <br>> The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" target="_blank">https://signalwire.com</a><br>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>> Build your next product on our scalable cloud platform.<br>> <br>> Join our online community to chat in real time <a href="https://signalwire.community" target="_blank">https://signalwire.community</a><br>> <br>> Professional FreeSWITCH Services<br>> <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>> <a href="https://freeswitch.com" target="_blank">https://freeswitch.com</a><br>> <br>> Official FreeSWITCH Sites<br>> <a href="https://freeswitch.com/oss" target="_blank">https://freeswitch.com/oss</a><br>> <a href="https://freeswitch.org/confluence" target="_blank">https://freeswitch.org/confluence</a><br>> <a href="https://cluecon.com" target="_blank">https://cluecon.com</a><br>> <br>> FreeSWITCH-users mailing list<br>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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="https://freeswitch.com" target="_blank">https://freeswitch.com</a><br>> <br><br>-- <br>Your life is like a penny.  You're going to lose it.  The question is:<br>How do<br>you spend it?<br><br>         John Covici wb2una<br>         <a href="mailto:covici@ccs.covici.com" target="_blank">covici@ccs.covici.com</a><br><br>_________________________________________________________________________<br><br>The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" target="_blank">https://signalwire.com</a><br>Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>Build your next product on our scalable cloud platform.<br><br>Join our online community to chat in real time <a href="https://signalwire.community" target="_blank">https://signalwire.community</a><br><br>Professional FreeSWITCH Services<br><a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br><a href="https://freeswitch.com" target="_blank">https://freeswitch.com</a><br><br>Official FreeSWITCH Sites<br><a href="https://freeswitch.com/oss" target="_blank">https://freeswitch.com/oss</a><br><a href="https://freeswitch.org/confluence" target="_blank">https://freeswitch.org/confluence</a><br><a href="https://cluecon.com" target="_blank">https://cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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="https://freeswitch.com" target="_blank">https://freeswitch.com</a><u></u><u></u></p></blockquote></div></div></div>_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>