[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PUSH XML PROBLEM
Author Message
ademeo Offline
Junior Member
**

Posts: 4
Joined: Aug 2014
Reputation: 0
Post: #1
PUSH XML PROBLEM
Hi,

after two sleepless nights....

I have some YEALINK T28P. Only one is with firmware 2.72.0.30 - all others are with Firmware 2.73.0.40 .

I try to use the 'push2phone' PHP script from demo files.

I changed the IP adresses.

Set up the phone to receive "Remote Control" - I tried the speciefied IP from the Server, I tried "any"...

I push the XML data via post:

The phone answers:

HTTP/1.1 200 OK
Content-Length: 0
Date: Fri, 22 May 2015 08:01:39 GMT
Server: embed httpd

...but no reactíon on any phone I try!




Key-Commands to "ConfigManApp.com" are working fine.
But XML - I have no more ideas....


Alex
05-22-2015 03:44 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Flora_Yealink Offline
Senior Member
****

Posts: 265
Joined: Oct 2012
Reputation: 1
Post: #2
RE: PUSH XML PROBLEM
Hi Alex,
Please send me the php file you used that I can test it in my side .

You can refer to below guide.
Yealink_IP_Phones_XML_Browser_Developer's_Guide_V73.rar


Best Regards!
Flora

Flora
FAE (Field Application Engineer) Department
Yealink Network Technology Co., Ltd.
Website: http://www.yealink.com
(This post was last modified: 05-22-2015 04:58 PM by Flora_Yealink.)
05-22-2015 04:58 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
ademeo Offline
Junior Member
**

Posts: 4
Joined: Aug 2014
Reputation: 0
Post: #3
RE: PUSH XML PROBLEM
Hi,

thanks for your reply.


This is my source code:

<?php

$xml = '<?xml version="1.0" encoding="UTF-8"?>';
$xml .= '<YealinkIPPhoneTextScreen Beep="yes">';
$xml .= '<Title>Push test</Title>';
$xml .= '<Text>This is a test for pushing text to a phone.</Text>';
$xml .= '</YealinkIPPhoneTextScreen>';

push2phone("xxx.xxx.xxx.xxx","yyy.yyy.yyy.yyy",$xml);

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, zzzz, $errno, $errstr, 5);
if($fp) {
fputs($fp, $post.$xml);
flush();
while ($r=fgets($fp)){
echo($r."<br>");
}
fclose($fp);
}
}
?>

where
xxx is the IP from my Server
yyy is the IP from my Phone
zzzz is a different port forwarded to port 80


I always get the response - I posted first.



Thanks,
Alex
05-22-2015 05:07 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Flora_Yealink Offline
Senior Member
****

Posts: 265
Joined: Oct 2012
Reputation: 1
Post: #4
RE: PUSH XML PROBLEM
Hi Alex,
I have tested T28 with the latest V73 version and configure the Push XML Server IP Address with the server's IP , please make sure it can't be left as blank or any.

<?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);
flush();
fclose($fp);
}
}
##############################

$xml = "<YealinkIPPhoneTextScreen Beep=\"yes\">\n";
$xml .= "<Title>Push test</Title>\n";
$xml .= "<Text>This is a test for pushing text to a phone.</Text>\n";
$xml .= "</YealinkIPPhoneTextScreen>\n";

push2phone("10.2.5.134","10.15.5.24",$xml);
push2phone("10.2.5.134","10.15.5.59",$xml);
push2phone("10.2.5.134","10.3.5.183",$xml);

#replace 10.2.5.134 with your Apache ip address
#replace 10.15.5.24 with your phone ip address
?>


Best Regards!
Flora
05-22-2015 06:59 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
ademeo Offline
Junior Member
**

Posts: 4
Joined: Aug 2014
Reputation: 0
Post: #5
RE: PUSH XML PROBLEM
Hi,

my IP settings are correct.
And my script Looks like yours.

First of all:

I don't use port 80 - it's a different port because my server is not at our location. The feature makes only sence for us, when we can control from a central server all phones in all Offices.

I follow the Server log - and the message is correct and clear -all post datas are correct.

Our offices are located in different countries - the webserver too.



I checked the log file from the phone:

May 22 11:39:03 Log [470]: WEB <3+error > NOTE : readlan=[German]
May 22 11:39:03 Log [470]: WEB <3+error > NOTE : baklan=[1.English]
May 22 11:39:03 Log [470]: WEB <3+error > NOTE : lan=[5.German]
May 22 11:39:04 Log [470]: WEB <4+warnin> pushXML() don't have remoteIP, or ip don't match, or xmlvalue is error.

The error message is a wide choice off possible Errors....

What are the ERRORs above?


Alex
05-22-2015 07:26 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
ademeo Offline
Junior Member
**

Posts: 4
Joined: Aug 2014
Reputation: 0
Post: #6
RE: PUSH XML PROBLEM
Hi,

I checked it with another Script (based on Javascript). This one works in the local system with the same IP range and under the same subnet.
Putting the script onto the Server - changing the IP's - and nothing works.

I logged the incomming post data, referer - everything is correct - but the phone will not take These values.
05-22-2015 10:52 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  "On hook" event problem Rafal 6 1,828 03-26-2020 03:35 AM
Last Post: Normfred
  T28P LDAP Problem oguzhan 0 428 11-14-2019 10:40 AM
Last Post: oguzhan
  Problem with low-level firmware of telephone T21 E2 protaganist 5 3,889 01-21-2019 11:50 AM
Last Post: protaganist
  T21P dial problem oguzhan 2 2,288 06-20-2018 09:27 AM
Last Post: oguzhan
  Known problem - redial from history Rafal 4 3,277 03-21-2018 06:24 AM
Last Post: Rafal
  Problem with alert BLF in T27P hercross 5 3,555 03-01-2018 05:58 PM
Last Post: Evan_Yealink
  Yealink T21P E2 Communication Problem Windland_Support 1 3,417 08-16-2017 02:44 AM
Last Post: Kevin_Yealink
  SIP T22P Problem liamretrams 2 4,118 06-01-2017 11:22 AM
Last Post: wcolato
  T22P push xml v61 version Qwerty 0 1,482 12-05-2016 11:02 AM
Last Post: Qwerty
  Push XML v61 guide Qwerty 0 1,270 12-02-2016 12:44 PM
Last Post: Qwerty

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication