[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
CWR Offline
Moderator
*****

Posts: 717
Joined: May 2013
Reputation: 7
Post: #1
T38 wallpaper change
Can an XML Browser file permanently change the Wallpaper of the phone?

I want to do this:
Push button to bring up XML Menu
4 Options
1) Dial string *30, Change wallpaper to Wall1.jpg from PBX Server
2) Dial string *31, Change wallpaper to Wall2.jpg from PBX Server
2) Dial string *32, Change wallpaper to Wall3.jpg from PBX Server
2) Dial string *33, Change wallpaper to Wall4.jpg from PBX Server

Thank you.

Craig Reilly
MCSA, 3cx Advanced Certified
Scottsdale, AZ
04-29-2014 06:51 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #2
RE: T38 wallpaper change
I have been playing around with dynamic (random) wallpapers and screensavers. I stumbled upon this thread.

In my y000000000038.cfg I have these 4 lines to (p)reload each wallpaper when provisioning/booting:
wallpaper_upload.url = http://server/wall01.jpg
wallpaper_upload.url = http://server/wall02.jpg
wallpaper_upload.url = http://server/wall03.jpg
wallpaper_upload.url = http://server/wall04.jpg

Existing images get updated/overwritten when the cfg is loaded.

I didn't find an option to change the phone_setting.backgrounds value using Push XML. It seems PhoneConfiguration can only change the options of programmable keys.

An option would be to store the selected value in a database and trigger a reboot or wait for the next auto-provisioning cycle to update the phone_setting.backgrounds value. This would be however far from an elegant solution to your question. If there is a way to trigger a provisioning cycle it should work almost as requested...

The 4 wallpapers can still be chosen manually using the Menu -> Display options, this is however requires navigation to the appropriate the Menu. If that's an acceptable solution for you?

Another option is to keep phone_setting.backgrounds=Config:wallpaper.jpg fixed in the cfg and only load the appropriate Wallpaper when provisioning.
I have a .htaccess that redirects all wallpaper.jpg HTTP requests to a PHP script. It is then up to the script to serve the correct wallpaper image to be stored on the phone.

Please use the reputation button below if you like this post.
06-08-2014 09:42 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
CWR Offline
Moderator
*****

Posts: 717
Joined: May 2013
Reputation: 7
Post: #3
RE: T38 wallpaper change
I was thinking of changing the wallpaper when phone was put into night mode or weekend mode so easily can identify the current status of the receptionist phone...
Thank for looking into it.

Craig Reilly
MCSA, 3cx Advanced Certified
Scottsdale, AZ
06-08-2014 12:33 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
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
habile Offline
Junior Member
**

Posts: 27
Joined: Jun 2014
Reputation: 1
Post: #5
RE: T38 wallpaper change
Quote:I didn't find an option to change the phone_setting.backgrounds value using Push XML. It seems PhoneConfiguration can only change the options of programmable keys.

Interesting... so I'm curious, does this push not work for you?

Code:
<YealinkIPPhoneConfiguration>
<Item>phone_setting.backgrounds=Config:wall01.jpg</Item>
</YealinkIPPhoneConfiguration>

I don't have a T38 to play with so maybe you don't have the option...

The problem I had was with the phone being a bit too clever and not recognising that the wallpaper with the same name (random.jpg) had been updated. But if you are switching between existing wallpapers that are not expected to be updated the push above should be enough to switch - at least in my case it is.

There's a lot of potential with dynamic wallpapers, night mode, DEFCON status etc. Smile

C.
06-09-2014 01:47 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #6
RE: T38 wallpaper change
The T38G XML Browser Development Guide specifies a mandatory Path and config parameter:
- Path mandatory null The path item.
- config mandatory LineKey/MemKey/EXP1/EXP2/EXP3/EXP4/EXP5/EXP6 The type of DSS key.
So to me it seems it only supports changing programmable key items. However I didn't need or test it yet...

I checked the T4x XML Browser Development Guide and there these parameters are not required. It must be another V71 thing that T38G phones lack support for... I tried some variations on that YealinkIPPhoneConfiguration XML snippet, but apart from a Beep nothing changes on the phone. Good to know the T4x has these enhancements though.

Interestingly, the T38G does recognise changes in (random) wallpapers during provisioning and will update them every time without the need of deleting previous images. The same goes for the screensaver. The only problem I had was the phone not accepting images without the appropriate Content-Length HTTP header. Took me a while to figure that out and add it to my randomizer PHP script Shy

Now that the CURL workaround is in place I'll probably be putting the display off at night and on again during the day using some CURL en cron job.

Please use the reputation button below if you like this post.
06-09-2014 02:21 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
habile Offline
Junior Member
**

Posts: 27
Joined: Jun 2014
Reputation: 1
Post: #7
RE: T38 wallpaper change
(06-09-2014 02:21 AM)cptjack Wrote:  Now that the CURL workaround is in place I'll probably be putting the display off at night and on again during the day using some CURL en cron job.

Fair enough on the T38, I only got introduced to Yealink this week so have no experience of other models/firmware Smile ... yes, I use cron to change wallpaper each hour. I'm now working on some status screens for home automation - all a bit over the top I know but it keeps me out of trouble, well, mostly!

Have fun!!

C.
(This post was last modified: 06-09-2014 02:47 AM by habile.)
06-09-2014 02:46 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
CWR Offline
Moderator
*****

Posts: 717
Joined: May 2013
Reputation: 7
Post: #8
RE: T38 wallpaper change
(06-08-2014 11:09 PM)cptjack Wrote:  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;
}
?>


How did you then call/run this php script? From the XML browser?

Craig Reilly
MCSA, 3cx Advanced Certified
Scottsdale, AZ
06-09-2014 09:34 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #9
RE: T38 wallpaper change
Yes, I assigned a DSS key of type XML Browser and pointed it to the script on my server.

Please use the reputation button below if you like this post.
06-10-2014 02:11 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
CWR Offline
Moderator
*****

Posts: 717
Joined: May 2013
Reputation: 7
Post: #10
RE: T38 wallpaper change
do you think it would be possible to DIAL A NUMBER and CHANGE THE WALLPAPER BOTH?

This is my current XML Starting point:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<YealinkIPPhoneTextScreen
        Beep="yes"
        defaultIndex=""
        cancelAction=""
        doneAction=""
        Timeout="10000"
        LockIn="no">
<Title wrap="yes">RECEPTIONIST STATUS</Title>
<Text>
CLOSED - Nightmode
BACK - Backline-Group/Weekend
HERE - Recept answering
AWAY - Ring-Group answering (Lunch)
</Text>

<SoftKey index="1">
<Label>CLOSED</Label>
<URI>http://10.0.0.12:5000/provisioning/night_mode/star32.xml</URI>
</SoftKey>

<SoftKey index="2">
<Label>BACK</Label>
<URI>http://10.0.0.12:5000/provisioning/night_mode/star34.xml</URI>
</SoftKey>

<SoftKey index="3">
<Label>HERE</Label>
<URI>http://10.0.0.12:5000/provisioning/night_mode/star30.xml</URI>
</SoftKey>


<SoftKey index="4">
<Label>AWAY</Label>
<URI>http://10.0.0.12:5000/provisioning/night_mode/star31.xml</URI>
</SoftKey>

</YealinkIPPhoneTextScreen>

Then each of the star files dials a star code, *30,31,32,33.
I got the wallpaper part working... thank you!
1/2 way there.

Craig Reilly
MCSA, 3cx Advanced Certified
Scottsdale, AZ
(This post was last modified: 06-18-2014 01:33 AM by CWR.)
06-18-2014 01:06 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Register Failed after network change pdoerr 6 57,337 02-01-2015 06:03 AM
Last Post: CWR
  T32 and 38 wallpaper size aboodoo 1 10,057 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