<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&nbsp;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 = &lt;&lt;&lt; XML</div><div>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;</div><div>&lt;document type="freeswitch/xml"&gt;</div><div>&nbsp;&nbsp;&lt;section name="dialplan" description="example_curl_dialplan"&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;context name="public"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;extension name="curl_test"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;condition field="destination_number" expression="^(\+1|1?)(5844111)$"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="javascript" data="demos/stest-examp-st.js" /&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/condition&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;/extension&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;/context&gt;</div><div>&nbsp;&nbsp;&lt;/section&gt;</div><div>&lt;/document&gt;</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>