Configuring The Push Xml Server - Yealink SIP-T48G User Manual

Sip-t2 series sip-t19e2 series sip-t19pe2 series sip-t4 series
Hide thumbs Also See for SIP-T48G:
Table of Contents

Advertisement

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

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);
Address.
Yealink IP Phone XML Objects
71

Advertisement

Table of Contents
loading

Table of Contents