![Yealink SIP VP-T49G Developer'S Manual Download Page 91](http://html2.mh-extra.com/html/yealink/sip-vp-t49g/sip-vp-t49g_developers-manual_3250215091.webp)
Yealink IP Phone XML Objects
81
The screenshot of the IP phone user interface for reference is shown as below:
The phone can request an XML object via HTTP GET, or an object can be pushed to the
phone via a POST. The phone parses this object immediately upon receipt and
displays the information on the screen. You can ask the distributor or Yealink FAE for
php source code or obtain php source code online:
http://support.yealink.com/documentFront/forwardToDocumentFrontDisplayPage
The HTTP POST packet must contain an “xml=” line in the message body. XML data is
located after the equals sign in the message. HTML forms that post objects to the
phone must use a field named “xml” to send data. The applications that construct
HTTP packets must also specify this line.
To accept a pushed message, the “PushXML_ServerIP” parameter on the phone must
be configured as the IP address of the push XML server. For more information, refer to
Configuring the Push XML Server Address
Description of the object oriented php class (the red contents are needed to modify):
<?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);
Summary of Contents for SIP VP-T49G
Page 1: ...i i...
Page 2: ......
Page 10: ......
Page 94: ...XML Browser Developer s Guide for Yealink IP Phones 84...
Page 96: ...XML Browser Developer s Guide for Yealink IP Phones 86...
Page 98: ...XML Browser Developer s Guide for Yealink IP Phones 88...
Page 99: ...Configure the Push XML Server 89...
Page 116: ...XML Browser Developer s Guide for Yealink IP Phones 106...