Hotdesk & Change Phone Display?


Im am very new to Asterisk and am doing my first install. Not my first IPBPX install thought. I have an AsteriskNOW 1.7? (older) system running FreePBX 10.x interface. Not 100% sure of the minor version and dont have access right now. Its running in user & device mode with all the phones setup as “Adhoc” devices.

Everything is working well my users can sitdown dial (*11+ext+pass) and get logged into the phone(YeaLink T22). The display on the phone does not change when they login thought. It keeps saying “Phone #09” or whatever I put in for the phone description.

Is there any way to change the description on the phone desplay when a user logs into the phone? When they login I would like the display to change to their “FirstName + LastName: ext”.

Woule really appreciate some help with this. Tried google and was not able to find much on changing the display after login.



I don’t think you can do anything with device & user mode though. I believe you want to “login” with user credentials regardless of the device and it will display the “user” details and not the device details obviously. Don’t think this is possible, i believe with some programming maybe we can achieve that with Digium phones…

So maybe hotdesk was not the correct term. I just need to change the “Label” on the phone when a user logs into the phone with (*11). I think Ill have all the Labels set to “Anonymous” when no-one is logged into the phone if I can.


Did you ever find a solution to this? I have the exact same setup and question.


Hi guys! I ran into the same problem a good while ago and it took me a while to figure it out. I must admit that I have only tried this method with Snom phones and not Yealink so you may have to look up manufacturers info if it will work with them.

I use sipsak and have custom coded the macro-user-logon and macro-user-logoff which alters the display to show the users name and extension. The only problem that this method has, is that it will not survive a power off situation in which the phone restarts and the display will return to what the phone’s initial SIP account settings are.

You can see the use the TrySystem command that uses local sipsak command to change display. The IP address is the actual Asterisk box.

Hope this helps in some way as it took me ages to figure as I’m not much of a coder :slight_smile:

You need to modify the extensions_custom.conf file so that it overrides what is in the normal extensions.conf. The code also relies on your Users “Display Name” being their first name and then their Surname.

[macro-user-logon] ; check device type ; exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)}) exten => s,n,Answer() exten => s,n,Wait(1) exten => s,n,GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED,1) ; get user's extension ; exten => s,n,Set(AMPUSER=${ARG1}) exten => s,n,GotoIf($["${AMPUSER}" != ""]?gotpass) exten => s,n,Read(AMPUSER,please-enter-your-extension-then-press-pound,,,4) ; get user's password and authenticate ; exten => s,n,GotoIf($["${AMPUSER}" = ""]?s-MAXATTEMPTS,1) exten => s,n(gotpass),GotoIf($["${DB_EXISTS(AMPUSER/${AMPUSER}/password)}" = "0"]?s-NOUSER,1) exten => s,n,Set(AMPUSERPASS=${DB_RESULT}) exten => s,n,GotoIf($[${LEN(${AMPUSERPASS})} = 0]?s-NOPASSWORD,1) ; do not continue if the user has already logged onto this device ; exten => s,n,Set(DEVICEUSER=${DB(DEVICE/${CALLERID(number)}/user)}) exten => s,n,GotoIf($["${DEVICEUSER}" = "${AMPUSER}"]?s-ALREADYLOGGEDON,1) exten => s,n,Authenticate(${AMPUSERPASS}) exten => s,n,DeadAGI(user_login_out.agi,login,${CALLERID(number)},${AMPUSER}) exten => s,n,Set(PhoneName=${DB(AMPUSER/${AMPUSER}/cidname)}) exten => s,n,Set(FirstName=${CUT(PhoneName, ,1)}) exten => s,n,Set(Surname=${CUT(PhoneName, ,2)}) exten => s,n,Set(FirstLetter=${Surname:0:1} exten => s,n,Set(RealExten=${DB(AMPUSER/${AMPUSER}/cidnum)}) exten => s,n,TrySystem(/usr/local/bin/sipsak -i -H -M -B "${FirstName}${FirstLetter} ${RealExten}" -s ${SIPURI}) exten => s,n,Playback(roaming&user&enabled&vm-goodbye)

exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged into)
exten => s-FIXED,n,Playback(custom/roaminginvalid&vm-goodbye)
exten => s-FIXED,n,Hangup ;TODO should play msg indicated device cannot be logged into

exten => s-ALREADYLOGGEDON,1,NoOp(This device has already been logged into by this user)
exten => s-ALREADYLOGGEDON,n,Playback(vm-goodbye)
exten => s-ALREADYLOGGEDON,n,Hangup ;TODO should play msg indicated device is already logged into

exten => s-NOPASSWORD,1,NoOp(This extension does not exist or no password is set)
exten => s-NOPASSWORD,n,Playback(pbx-invalid)
exten => s-NOPASSWORD,n,Goto(s,playagain)

exten => s-MAXATTEMPTS,1,NoOp(Too many login attempts)
exten => s-MAXATTEMPTS,n,Playback(vm-goodbye)
exten => s-MAXATTEMPTS,n,Hangup

exten => s-NOUSER,1,NoOp(Invalid extension ${AMPUSER} entered)
exten => s-NOUSER,n,Playback(pbx-invalid)
exten => s-NOUSER,n,Goto(s,playagain)

; check device type
exten => s,1,Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)})
exten => s,n,GotoIf($["${DEVICETYPE}" = “fixed”]?s-FIXED,1)
exten => s,n,DeadAGI(user_login_out.agi,logout,${CALLERID(number)})
exten => s,n,TrySystem(/usr/local/bin/sipsak -i -H -M -B “” -s ${SIPURI})
exten => s,n(done),Playback(roaming&user&disabled&vm-goodbye)

exten => s-FIXED,1,NoOp(Device is FIXED and cannot be logged out of)
exten => s-FIXED,n,Playback(an-error-has-occured&vm-goodbye)
exten => s-FIXED,n,Hangup ;TODO should play msg indicated device cannot be logged into