<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi. Before I go to far down this path, I wonder if what I intend to do is not a good practice.<div><br></div><div>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,</div><div><br></div><div><div>$response = <<< XML</div><div><?xml version="1.0" encoding="UTF-8" standalone="no"?></div><div><document type="freeswitch/xml"></div><div> <section name="dialplan" description="example_curl_dialplan"></div><div> <context name="public"></div><div> <extension name="curl_test"></div><div> <condition field="destination_number" expression="^(\+1|1?)(5844111)$"></div><div> <action application="javascript" data="demos/stest-examp-st.js" /></div><div> </condition></div><div> </extension></div><div> </context></div><div> </section></div><div></document></div><div>XML;</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>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:</div><div>session.collectInput(onInputsml, "emptyobject", 7000);</div><div apple-content-edited="true"> <span class="Apple-style-span" style="font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">--</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Greg Thoen</font></p></div></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>