Hi,
A little problem here, I made a small PHP script for hangup of a active channel. But the problem is - to hangup a channel you have to know the whole channel info:
“SIP/101-0000000e”
How can i just tell AGI to hangup on a channel of a SIP number 101 - without knowing the bold number or letters (preferably with an wild card)?!?
The part of the script:
$socket = fsockopen($asterisk_ip,"5038", $errno, $errstr, $timeout);
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: $user\r\n");
fputs($socket, "Secret: $pass\r\n\r\n");
fputs($socket, "Action: Hangup\r\n" );
fputs($socket, "Channel: SIP/101\r\n" );
fputs($socket, "Async: yes\r\n\r\n" );
fputs($Socket, "Events: on\r\n");
fputs($Socket, "Action: Logoff\r\n\r\n");