[Freeswitch-svn] [commit] r5510 - in freeswitch/trunk/scripts/contrib/trixter/xml-curl: . modules
Freeswitch SVN
trixter at freeswitch.org
Fri Jul 6 22:10:28 EDT 2007
Author: trixter
Date: Fri Jul 6 22:10:28 2007
New Revision: 5510
Modified:
freeswitch/trunk/scripts/contrib/trixter/xml-curl/curlrouting.php
freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/configuration.php
freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php
Log:
changed the way the module interface works a bit so that it can signal errors
Modified: freeswitch/trunk/scripts/contrib/trixter/xml-curl/curlrouting.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-curl/curlrouting.php (original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-curl/curlrouting.php Fri Jul 6 22:10:28 2007
@@ -16,8 +16,9 @@
if(isset($_POST['section'])) {
if(isset($callBacks[$_POST['section']])) {
- call_user_func($callBacks[$_POST['section']]);
- exit;
+ if(call_user_func($callBacks[$_POST['section']])==TRUE) {
+ exit;
+ }
}
}
Header("HTTP/1.0 404 Not Found");
Modified: freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/configuration.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/configuration.php (original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/configuration.php Fri Jul 6 22:10:28 2007
@@ -13,6 +13,8 @@
$params['anounce-count'] = '2';
$params['max-mmebers'] = '15';
$params['energy-level'] = '300';
+ $params['member-flags'] = 'waste';
+
$digits['0'] = 'event';
$digits['1'] = 'event';
$digits['2'] = 'event';
@@ -33,11 +35,10 @@
if($smarty->template_exists($_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/templates/".$_SERVER['REMOTE_USER']."/".$template)) {
$smarty->display($_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/templates/".$_SERVER['REMOTE_USER']."/".$template);
} else {
- // //logCallData();
- error_log("Unable to locate template $template");
- $smarty->assign('CONFNAME',$_POST['key_value']);
- $smarty->display($_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF'])."/templates/".$_SERVER['REMOTE_USER']."/default.conf.tpl");
+ error_log("Unable to locate configuration file " . $_POST['key_value'] . " for " . $_SERVER['REMOTE_USER']);
+ return FALSE;
}
+ return TRUE;
}
// register the callback
Modified: freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php (original)
+++ freeswitch/trunk/scripts/contrib/trixter/xml-curl/modules/dialplan.php Fri Jul 6 22:10:28 2007
@@ -2,6 +2,7 @@
function dialplan()
{
global $_SERVER;
+ global $_POST;
// create a new smarty object
@@ -20,6 +21,8 @@
} // end - they were logged in
$smarty->display($_SERVER['DOCUMENT_ROOT']."/templates/".$_SERVER['REMOTE_USER']."/".$template);
+
+ return TRUE;
}
More information about the Freeswitch-svn
mailing list