The mod_xml_curl Dialplan
In this section we'll show you how you can handle the book_test
dialplan context with mod_xml_curl
and let all other contexts fall back to the static XML Dialplan. Add the following dialplan.php
file to the same subfolder as your index.php
file:
<?php if ( !array_key_exists( 'Hunt-Context', $_REQUEST ) ||$_REQUEST['Hunt-Context'] != 'book_test' ) { not_found('not our context'); } print "<document type=\"freeswitch/xml\">\n"; print " <section name=\"dialplan\">\n"; print " <context name=\"${_REQUEST['Hunt-Context']}\">\n"; print " <extension name=\"no_name\">\n"; print " <condition>\n"; print " <action application=\"info\">\n"; print " </condition>\n"; print " </extension>\n"; print " </context>\n"; print " </section>\n"; print "</document>\n";
FreeSWITCH will send many POST parameters to our web application on every request....