<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.longtext
        {mso-style-name:long_text;}
span.hps
        {mso-style-name:hps;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This is interesting&#8230;.Nice to know that we were doing something right&#8230;mod_xml_curl&#8230;.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I did not get a chance to look at the php example&#8230;I will have a look when I have a free moment&#8230;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>- Duane<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Antonio<br><b>Sent:</b> Sunday, February 06, 2011 11:07 AM<br><b>To:</b> freeswitch-users@lists.freeswitch.org<br><b>Subject:</b> Re: [Freeswitch-users] Freeswitch and mysql<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>El 19/01/11 22:16, Avi Marcus escribió: <o:p></o:p></p><div><p class=MsoNormal>Integrate freeswitch with mysql is vague. That itself could mean something like having freeswitch store it's database in mysql, but that doesn't seem to be what you want. <o:p></o:p></p><div><p class=MsoNormal>You are asking how to use a database (any, not just mysql) to configure the dialplan - users, extensions, conferences, whatever.<o:p></o:p></p></div><div><p class=MsoNormal>1) You can use lua to process the calls and have it query your database<o:p></o:p></p></div><div><p class=MsoNormal>2) If you just need simple sql queries, check the mod_odbc_query from the git contrib. If you already understand the dialplan basics, then this can easily let you query the database as part of that.<o:p></o:p></p></div><div><p class=MsoNormal>3) However, if you need more complicated things, then mod_xml_curl is your friend - it lets you grab dynamicly generated XML files for each call.<o:p></o:p></p></div><div><p class=MsoNormal>I myself use php to query a mysql database for how much to charge for the call, a custom LCR implementation, etc.<o:p></o:p></p></div><div><p class=MsoNormal>I posted the basic classes to github a while ago:&nbsp; <a href="https://github.com/avimar/FreeSWITCH-mod_xml-with-PHP">https://github.com/avimar/FreeSWITCH-mod_xml-with-PHP</a><o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Also, intralanman wrote a very modular, all inclusive xml_curl implementation in php - which if you understand it (I didn't know it existed) should be really helpful. You can find that in the git contrib also in:&nbsp; <span class=apple-style-span><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>intralanman/PHP/fs_curl</span></span><o:p></o:p></p></div><div><p class=MsoNormal>-Avi Marcus<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><p class=MsoNormal>Hi<span lang=EN><br><br><span class=hps>Thanks</span><span class=longtext> </span><span class=hps>for</span><span class=longtext> </span><span class=hps>everyone's responses</span><span class=longtext>, </span><span class=hps>are</span><span class=longtext> </span><span class=hps>really helping</span><span class=longtext> </span><span class=hps>me</span><span class=longtext> </span><span class=hps>to</span><span class=longtext> </span><span class=hps>really know</span><span class=longtext> </span><span class=hps>to look for</span><span class=longtext> </span><span class=hps>and</span><span class=longtext> </span><span class=hps>how to document ;-)</span><span class=longtext>. </span><span class=hps>I had thought</span><span class=longtext> </span><span class=hps>one thing</span><span class=longtext> </span><span class=hps>and</span><span class=longtext> </span><span class=hps>I have</span><span class=longtext> </span><span class=hps>a question</span><span class=longtext>: </span><span class=hps>Could</span><span class=longtext> </span><span class=hps>use</span><span class=longtext> </span><span class=hps>python</span><span class=longtext> </span><span class=hps>for</span><span class=longtext> </span><span class=hps>this</span><span class=longtext> </span><span class=hps>cause</span><span class=longtext>?. </span><span class=hps>I'll</span><span class=longtext> </span><span class=hps>look at me</span><span class=longtext> </span><span class=hps>while the</span><span class=longtext> </span><span class=hps>modules</span><span class=longtext> </span><span class=hps>that</span><span class=longtext> </span><span class=hps>have told me</span><span class=longtext>;-). </span><span class=hps>Thank you very much</span><span class=longtext>.</span></span><br><br><br>Regards<br><br>&lt;action application=&quot;python&quot; data=&quot;extension_user&quot;/&gt;<br><br>--------- extension_user.xml ---------<br>&lt;include&gt;<br>&nbsp;&nbsp;&nbsp; &lt;user id=&quot;1000&quot; mailbox=&quot;1000&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;params&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param name=&quot;password&quot; value=&quot;1234&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;param name=&quot;vm-password&quot; value=&quot;1000&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/params&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variables&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,international,local&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;accountcode&quot; value=&quot;1000&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;effective_caller_id_name&quot; value=&quot;NAME&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;effective_caller_id_number&quot; value=&quot;1000&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;outbound_caller_id_name&quot; value=&quot;$${outbound_caller_name}&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;outbound_caller_id_number&quot; value=&quot;$${outbound_caller_id}&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;variable name=&quot;callgroup&quot; value=&quot;techsupport&quot;/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/variables&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/user&gt;<br>&lt;/include&gt;<br>--------- extension_user.xml ---------<o:p></o:p></p></div></body></html>