aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch/freeswitch_status.tmp
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-05-13 21:42:31 -0600
committermcrane <mctch@yahoo.com>2009-05-13 21:44:52 -0600
commitb2613d476cba2db27f51185cbdd821506652d5a1 (patch)
treea49eb412ef72a8710d81267471190fb8c4d295f0 /config/freeswitch/freeswitch_status.tmp
parentea7d76501e91a1ce0117bf1a6b2b3c9d43f95a49 (diff)
downloadpfsense-packages-b2613d476cba2db27f51185cbdd821506652d5a1.tar.gz
pfsense-packages-b2613d476cba2db27f51185cbdd821506652d5a1.tar.bz2
pfsense-packages-b2613d476cba2db27f51185cbdd821506652d5a1.zip
FreeSWITCH package show all profiles on the status page, fix internal.xml copy problem on new install
Diffstat (limited to 'config/freeswitch/freeswitch_status.tmp')
-rw-r--r--config/freeswitch/freeswitch_status.tmp67
1 files changed, 24 insertions, 43 deletions
diff --git a/config/freeswitch/freeswitch_status.tmp b/config/freeswitch/freeswitch_status.tmp
index ceccd89a..3c6b5231 100644
--- a/config/freeswitch/freeswitch_status.tmp
+++ b/config/freeswitch/freeswitch_status.tmp
@@ -181,50 +181,31 @@ echo "</pre>\n";
fclose($fp);
echo "<br /><br />\n\n";
+foreach (ListFiles('/usr/local/freeswitch/conf/sip_profiles') as $key=>$sip_profile_file){
+
+ $sip_profile_name = str_replace(".xml", "", $sip_profile_file);
+ $fp = event_socket_create($host, $port, $password);
+ $cmd = "api sofia status profile ".$sip_profile_name;
+ $response = event_socket_request($fp, $cmd);
+ echo "<table width='690' cellpadding='0' cellspacing='0' border='0'>\n";
+ echo "<tr>\n";
+ echo "<td width='50%'>\n";
+ echo " <b>sofia status profile $sip_profile_name</b> \n";
+ echo "</td>\n";
+ echo "<td width='50%' align='right'>\n";
+ echo " <input type='button' value='start' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+start';\" />\n";
+ echo " <input type='button' value='stop' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+stop';\" />\n";
+ echo " <input type='button' value='flush_inbound_reg' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+".$sip_profile_name."+flush_inbound_reg';\" />\n";
+ echo "</td>\n";
+ echo "</tr>\n";
+ echo "</table>\n";
+ echo "<pre style=\"font-size: 9pt;\">\n";
+ echo $response;
+ echo "</pre>\n";
+ fclose($fp);
+ echo "<br /><br />\n\n";
-$fp = event_socket_create($host, $port, $password);
-$cmd = "api sofia status profile internal";
-$response = event_socket_request($fp, $cmd);
-echo "<table width='690' cellpadding='0' cellspacing='0' border='0'>\n";
-echo "<tr>\n";
-echo "<td width='50%'>\n";
-echo " <b>sofia status profile internal</b> \n";
-echo "</td>\n";
-echo "<td width='50%' align='right'>\n";
-echo " <input type='button' value='start' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+internal+start';\" />\n";
-echo " <input type='button' value='stop' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+internal+stop';\" />\n";
-echo " <input type='button' value='flush_inbound_reg' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+internal+flush_inbound_reg';\" />\n";
-echo "</td>\n";
-echo "</tr>\n";
-echo "</table>\n";
-echo "<pre style=\"font-size: 9pt;\">\n";
-echo $response;
-echo "</pre>\n";
-fclose($fp);
-echo "<br /><br />\n\n";
-
-
-$fp = event_socket_create($host, $port, $password);
-$cmd = "api sofia status profile external";
-$response = event_socket_request($fp, $cmd);
-echo "<table width='690' cellpadding='0' cellspacing='0' border='0'>\n";
-echo "<tr>\n";
-echo "<td width='50%'>\n";
-echo " <b>sofia status profile external</b> \n";
-echo "</td>\n";
-echo "<td width='50%' align='right'>\n";
-echo " <input type='button' value='start' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+external+start+reloadxml';\" />\n";
-echo " <input type='button' value='stop' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+external+stop';\" />\n";
-echo " <input type='button' value='restart' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+external+restart+reloadxml';\" />\n";
-echo " <input type='button' value='rescan' onclick=\"document.location.href='/packages/freeswitch/freeswitch_cmd.php?cmd=api+sofia+profile+external+rescan+reloadxml';\" />\n";
-echo "</td>\n";
-echo "</tr>\n";
-echo "</table>\n";
-echo "<pre style=\"font-size: 9pt;\">\n";
-echo $response;
-echo "</pre>\n";
-fclose($fp);
-echo "<br /><br />\n\n";
+}
$fp = event_socket_create($host, $port, $password);