[Freeswitch-users] Freeswitch and mysql

Duane Gilbert Duane.Gilbert at patlive.com
Sun Feb 6 22:06:22 MSK 2011


This is interesting....Nice to know that we were doing something right...mod_xml_curl....

 

I did not get a chance to look at the php example...I will have a look when I have a free moment...

 

- Duane

 

From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Antonio
Sent: Sunday, February 06, 2011 11:07 AM
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] Freeswitch and mysql

 

El 19/01/11 22:16, Avi Marcus escribió: 

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. 

You are asking how to use a database (any, not just mysql) to configure the dialplan - users, extensions, conferences, whatever.

1) You can use lua to process the calls and have it query your database

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.

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.

I myself use php to query a mysql database for how much to charge for the call, a custom LCR implementation, etc.

I posted the basic classes to github a while ago:  https://github.com/avimar/FreeSWITCH-mod_xml-with-PHP

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:  intralanman/PHP/fs_curl

-Avi Marcus

 

Hi

Thanks for everyone's responses, are really helping me to really know to look for and how to document ;-). I had thought one thing and I have a question: Could use python for this cause?. I'll look at me while the modules that have told me;-). Thank you very much.


Regards

<action application="python" data="extension_user"/>

--------- extension_user.xml ---------
<include>
    <user id="1000" mailbox="1000">
        <params>
            <param name="password" value="1234"/>
            <param name="vm-password" value="1000"/>
        </params>
        <variables>
            <variable name="toll_allow" value="domestic,international,local"/>
            <variable name="accountcode" value="1000"/>
            <variable name="user_context" value="default"/>
            <variable name="effective_caller_id_name" value="NAME"/>
            <variable name="effective_caller_id_number" value="1000"/>
            <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
            <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
            <variable name="callgroup" value="techsupport"/>
        </variables>
    </user>
</include>
--------- extension_user.xml ---------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110206/358f0d50/attachment-0001.html 


More information about the FreeSWITCH-users mailing list