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
Push XML on T38G
Author Message
ruffle Offline
Junior Member
**

Posts: 4
Joined: Feb 2015
Reputation: 0
Post: #7
RE: Push XML on T38G
Aha! A Result.

Using YealinkIPPhoneExecute kind of like you did above, the image gets displayed. For the record here are the bits that work should anyone else get stuck.

The php that's used to push the XML to the phone (just run with "php <filename>" on the system you've allowed to be the push XML server in the phone's config):

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 ( $phone, 80, $errno, $errstr, 5);

        if($fp) {
                fputs($fp, $post.$xml);
                 flush();
                 fclose($fp);
        }
}

$xml = '<?xml version="1.0" encoding="UTF-8"?>';
$xml .= '<YealinkIPPhoneExecute Beep="no">';
$xml .= '<ExecuteItem URI="http://192.168.1.1/camera/yealink-cam.xml"/>';
$xml .= '</YealinkIPPhoneExecute>';

push2phone("192.168.1.1","192.168.1.118",$xml);

?>

and the xml file (yealink-cam.xml) that the phone then pulls:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<YealinkiPPhoneImageScreen Beep="no" mode="fullscreen">
<Image>http://192.168.1.63/axis-cgi/jpg/image.cgi</Image>
</YealinkiPPhoneImageScreen>

Many thanks for suggesting YealinkIPPhoneExecute. There's obviously a bug in the T38G when pushing image screens but the above will work for my purposes.
(This post was last modified: 02-07-2015 02:45 AM by ruffle.)
02-07-2015 02:42 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Messages In This Thread
Push XML on T38G - ruffle - 02-06-2015, 12:07 AM
RE: Push XML on T38G - ModCraig - 02-06-2015, 02:21 AM
RE: Push XML on T38G - ruffle - 02-06-2015, 05:15 PM
RE: Push XML on T38G - cptjack - 02-06-2015, 10:15 PM
RE: Push XML on T38G - ruffle - 02-07-2015, 01:24 AM
RE: Push XML on T38G - cptjack - 02-07-2015, 01:38 AM
RE: Push XML on T38G - ruffle - 02-07-2015 02:42 AM
RE: Push XML on T38G - cptjack - 02-07-2015, 03:27 AM
RE: Push XML on T38G - grawil - 06-17-2016, 07:38 AM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  XML Push without DSS key? testengineer 8 12,597 02-12-2018 01:16 PM
Last Post: Alibaba
  Push/Pull idle image? grawil 2 3,557 06-20-2016 10:16 AM
Last Post: grawil
  T38G File Format Error w03zd8rc 3 5,182 03-25-2016 09:52 PM
Last Post: w03zd8rc
  T38G Voice In Cutting Out Vanlon 4 8,912 12-30-2015 01:35 AM
Last Post: mujizac
  T38G Firmware zmcgoogan 1 5,322 12-08-2015 02:11 AM
Last Post: ModCraig
  Yealink T38G Hide DTMF Option carlosn 7 11,239 12-08-2015 02:05 AM
Last Post: carlosgamboa06
  [split] T38G slow and unresponsive GreenLine 12 19,288 11-07-2015 04:41 AM
Last Post: zachtate
  T38G auto-provisioing. How to clear out value of a text parameter mdu113 5 6,388 07-22-2015 06:27 AM
Last Post: cptjack
  T38G needs new firmware released JamesK 41 64,596 07-16-2015 06:12 AM
Last Post: eldorel
  T38G remote Phonebook LPSIT 2 5,523 07-14-2015 08:41 PM
Last Post: LPSIT

Forum Jump:


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

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