Yealink Forums
T46G - Change Wallpaper in DND Mode - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Wishlist (/forumdisplay.php?fid=13)
+--- Thread: T46G - Change Wallpaper in DND Mode (/showthread.php?tid=2067)



T46G - Change Wallpaper in DND Mode - bondingAC - 07-15-2014 07:18 PM

We make heavily use of the DND feature of our new T46G.
However it is not always obvious which state is active, since it's just a small icon in the status bar.

It would be really nice, if the phone would display different wallpapers depending on the DND state. So we could create really different images ourself and everybody would see at a glance, if DND is activated or not.

Would love to see this feature in next release.
Thanks in advance!


RE: T46G - Change Wallpaper in DND Mode - CWR - 07-16-2014 06:24 AM

We have done this on the T38 and maybe just as easy on the T4x.
We first load the necessary wallpapers on the phone.
Then assign a button to run an XML (PHP) File - gives the user their options.

Line 21 changes the wallpaper to wall01.jpg, wall02.jpg, etc

We also added * codes to affect the PBX.
$extensions = array(1=>"*32",2=>"*34",3=>"*30",4=>"*31");
Line 22 executes this action.


RE: T46G - Change Wallpaper in DND Mode - bondingAC - 07-17-2014 12:18 AM

Thanks a lot for the code. In theory it would be possible to use the same approach with our Askozia PBX system, but it would be hard to implement. All phones have different passwords managed by Askozia and it is quite hard to get all these passwords back. Also the phone IP might be hidden by NAT in the future, and it is not always possible to install a small webserver for this purpose locally at a remote site.

I think the best, most robust and easiest way to implement this feature would be an added option in the Yealink phone, so it is completely indepentent of the used PBX system and network infrastructure.


RE: T46G - Change Wallpaper in DND Mode - CWR - 07-17-2014 01:53 AM

Mine is not PBX based... I have the PHP on an internal IIS Server - easy as a Windows 7 machine and add PHP.
The dial codes I added so the 3cx Presence screen would be up to date.

Can't say much for the password... I am able to control my phone passwords within 3cx and/or my config files.


RE: T46G - Change Wallpaper in DND Mode - cptjack - 08-15-2014 04:46 AM

I do not own a T4xG (yet), but in this thread it was suggested by user habile that this might work on these phones, as V72 adds additional PhoneConfiguration parameters:

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

You would still need a script or host the XML files on a server somewhere, but it removes the curl workaround with ip and password needed for the T38G phones.


RE: T46G - Change Wallpaper in DND Mode - huguley - 11-13-2015 09:09 PM

(07-16-2014 06:24 AM)craigreilly Wrote:  We have done this on the T38 and maybe just as easy on the T4x.
We first load the necessary wallpapers on the phone.
Then assign a button to run an XML (PHP) File - gives the user their options.

Your post was one of the first I found when I was looking for ways to work around the teeny tiny DND indicator on the t48 phone. I modified your script to work with it so I figured I would share in case anyone runs across your post the same way I did.

PHP Code:
<?php
$username
="admin";
$password="password";
$phoneip $_SERVER["REMOTE_ADDR"];

if (isset(
$_GET["dndstate"])) { $dndstate $_GET["dndstate"]; }

if ( 
$dndstate == "on" ) {
   
setWallpaper("cdlogodnd.png"$phoneip$username$password);
} else {
   
setWallpaper("cd.png"$phoneip$username$password);
}


function 
setWallpaper($rname$host$username$password) {
$ch curl_init();

$xml_data 'xml=<YealinkIPPhoneConfiguration Beep="yes">' .
                    
'<Item>phone_setting.backgrounds = Config:'$rname .'</Item>'.
                
'</YealinkIPPhoneConfiguration>';

echo 
$xml_data ;
// 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);
curl_setopt($chCURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($chCURLOPT_POST1);

// Post Wallpaper Choice
curl_setopt($chCURLOPT_POSTFIELDS"$xml_data");
$content curl_exec($ch);

return 
$content;
}

?>

You still need to set the remote control address under the features tab of the phone and put in the action url with dndstate=on/off as a parameter of the get. Also the backgrounds need to be loaded on the phone.

So if for some reason you don't want to use static xml files this works.