Hello, Guys:
I have a problem in monitoring the calls by using Asterisk Manager. when this code is run, there is nothing in /var/spool/asterisk/monitor. it shoud have a file with .gsm or wav. My code is like this as follow:
$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);
if anyone knows this, please help me!
regards!