New Forum system requires email address which you used to apply for your account to replace your original username. Password stays the same.Please see this post for more details
http://forum.yealink.com/forum/showthread.php?tid=40344

Yealink Test Club has been officially launched. Please visit post below to get detail information. Come and join us!
http://forum.yealink.com/forum/announcements.php?aid=18

We just had the YMCS online and we are also working on the features plan on the future versions, in this regard we are need to hear your voice about the YMCS.
Please visit : http://forum.yealink.com/forum/showthread.php?tid=42322


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[RESOLVED] Server initiated pushXML to port 443
Author Message
alisio Offline
Junior Member
**

Posts: 5
Joined: Nov 2012
Reputation: 0
Post: #4
RE: Server initiated pushXML to port 443
Hi again!

I figured out the problem. I forgot to prefix the hostname with 'ssl://' in the fsockopen function (DUH!).

The correct way to push using ssl taking the TextScreen.php sample is:

Code:
<?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 ( 'ssl://'.$phone, 443, $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.0.0.1","10.0.0.2",$xml);
01-29-2016 12:03 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Server initiated pushXML to port 443 - alisio - 01-29-2016 12:03 AM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Set PC port link to 1Gb from provisioning file avayax 1 160 09-10-2019 03:30 PM
Last Post: complex1
  LDAP server is unavailable Andrei9385 1 380 07-12-2019 08:34 AM
Last Post: Kevin_Yealink
  Slow speed on the PC port Sur 4 1,088 04-12-2019 09:28 AM
Last Post: Johnny88
  Daisy chain off of PC port on T23G avayax 2 842 01-28-2019 03:37 PM
Last Post: jolouis
  Music On Hold Server ?? Medryn 3 16,700 11-26-2018 07:27 AM
Last Post: Adriano
  How to specify an IP range in the "PushXML allowed server" field? nSolvePaul 2 898 11-02-2018 09:59 AM
Last Post: nSolvePaul
  Syslog capturing port status changes? avayax 0 1,016 02-15-2018 12:34 AM
Last Post: avayax
  Multicast to PC through PC port agle 1 1,935 09-30-2017 07:45 AM
Last Post: Samuel_Yealink
  Multicast to PC through PC port Dennis_1 1 1,900 09-27-2017 01:59 AM
Last Post: Samuel_Yealink
  3CDaemon or TFTPD32 as a TFTP server nelson 1 2,191 08-23-2017 09:37 AM
Last Post: complex1

Forum Jump:


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

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