[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: #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
Post Reply 


Messages In This Thread
PUSH XML PROBLEM - ademeo - 05-22-2015, 03:44 PM
RE: PUSH XML PROBLEM - Flora_Yealink - 05-22-2015, 04:58 PM
RE: PUSH XML PROBLEM - ademeo - 05-22-2015 05:07 PM
RE: PUSH XML PROBLEM - Flora_Yealink - 05-22-2015, 06:59 PM
RE: PUSH XML PROBLEM - ademeo - 05-22-2015, 07:26 PM
RE: PUSH XML PROBLEM - ademeo - 05-22-2015, 10:52 PM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Lost my configuration trying to fix a static audio problem nestman 0 3,976 06-22-2021 06:33 AM
Last Post: nestman
  T28P LDAP Problem oguzhan 1 7,722 06-10-2020 01:14 PM
Last Post: beldimon
  "On hook" event problem Rafal 6 16,603 03-26-2020 03:35 AM
Last Post: Normfred
  Problem with low-level firmware of telephone T21 E2 protaganist 5 18,161 01-21-2019 11:50 AM
Last Post: protaganist
  T21P dial problem oguzhan 2 9,861 06-20-2018 09:27 AM
Last Post: oguzhan
  Known problem - redial from history Rafal 4 13,336 03-21-2018 06:24 AM
Last Post: Rafal
  Problem with alert BLF in T27P hercross 5 14,122 03-01-2018 05:58 PM
Last Post: Evan_Yealink
  Yealink T21P E2 Communication Problem Windland_Support 1 9,705 08-16-2017 02:44 AM
Last Post: Kevin_Yealink
  SIP T22P Problem liamretrams 2 10,762 06-01-2017 11:22 AM
Last Post: wcolato
  T22P push xml v61 version Qwerty 0 4,356 12-05-2016 11:02 AM
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