Specifications

XML Browser Developer’s Guide for Yealink SIP-T4X IP Phones
46
</SoftKey>
</YealinkIPPhoneTextMenu>
The screenshot of the SIP-T46G 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.
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. Any applications that construct
HTTP packets on the fly 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:
<?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);