Hi guys. Sorry for been a newbie on all this. And thank you for your help in advanced. Here is the scenario I am trying to accomplish. I would like to have the phone number inside a database not in the extension.xml file. Here is what I am trying to do. Create a let's say 1001.xml file ( if needed ) but that file instead of having the phone number to be dialed, go to MySQL and look for the phone number there. Or when freeswitch is told to call that extension instead of looking for the 1001.xml file go directly to mysql to look for the phone number associated to that extension to dial it out. That way the phone numbers are always kept private at all times. What we are doing is.
From the webserver customer clicks on a link -> link dials the phone number in the xml file automatically but I would like to keep the phone number on the DB server not in the xml file. Can anyone point me please in the right direction? Really appreciated. Ed
A couple of options there. ESL, mod_xml_curl or even mod_python, mod_spidermonkey, lua, etc... Pick your flavor. João Mesquita On Fri, Jan 29, 2010 at 12:04 PM, Edward Q. <q.edward@gmail.com> wrote:
Hi guys. Sorry for been a newbie on all this. And thank you for your help in advanced. Here is the scenario I am trying to accomplish. I would like to have the phone number inside a database not in the extension.xml file. Here is what I am trying to do. Create a let's say 1001.xml file ( if needed ) but that file instead of having the phone number to be dialed, go to MySQL and look for the phone number there. Or when freeswitch is told to call that extension instead of looking for the 1001.xml file go directly to mysql to look for the phone number associated to that extension to dial it out. That way the phone numbers are always kept private at all times. What we are doing is. From the webserver customer clicks on a link -> link dials the phone number in the xml file automatically but I would like to keep the phone number on the DB server not in the xml file. Can anyone point me please in the right direction? Really appreciated. Ed
_______________________________________________ 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
Agreed- you have lots of options. A side note though- if your requirement is that the number is kept private from freeswitch, you're going to run into issues. Freeswitch will eventually have to know the number in order to call it, and it will log its activity... so if there are people who aren't supposed to see the number but can see 1001.xml, they could also see the freeswitch logs. They could also open the fs_cli and see activity there. I guess you could lock everything like that down but just things to think through if that kind of compartmentalization is a big requirement. Rob On Jan 29, 2010, at 8:33 AM, João Mesquita wrote:
A couple of options there.
ESL, mod_xml_curl or even mod_python, mod_spidermonkey, lua, etc...
Pick your flavor.
João Mesquita
On Fri, Jan 29, 2010 at 12:04 PM, Edward Q. <q.edward@gmail.com> wrote: Hi guys. Sorry for been a newbie on all this. And thank you for your help in advanced. Here is the scenario I am trying to accomplish. I would like to have the phone number inside a database not in the extension.xml file. Here is what I am trying to do. Create a let's say 1001.xml file ( if needed ) but that file instead of having the phone number to be dialed, go to MySQL and look for the phone number there. Or when freeswitch is told to call that extension instead of looking for the 1001.xml file go directly to mysql to look for the phone number associated to that extension to dial it out. That way the phone numbers are always kept private at all times. What we are doing is. From the webserver customer clicks on a link -> link dials the phone number in the xml file automatically but I would like to keep the phone number on the DB server not in the xml file. Can anyone point me please in the right direction? Really appreciated. Ed
_______________________________________________ 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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Edward, I am building a dialplan that runs almost everything out of a database, and what seemed easiest was to use mod_xml_curl and a php script (substitute your favorite language here). When a call comes in, FS makes a query to the web server. A PHP script looks at the posted values, and if it matches certain criteria (I usually match on context first, before I do anything.), a small piece of XML dialplan is returned. Usually what I do is return an extension with a pattern match that will always match what is dialed, along with the actions I want FS to take. In this way, the PHP script is handling all the decision making - FS only posts the call data, and the exact action to take is returned. I'm not using the XML files for dialplan at all - it is rendered on the fly by PHP. The other nice thing about this is that it scales very well. The web server, database, and FS components can all be on separate boxes if it's a very high volume environment. mod_xml_curl can be set up with multiple failover options. If you want to mix and match text vs. curl XML dialplan, just have some logic in your script that returns only the root tags if the call doesn't match one of the database driven extensions. FS will include the returned result in with the XML dialplan, so the call can match either. Good luck! - -Tim Edward Q. wrote:
Hi guys. Sorry for been a newbie on all this. And thank you for your help in advanced. Here is the scenario I am trying to accomplish. I would like to have the phone number inside a database not in the extension.xml file. Here is what I am trying to do. Create a let's say 1001.xml file ( if needed ) but that file instead of having the phone number to be dialed, go to MySQL and look for the phone number there. Or when freeswitch is told to call that extension instead of looking for the 1001.xml file go directly to mysql to look for the phone number associated to that extension to dial it out. That way the phone numbers are always kept private at all times. What we are doing is. From the webserver customer clicks on a link -> link dials the phone number in the xml file automatically but I would like to keep the phone number on the DB server not in the xml file. Can anyone point me please in the right direction? Really appreciated. Ed
------------------------------------------------------------------------
_______________________________________________ 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
- -- Tim St. Pierre IP Voice technician Communicate Freely 1-877-291-8647 x5101 sip:5101@communicatefreely.net tim@communicatefreely.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQCVAwUBS2L36IqVcvNCnHOrAQJMogP+IBLyGOmMUmIU/n8qjXSNz4lctDAAbove zpmGOhWfZ9iWX98ZnKeY+wLVcTfyOBpM4dY/SFIaPlP7fJGCDVG1X3AS4wldd0uK Z1EvcVqMdI6vb3mba0ifK3fo19x93n81K8XKbCBP8VA+ShS2ppAeIBAbSrjCNC1f HcL/daVvJgQ= =ao0a -----END PGP SIGNATURE-----
participants (4)
-
Edward Q.
-
João Mesquita
-
Rob Forman
-
Tim St. Pierre