Best way to implement real-time ivr from mysql
Hello list, I'm trying to implement a flexible, but easy to administer IVR system for our multi-tenant PBX. My goal is to be able to build a flexible auto-attendent scheme for incoming calls, based on data in a mysql database. The functionality I need is: -Different options based on time of day -Playback of 1-2 audio files while listening for digits (Thank you for calling abc company) -Single digit options set some variables, then transfer to a defined extension (press 1 for sales) -Multi-digit options are checked against a pattern, then a transfer is executed (enter the extension now ...) Not very complicated, I know, but making it scale is tricky. I have tried LUA, but LuaSQL has issues. Even using ODBC, I still get memory leaks and random errors with file handles etc. For the most part, I haven't had any issues with xml_curl getting config from another server that generates it with PHP. I'm exploring this, but it looks like I'll have to implement the following logic: -Call comes in, and a dialplan is returned that plays the greetings, sets some variables, and does a play_and_get_digits, followed by a transfer back to the dialplan, so we can figure out what to do based on the digits. -The callback to the dialplan evaluates the dtmf presented, and decides what action to take, returning that in another dialplan piece. I think this could work. but it means that a dialplan lookup has to be done each time someone makes a selection. Is there a better way, or does that make the most sense? Thanks! -Tim
Tim, which ODBC is that ? the one integrated in FreeSWITCH that you can call from LUA with freeswitch.Dbh() ? I would say that solving those issues would be a better way to achieve this, for you and for everyone around. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 09/02/2011 à 17:56, Tim St. Pierre a écrit :
Hello list,
I'm trying to implement a flexible, but easy to administer IVR system for our multi-tenant PBX.
My goal is to be able to build a flexible auto-attendent scheme for incoming calls, based on data in a mysql database.
The functionality I need is: -Different options based on time of day -Playback of 1-2 audio files while listening for digits (Thank you for calling abc company) -Single digit options set some variables, then transfer to a defined extension (press 1 for sales) -Multi-digit options are checked against a pattern, then a transfer is executed (enter the extension now ...)
Not very complicated, I know, but making it scale is tricky.
I have tried LUA, but LuaSQL has issues. Even using ODBC, I still get memory leaks and random errors with file handles etc.
For the most part, I haven't had any issues with xml_curl getting config from another server that generates it with PHP. I'm exploring this, but it looks like I'll have to implement the following logic: -Call comes in, and a dialplan is returned that plays the greetings, sets some variables, and does a play_and_get_digits, followed by a transfer back to the dialplan, so we can figure out what to do based on the digits. -The callback to the dialplan evaluates the dtmf presented, and decides what action to take, returning that in another dialplan piece.
I think this could work. but it means that a dialplan lookup has to be done each time someone makes a selection.
Is there a better way, or does that make the most sense?
Thanks!
-Tim
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I haven't heard of any lua sql issues.. I'd keep looking into that. Otherwise, I'm pretty happy with the flexibility and performance afforded to me by xml_curl (running nginx + php5-fpm. run mysql tuner and increase cache, also...). I have a php class with a bit of abstraction for XML and dialplan functions (but nothing specific for IVR). You can find it at: https://github.com/avimar/FreeSWITCH-mod_xml-with-PHP -Avi Marcus <https://github.com/avimar/FreeSWITCH-mod_xml-with-PHP> On Wed, Feb 9, 2011 at 7:05 PM, David Ponzone <david.ponzone@ipeva.fr>wrote:
Tim,
which ODBC is that ? the one integrated in FreeSWITCH that you can call from LUA with freeswitch.Dbh() ? I would say that solving those issues would be a better way to achieve this, for you and for everyone around.
David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34
Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com
*Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. **IPeva** décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.* * *
Le 09/02/2011 à 17:56, Tim St. Pierre a écrit :
Hello list,
I'm trying to implement a flexible, but easy to administer IVR system for our multi-tenant PBX.
My goal is to be able to build a flexible auto-attendent scheme for incoming calls, based on data in a mysql database.
The functionality I need is: -Different options based on time of day -Playback of 1-2 audio files while listening for digits (Thank you for calling abc company) -Single digit options set some variables, then transfer to a defined extension (press 1 for sales) -Multi-digit options are checked against a pattern, then a transfer is executed (enter the extension now ...)
Not very complicated, I know, but making it scale is tricky.
I have tried LUA, but LuaSQL has issues. Even using ODBC, I still get memory leaks and random errors with file handles etc.
For the most part, I haven't had any issues with xml_curl getting config from another server that generates it with PHP. I'm exploring this, but it looks like I'll have to implement the following logic: -Call comes in, and a dialplan is returned that plays the greetings, sets some variables, and does a play_and_get_digits, followed by a transfer back to the dialplan, so we can figure out what to do based on the digits. -The callback to the dialplan evaluates the dtmf presented, and decides what action to take, returning that in another dialplan piece.
I think this could work. but it means that a dialplan lookup has to be done each time someone makes a selection.
Is there a better way, or does that make the most sense?
Thanks!
-Tim
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
if you use lua, use Freeswitch.dbh, you may want to have a look at http://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh
Actually, no. I was using the lua odbc library that I installed from a package. I didn't know about Dbh() That might solve some problems, as I don't really have any issues with Freeswitch using ODBC for core and things like voicemail. It's only when I want to interact with it from a script that it's a problem. xml_curl is working very nicely for routing, directory, and config, but this may be a better solution for things like IVR and other more complicated features. Thanks! -Tim David Ponzone wrote:
Tim,
which ODBC is that ? the one integrated in FreeSWITCH that you can call from LUA with freeswitch.Dbh() ? I would say that solving those issues would be a better way to achieve this, for you and for everyone around.
David Ponzone Direction Technique email: david.ponzone@ipeva.fr <mailto:david.ponzone@ipeva.fr> tel: 01 74 03 18 97 gsm: 06 66 98 76 34
Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr <BLOCKED::http://www.ipeva.fr/> - www.ipeva-studio.com <BLOCKED::http://www.ipeva-studio.com/>
/Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. /*/IPeva/*/ décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur./ / /
Le 09/02/2011 à 17:56, Tim St. Pierre a écrit :
Hello list,
I'm trying to implement a flexible, but easy to administer IVR system for our multi-tenant PBX.
My goal is to be able to build a flexible auto-attendent scheme for incoming calls, based on data in a mysql database.
The functionality I need is: -Different options based on time of day -Playback of 1-2 audio files while listening for digits (Thank you for calling abc company) -Single digit options set some variables, then transfer to a defined extension (press 1 for sales) -Multi-digit options are checked against a pattern, then a transfer is executed (enter the extension now ...)
Not very complicated, I know, but making it scale is tricky.
I have tried LUA, but LuaSQL has issues. Even using ODBC, I still get memory leaks and random errors with file handles etc.
For the most part, I haven't had any issues with xml_curl getting config from another server that generates it with PHP. I'm exploring this, but it looks like I'll have to implement the following logic: -Call comes in, and a dialplan is returned that plays the greetings, sets some variables, and does a play_and_get_digits, followed by a transfer back to the dialplan, so we can figure out what to do based on the digits. -The callback to the dialplan evaluates the dtmf presented, and decides what action to take, returning that in another dialplan piece.
I think this could work. but it means that a dialplan lookup has to be done each time someone makes a selection.
Is there a better way, or does that make the most sense?
Thanks!
-Tim
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------------------------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I am quite happy with FS odbc access, but I don't use it extensively. The only issue I have with it is the syntax to access the data, which I find less intuitive than with luaSQL. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 10/02/2011 à 03:09, Tim St. Pierre a écrit :
Actually, no.
I was using the lua odbc library that I installed from a package. I didn't know about Dbh() That might solve some problems, as I don't really have any issues with Freeswitch using ODBC for core and things like voicemail. It's only when I want to interact with it from a script that it's a problem.
xml_curl is working very nicely for routing, directory, and config, but this may be a better solution for things like IVR and other more complicated features.
Thanks!
-Tim
David Ponzone wrote:
Tim,
which ODBC is that ? the one integrated in FreeSWITCH that you can call from LUA with freeswitch.Dbh() ? I would say that solving those issues would be a better way to achieve this, for you and for everyone around.
David Ponzone Direction Technique email: david.ponzone@ipeva.fr <mailto:david.ponzone@ipeva.fr> tel: 01 74 03 18 97 gsm: 06 66 98 76 34
Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr <BLOCKED::http://www.ipeva.fr/> - www.ipeva-studio.com <BLOCKED::http://www.ipeva-studio.com/>
/Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. /*/IPeva/*/ décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur./ / /
Le 09/02/2011 à 17:56, Tim St. Pierre a écrit :
Hello list,
I'm trying to implement a flexible, but easy to administer IVR system for our multi-tenant PBX.
My goal is to be able to build a flexible auto-attendent scheme for incoming calls, based on data in a mysql database.
The functionality I need is: -Different options based on time of day -Playback of 1-2 audio files while listening for digits (Thank you for calling abc company) -Single digit options set some variables, then transfer to a defined extension (press 1 for sales) -Multi-digit options are checked against a pattern, then a transfer is executed (enter the extension now ...)
Not very complicated, I know, but making it scale is tricky.
I have tried LUA, but LuaSQL has issues. Even using ODBC, I still get memory leaks and random errors with file handles etc.
For the most part, I haven't had any issues with xml_curl getting config from another server that generates it with PHP. I'm exploring this, but it looks like I'll have to implement the following logic: -Call comes in, and a dialplan is returned that plays the greetings, sets some variables, and does a play_and_get_digits, followed by a transfer back to the dialplan, so we can figure out what to do based on the digits. -The callback to the dialplan evaluates the dtmf presented, and decides what action to take, returning that in another dialplan piece.
I think this could work. but it means that a dialplan lookup has to be done each time someone makes a selection.
Is there a better way, or does that make the most sense?
Thanks!
-Tim
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
------------------------------------------------------------------------
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Avi Marcus
-
David Ponzone
-
garmt.noname@gmail.com
-
Tim St. Pierre