Specifications
Aastra July 2014 PA-001011-03-04
208
Note: Depending on the changes performed, you might have to reboot the phone to apply
them.
5.4 XML Objects Pushed to the Phone
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 to the
screen.
The HTTP POST packet must contain an “xml=” line in the message body. The string to parse 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 their data. Any applications that construct HTTP packets on the fly
must also specify this line.
Note: the content of the HTTP POST is not url-encoded.
Sample php source code
Below is a sample php source code that sends an XML object to an Aastra phone. In this example,
the phone is located at 192.168.0.150 and the server pushing the XML object at 192.168.0.112.
<?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";
HTTPS Settings