09-15-2015, 09:33 PM
Hello,
i want to generate a call with a php script.
With my script, nothing happens.
Where did I made something wrong?
192.168.0.10 is the ip-address of my phone and 192.168.0.29 of my pc
Cheers,
Daniel
I forget to save the server ip into the phone configuration.
Now it works.
i want to generate a call with a php script.
With my script, nothing happens.
Where did I made something wrong?
PHP Code:
$xml = '<?xml version="1.0" encoding="ISO-8859-1"?>';
$xml.= '<YealinkIPPhoneExecute Beep="yes">';
$xml.= '<ExecuteItem URI="Dial:12345" />';
$xml.= '<ExecuteItem URI="Led:LINE1=on"/>';
$xml.= '<ExecuteItem URI="Led:LINE2=off"/>';
$xml.= '</YealinkIPPhoneExecute>';
$xml = "xml=".$xml;
$post = "POST / HTTP/1.1\r\n";
$post .= "Host: 192.168.0.10\r\n";
$post .= "Referer: 192.168.0.29\r\n";
$post .= "Connection: Keep-Alive\r\n";
$post .= "Content-Type: text/xml\r\n";
$post .= "Content-Length: ".strlen($xml)."\r\n\r\n";
$fp = @fsockopen ( '192.168.0.10', 80, $errno, $errstr, 5);
if($fp)
{
fputs($fp, $post.$xml);
flush();
fclose($fp);
}
192.168.0.10 is the ip-address of my phone and 192.168.0.29 of my pc
Cheers,
Daniel
I forget to save the server ip into the phone configuration.
Now it works.