From cb1d126c44ec2dcd2d2c5c118195e285c13b55d3 Mon Sep 17 00:00:00 2001 From: mcrane Date: Mon, 13 Jul 2009 16:10:08 -0600 Subject: FreeSWITCH add new dev package to seperate development from release. --- config/freeswitch_dev/freeswitch_status.tmp | 339 ++++++++++++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 config/freeswitch_dev/freeswitch_status.tmp (limited to 'config/freeswitch_dev/freeswitch_status.tmp') diff --git a/config/freeswitch_dev/freeswitch_status.tmp b/config/freeswitch_dev/freeswitch_status.tmp new file mode 100644 index 00000000..4fa4181a --- /dev/null +++ b/config/freeswitch_dev/freeswitch_status.tmp @@ -0,0 +1,339 @@ + + + + + + + + +

FreeSWITCH: Status

+ + + +
+ + +
+ +
+ + + + +
+ +
\n\n"; + + +$fp = event_socket_create($host, $port, $password); +$cmd = "api sofia status"; +$response = event_socket_request($fp, $cmd); +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo " sofia status \n"; +echo "\n"; +echo " \n"; +echo "
\n"; +echo "
\n";
+echo $response;
+echo "
\n"; +fclose($fp); +echo "

\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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo " sofia status profile $sip_profile_name \n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + if ($sip_profile_name == "external") { + echo " \n"; + } + else { + echo " \n"; + } + echo "
\n"; + echo "
\n";
+	echo $response;
+	echo "
\n"; + fclose($fp); + echo "

\n\n"; + +} + + +$fp = event_socket_create($host, $port, $password); +$cmd = "api status"; +$response = event_socket_request($fp, $cmd); +echo "status
\n"; +echo "
\n";
+echo $response;
+echo "
\n"; +fclose($fp); +echo "

\n\n"; + + +$fp = event_socket_create($host, $port, $password); +$cmd = "api show channels"; +$response = event_socket_request($fp, $cmd); +echo "show channels
\n"; +if (strlen($response) > 40) { + echo "\n"; +} +else { + echo "
\n";
+  echo $response;
+  echo "
\n"; +} +fclose($fp); +echo "

\n\n"; +echo "

\n\n"; + + +$fp = event_socket_create($host, $port, $password); +$cmd = "api show calls"; +$response = event_socket_request($fp, $cmd); +echo "show calls
\n"; +if (strlen($response) > 40) { + echo "\n"; +} +else { + echo "
\n";
+  echo $response;
+  echo "
\n"; +} +fclose($fp); +echo "

\n\n"; +echo "

\n\n"; + + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo "Backup / Restore
\n"; +echo "The 'backup' button will tar gzip /usr/local/freeswitch/ to /root/backup/freeswitch.bak.tgz it then presents a file to download. \n"; +echo "If the backup file does not exist in /root/backup/freeswitch.bak.tgz then the 'restore' button will be hidden. \n"; +echo "Use Diagnostics->Command->File to upload: to browse to the file and then click on upload it now ready to be restored. \n"; +echo "

\n"; +echo "
\n"; +echo " \n"; +if (file_exists('/root/backup/freeswitch.bak.tgz')) { + echo " \n"; +} +echo "
\n"; +echo "

\n\n"; + + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo "Call Detail Records
\n"; +echo "/usr/local/freeswitch/log/cdr-csv/Master.csv

\n"; +echo "
\n"; +echo " \n";echo "
\n"; +echo "

\n\n"; + + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "
\n"; +echo "Logs
\n"; +echo "/usr/local/freeswitch/log/cdr-csv/freeswitch.log

\n"; +echo "
\n"; +echo " \n"; +echo "
\n"; +echo "

\n\n"; + + +echo "tail -n 500 /usr/local/freeswitch/log/freeswitch.log
\n"; +echo "\n"; +echo "

\n\n"; + + +//$fp = event_socket_create($host, $port, $password); +//$cmd = "api sofia "; +//$response = event_socket_request($fp, $cmd); +//echo "api sofia
\n"; +//echo "
\n";
+//echo $response;
+//echo "
\n"; +//fclose($fp); +//echo "

\n\n"; + +?> + +
+ +
+ + + + -- cgit v1.2.3