[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 on T38G
Author Message
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #4
RE: Push XML on T38G
It seems like you have the same issue that I encountered a while ago; static images do get displayed correctly, but dynamic images don't. It took me quite a while to realize that the Yealink T38G phone needs to have the Content-Length header set or the image won't be displayed...

I solved this with a PHP script by adding the appropriate Content-Length header to the output like this:
PHP Code:
<php
$dst 
imagecreatetruecolor(480,272);
imagealphablending($dsttrue);

$src imagecreatefromjpeg("http://ipcamera/snapshot.cgi");
imagecopyresampled ($dst$src000imagesx($dst), imagesy($dst) , imagesx($src), imagesy($src));

// Yealink phone needs the Content-Length header
// Get the Image Data Length
ob_start(); // start a new output buffer
   
imagejpeg$dst""90 );
   
$ImageData ob_get_contents();
   
$ImageDataLength ob_get_length();
ob_end_clean(); // stop this output buffer

//header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($fn)).' GMT', true, 200);
header("Content-type: image/jpeg") ;
header("Content-Length: ".$ImageDataLength);
echo 
$ImageData;

// Free up memory
imagedestroy($src);
imagedestroy($dst);
?>

So you will need an intermediate script, if the camera doesn't have the Content-Length header by default. I hope this solves your problem as well. Please, let us know if it does or not Smile

Please use the reputation button below if you like this post.
(This post was last modified: 02-06-2015 10:26 PM by cptjack.)
02-06-2015 10:15 PM
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 - CWR - 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
  Remote PhoneBook format for T38G aralmeida 1 8,443 10-02-2019 05:06 PM
Last Post: Chris708
  XML Push without DSS key? testengineer 8 35,534 02-12-2018 01:16 PM
Last Post: Alibaba
  Push/Pull idle image? grawil 2 12,758 06-20-2016 10:16 AM
Last Post: grawil
  T38G File Format Error w03zd8rc 3 15,356 03-25-2016 09:52 PM
Last Post: w03zd8rc
  T38G Voice In Cutting Out Vanlon 4 21,347 12-30-2015 01:35 AM
Last Post: mujizac
  T38G Firmware zmcgoogan 1 11,535 12-08-2015 02:11 AM
Last Post: CWR
  Yealink T38G Hide DTMF Option carlosn 7 26,730 12-08-2015 02:05 AM
Last Post: carlosgamboa06
  [split] T38G slow and unresponsive GreenLine 12 42,761 11-07-2015 04:41 AM
Last Post: zachtate
  T38G auto-provisioing. How to clear out value of a text parameter mdu113 5 17,077 07-22-2015 06:27 AM
Last Post: cptjack
  T38G needs new firmware released JamesK 41 148,740 07-16-2015 06:12 AM
Last Post: eldorel

Forum Jump:


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

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