Yealink Forums
T22P - Push XML Error: ip don't match or xml content is wrong - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Phone specific topic (/forumdisplay.php?fid=12)
+---- Forum: T2xP Series (/forumdisplay.php?fid=21)
+---- Thread: T22P - Push XML Error: ip don't match or xml content is wrong (/showthread.php?tid=3505)



T22P - Push XML Error: ip don't match or xml content is wrong - janeuner - 03-24-2015 03:06 AM

I am encountering difficulties when trying to make use of the Push XML features described in the XML Browser Development guide (V73). My evaluation device is a Yealink T22P running firmware version 7.73.0.50.

The phone configuration includes this parameter:
Quote:push_xml.server = 192.168.22.162

The following HTTP request is sent from 192.168.22.162 to the phone:
Quote:POST / HTTP/1.1
Referer: http://192.168.22.162/
Content-Type: text/xml
Host: 192.168.22.35
Content-Length: 116
Connection: Keep-Alive

<YealinkIPPhoneTextScreen Beep="yes" Timeout="15"><Title>Heading</Title><Text>Text</Text></YealinkIPPhoneTextScreen>

The phone sends with a 200 OK response to complete the HTTP transaction. No TextMessage appears on the phone's screen. This message appears in the logs:
Quote: WEB <4+warnin> ip:192.168.22.162 Push XML Error: ip don't match or xml content is wrong

Please advise. See attached pcap, config, and syslog.

[attachment=1373] [attachment=1374] [attachment=1376]


RE: T22P - Push XML Error: ip don't match or xml content is wrong - James_Yealink - 03-24-2015 04:12 AM

Hi Janeuner,

I find this parameter "Referer: http://192.168.22.162/" in your pcap trace. Can you change it to 192.168.22.162 and check again?

Attached is a working pcap trace.

When you push a XML to phone please note:
1. Edit the php file.
2. Add the server address to phone.

If it still doesn't work in your side, can you send me the php file, I will check it.

Regards,
James


RE: T22P - Push XML Error: ip don't match or xml content is wrong - janeuner - 03-24-2015 04:59 AM

Actually, I was testing it out with a .NET app. I pulled up the PHP code and found my issue.



Quote:The HTTP POST packet must contain an “xml=” line in the message body.

Code:
function push2phone($server,$phone,$data)
{
  $xml = "xml=".$data;
  ...
}

It is a rather unusual convention, to use application/x-www-form-urlencoded key-value pairs with a text/xml media type. But that little change has set me on the right path at least.

FYI, the current firmware seems to ignore the contents of the referer header.

Thanks for the quick feedback!