hello, Guys:
I am trying to use asterisk manager command to monitoring the call between two clients. my manager is connected to asterisk server. but eventually, there is no record under /var/spool/asterisk/monitor and no error comes out from php. here is my code to record the calls:
$asterisk_ip = “192.168.0.88”;
$socket = fsockopen($asterisk_ip,“5038”, $errno, $errstr, $timeout);
fputs($socket, “Action: Login\r\n”);
fputs($socket, “UserName: myasterisk\r\n”);
fputs($socket, “Secret: mycode\r\n\r\n”);
$wrets=fgets($socket,128);
// echo $wrets;
fputs($socket, “Action: Monitor\r\n” );
fputs($socket, “Channel: SIP/$num\r\n” );
fputs($socket, “File: $num\r\n” );
fputs($socket, “Mix: 1\r\n” );
$wrets=fgets($socket,128);
// echo $wrets;
echo “done !!!”;
who knows this problem, please give me a hand.
thank you!