//This program is free software; you can redistribute it and/or //modify it under the terms of the GNU General Public License //as published by the Free Software Foundation; either version 2 //of the License, or (at your option) any later version. // //This program is distributed in the hope that it will be useful, //but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //GNU General Public License for more details. isset($_REQUEST['action']) ? $action = $_REQUEST['action'] : ($action = ''); isset($_REQUEST['phpagiid']) ? $phpagiid = $_REQUEST['phpagiid'] : ($phpagiid = ''); $dispnum = 5; //used for switch on config.php switch ($action) { case "edit": phpagiconf_update($_REQUEST['id'], $_REQUEST['debug'], $_REQUEST['error_handler'], $_REQUEST['err_email'], $_REQUEST['hostname'], $_REQUEST['tempdir'], $_REQUEST['festival_text2wave'], $_REQUEST['asman_server'], $_REQUEST['asman_port'], $_REQUEST['asmanager'], $_REQUEST['cepstral_swift'], $_REQUEST['cepstral_voice'], $_REQUEST['setuid'], $_REQUEST['basedir']); phpagiconf_gen_conf(); needreload(); break; case "add": phpagiconf_add($_REQUEST['debug'], $_REQUEST['error_handler'], $_REQUEST['err_email'], $_REQUEST['hostname'], $_REQUEST['tempdir'], $_REQUEST['festival_text2wave'], $_REQUEST['asman_server'], $_REQUEST['asman_port'], $_REQUEST['asmanager'], $_REQUEST['cepstral_swift'], $_REQUEST['cepstral_voice'], $_REQUEST['setuid'], $_REQUEST['basedir']); phpagiconf_gen_conf(); needreload(); break; } //this function needs to be available to other modules (those that use goto destinations) //therefore we put it in globalfunctions.php $phpagiconf = phpagiconf_get(); ?> </div>
$hostname = isset($_REQUEST['hostname']) ? $_REQUEST['hostname'] : 'freepbx.example.com'; $tempdir = isset($_REQUEST['tempdir']) ? $_REQUEST['tempdir'] : '/tmp'; $festival_text2wave = isset($_REQUEST['festival_text2wave']) ? $_REQUEST['festival_text2wave'] : '/usr/bin/text2wave'; $asman_server = isset($_REQUEST['asman_server']) ? $_REQUEST['asman_server'] : 'localhost'; $asman_port = isset($_REQUEST['asman_port']) ? $_REQUEST['asman_port'] : '5038'; $asmanager = isset($_REQUEST['asmanager']) ? $_REQUEST['asmanager'] : ''; // This comes from the API module $cepstral_swift = isset($_REQUEST['cepstral_swift']) ? $_REQUEST['cepstral_swift'] : '/opt/swift/bin/swift'; $cepstral_voice = isset($_REQUEST['cepstral_voice']) ? $_REQUEST['cepstral_voice'] : 'David'; $setuid = isset($_REQUEST['setuid']) ? $_REQUEST['setuid'] : '0'; $basedir = isset($_REQUEST['basedir']) ? $_REQUEST['basedir'] : '/var/lib/asterisk/agi-bin/'; $dispnum = "phpagiconf"; //used for switch on config.php switch ($action) { case "edit": phpagiconf_update($id, $debug, $error_handler, $err_email, $hostname, $tempdir, $festival_text2wave, $asman_server, $asman_port, $asmanager, $cepstral_swift, $cepstral_voice, $setuid, $basedir); phpagiconf_gen_conf(); needreload(); break; case "add": phpagiconf_add($debug, $error_handler, $err_email, $hostname, $tempdir, $festival_text2wave, $asman_server, $asman_port, $asmanager, $cepstral_swift, $cepstral_voice, $setuid, $basedir); phpagiconf_gen_conf(); needreload(); break; } //this function needs to be available to other modules (those that use goto destinations) //therefore we put it in globalfunctions.php $phpagiconf = phpagiconf_get(); ?> </div>