[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
[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
  Phones without a "server/PBX" kermitxyz 0 1,657 11-13-2023 02:26 AM
Last Post: kermitxyz
  Share Wi/Fi to PC port kevins1701 2 7,420 08-12-2022 01:33 AM
Last Post: seraphim19
  What is alarm server alarm.server.address ? (W59R) Ivan86 0 3,497 08-10-2021 04:42 PM
Last Post: Ivan86
  LDAP server is unavailable Andrei9385 2 11,639 07-16-2021 08:34 PM
Last Post: nolto
  T46s won't try to register to server on local subnet jigjag 0 4,735 09-08-2020 10:52 PM
Last Post: jigjag
  Direct IP Call Outside LAN with specific port BumbleBears 2 8,632 05-28-2020 02:13 PM
Last Post: Lewis-H
  .cfg file needed for Zultys provisioning server jerryp 0 5,124 01-30-2020 09:26 PM
Last Post: jerryp
  Set PC port link to 1Gb from provisioning file avayax 1 7,422 09-10-2019 03:30 PM
Last Post: complex1
  Slow speed on the PC port Sur 4 18,850 04-12-2019 09:28 AM
Last Post: Johnny88
  Daisy chain off of PC port on T23G avayax 2 9,820 01-28-2019 03:37 PM
Last Post: jolouis

Forum Jump:


User(s) browsing this thread:

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