<?php
$conferece=$_GET['conference'];
$action=$_GET['action'];
if($action=="hold"){
$command="channel originate Local/600@hold-context extension $conferece@contextConfBridges";
}
elseif($action=="resume"){
}
$socket = fsockopen("127.0.0.1","7831", $errno, $errstr,60);
if (!$socket){
echo "$errstr ($errno)\n";
}else{
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: admin\r\n");
fputs($socket, "Secret: 113333\r\n\r\n");
fputs($socket, "Action: Command\r\n");
fputs($socket, "Command: $command\r\n\r\n");
fputs($socket, "Action: Logoff\r\n\r\n");
while (!feof($socket)){
echo fgets($socket).'<br>';
}
fclose($socket);
}
No hay comentarios:
Publicar un comentario