04-17-2015, 02:27 AM
We have 8 T48G phones running. I periodically push xml to them and it works fine. I just bought 3 more and none of them will display the
xml that is pushed. I upgraded all the phones to the latest firmware
and reset to factory defaults but it did not fix the problem.
I wiresharked the push and the xml is sending and the phone sends an "OK" response back. It's just that the data never displays.
Below is a test script...
10.0.2.27 works - old phone
10.0.2.28 does not work - new phone (tried two different new phones)
10.0.2.29 works - old phone
xml that is pushed. I upgraded all the phones to the latest firmware
and reset to factory defaults but it did not fix the problem.
I wiresharked the push and the xml is sending and the phone sends an "OK" response back. It's just that the data never displays.
Below is a test script...
10.0.2.27 works - old phone
10.0.2.28 does not work - new phone (tried two different new phones)
10.0.2.29 works - old phone
Code:
<?php
#
function push2phone($server,$phone,$data) {
$xml = "xml=".$data;
$post = "POST / HTTP/1.1\r\n";
$post .= "Host: $phone\r\n";
$post .= "Referer: $server\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 ( $phone, 80, $errno, $errstr, 5);
if($fp) {
fputs($fp, $post.$xml);
flush();
fclose($fp);
}
}
##############################
$xml="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n <YealinkIPPhoneStatus Beep = \"no\" SessionID=\"String\" Timeout = \"0\">\n";
$xml .="<Message Size=\"large\" Align=\"left\" Color=\"green\" >" .date("F j, Y, g:i a") . "</Message>\n";
$xml .= "</YealinkIPPhoneStatus >\n";
push2phone("10.0.0.3","10.0.2.28",$xml);
push2phone("10.0.0.3","10.0.2.27",$xml);
push2phone("10.0.0.3","10.0.2.29",$xml);
?>