[Freeswitch-users] Blind dialed number

Tim St. Pierre tim at communicatefreely.net
Fri Jan 29 06:59:53 PST 2010


-----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 at 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 at communicatefreely.net
tim at 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-----




More information about the FreeSWITCH-users mailing list