[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:
  • 1 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
T38 wallpaper change
Author Message
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #4
RE: T38 wallpaper change
Hi, I think I a found a workaround that gives a seemless user experience, it is immediately effective and resembles PushXML nicely.
This solution is kindly based of the script of user habile in another thread.

It requires that wall01.jpg to wall04.jpg are already downloaded using the common.cfg options posted above.
You need to have php5-curl installed on your server and restart apache for it to work.

The script is tested on two T38G phone with firmware 38.70.0.171 :

PHP Code:
<?php
ini_set
('error_reporting'E_ALL);
ini_set('display_errors''0');

// Server and Phone URI
$scripturl 'http://' $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
$phoneip $_SERVER['REMOTE_ADDR'];    // Your phone IP

$maxnum 4;         // Number of wallpaper choices
$username'abc';    // Phone web username
$password'123';    // Phone web password

$id 0;
if (isset(
$_GET["id"])) { $id += $_GET["id"]; }

if ((
$id>0) && ($id<=$maxnum)) {
    
// Change the Wallpaper and exit to Home screen
    
setWallpaper("wall0$id.jpg"$phoneip$username$password);
    echo 
'<YealinkIPPhoneExecute Beep="no"><ExecuteItem URI="Key:CANCEL"/></YealinkIPPhoneExecute>';
} else {
    
// List wallpapers
    
echo '<myTextMenu defaultIndex="1" style="none" Beep="no" Timeout="30" LockIn="no" WrapList="no"><Title wrap = "no">Wallpapers</Title>';
    for (
$i=1;$i<=$maxnum;$i++) {
        echo 
"<MenuItem><Prompt>Wallpaper $i</Prompt><Selection>$i</Selection><URI>$scripturl?id=$i</URI>";
        echo 
"</MenuItem>\n";
    }
    echo 
"</myTextMenu>";
 }
 
 
 function 
setWallpaper($rname$host$username$password) {
        
$ch curl_init();
        
        
// Login to the web interface
        
curl_setopt($chCURLOPT_USERPWD$username ":" $password);
        
curl_setopt($chCURLOPT_URL'http://'.$host);
        
curl_setopt($chCURLOPT_COOKIEFILE'/dev/null');
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
$store curl_exec($ch);
        
        
// Post Wallpaper Choice
        
curl_setopt($chCURLOPT_URL'http://'.$host.'/cgi-bin/cgiServer.exx');
        
$postCommands='profileOpen("/phone/config/user.ini")profileSetString("PhoneSetting","BackGrounds","Config:'.$rname.'")profileSave()msgBroadcastPostMessage("0x10007","43","0"))';
        
$fields = array('postCommands' => $postCommands);
        
curl_setopt($chCURLOPT_POSTFIELDS$fields);
        
$content curl_exec($ch);

        return 
$content;
}
?>

Please use the reputation button below if you like this post.
(This post was last modified: 06-09-2014 02:22 AM by cptjack.)
06-08-2014 11:09 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Messages In This Thread
T38 wallpaper change - CWR - 04-29-2014, 06:51 AM
RE: T38 wallpaper change - cptjack - 06-08-2014, 09:42 AM
RE: T38 wallpaper change - CWR - 06-08-2014, 12:33 PM
RE: T38 wallpaper change - cptjack - 06-08-2014 11:09 PM
RE: T38 wallpaper change - CWR - 06-09-2014, 09:34 PM
RE: T38 wallpaper change - habile - 06-09-2014, 01:47 AM
RE: T38 wallpaper change - cptjack - 06-09-2014, 02:21 AM
RE: T38 wallpaper change - habile - 06-09-2014, 02:46 AM
RE: T38 wallpaper change - cptjack - 06-10-2014, 02:11 AM
RE: T38 wallpaper change - CWR - 06-18-2014, 01:06 AM
RE: T38 wallpaper change - cptjack - 06-19-2014, 06:48 AM
RE: T38 wallpaper change - CWR - 06-19-2014, 07:49 AM
RE: T38 wallpaper change - cptjack - 06-19-2014, 04:19 PM
RE: T38 wallpaper change - CWR - 06-19-2014, 10:53 PM
RE: T38 wallpaper change - cptjack - 06-21-2014, 04:22 AM
RE: T38 wallpaper change - lorn10 - 01-22-2015, 11:35 PM
RE: T38 wallpaper change - CWR - 01-23-2015, 12:15 AM
RE: T38 wallpaper change - lorn10 - 01-24-2015, 01:03 AM
RE: T38 wallpaper change - CWR - 01-24-2015, 01:09 AM
RE: T38 wallpaper change - lorn10 - 01-24-2015, 01:20 AM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Register Failed after network change pdoerr 6 47,063 02-01-2015 06:03 AM
Last Post: CWR
  T32 and 38 wallpaper size aboodoo 1 6,705 02-20-2014 07:00 PM
Last Post: Yealink Support

Forum Jump:


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

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