[Freeswitch-users] Incorrect method of PHP call control?
Greg Thoen
gregt at cgicommunications.com
Mon Aug 31 08:22:08 PDT 2009
Hi. Before I go to far down this path, I wonder if what I intend to do
is not a good practice.
I started using mod_xml_curl to use PHP on localhost to generate a
dialplan dynamically, based on the Caller-Destination-Number variable
that is posted. It prints out the XML that calls the javascript that
then controls the call. For example,
$response = <<< XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="dialplan" description="example_curl_dialplan">
<context name="public">
<extension name="curl_test">
<condition field="destination_number" expression="^(\+1|1?)
(5844111)$">
<action application="javascript" data="demos/stest-examp-
st.js" />
</condition>
</extension>
</context>
</section>
</document>
XML;
Then I thought, that's silly to go back out to javascript to handle
the actions, playing files, using pocketsphinx, etc. I should just
stay in PHP, using esl.php to answer and handle the call.
Then I rethought, is that a good practice to take over the call
control from freeswitch at that point, while it is in the xml-curl
dialplan hunt?
Then I also thought, is it even possible to do some of the things I
need to do from the php esl, like the equivalent of this javascript:
session.collectInput(onInputsml, "emptyobject", 7000);
--
Greg Thoen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090831/3cf1007a/attachment-0002.html
More information about the FreeSWITCH-users
mailing list