\n\n"; $fp = event_socket_create($host, $port, $password); $cmd = "api sofia status"; $response = event_socket_request($fp, $cmd); echo "
\n"; echo $response; echo "\n"; fclose($fp); echo " \n\n"; foreach (ListFiles($v_conf_dir.'/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 $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\n"; echo "
\n\n"; echo "
\n\n"; echo "tail -n 500 ".$v_log_dir."/".$v_name.".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"; ?> |