Flashing light for DND with aastra 6731i and 6757i telephones in Asterisk 11

Hi,

We are using all Aastra 6337i and 6757i telephones on a FreePBX box running Asterisk 11 and we would like to be able to see when someone is using DND. If possible, we would like the light to flash for anyone that is using DND. For example: Extension 101 presses his DND button. All other extensions that have his name as a BLF in their phone show a flashing red light signaling that extension 101 is now in DND mode. Is this possible and how do I accomplish this?

Thank you
LVL 2
OAC TechnologyProfessional NerdsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PhonebuffCommented:
Well,

   I would start here -- http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/usingCustomDeviceStates.html

   The look at the programing guide for the Aastra phones --  

  BUt this assumes that you are setting the button on the phone to execute and Asterisk DND, if you do a local DND on the phone, I don't believe there is a way to detect that --

 https://github.com/lgaetz/Aastra_Scripts/blob/master/User_Manuals/Aastra%20XML%20Scripts%20-%20PBX%20in%20a%20Flash-PA-001009-01-04%20version%202.3.0.pdf
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OAC TechnologyProfessional NerdsAuthor Commented:
Sorry, this is a bit over my head. They would be using the Asterisk DND feature code to put their phones on DND. What exactly would I need to do to get the BLF light on others' phones to flash when a user uses the DND feature code?

Thanks
0
OAC TechnologyProfessional NerdsAuthor Commented:
Thanks for pointing me in the right direction. Here is how I solved this:

I modified the extensions_override_freepbx.conf file and added this:


[app-dnd-toggle]
exten => *76,1,Answer
exten => *76,n,Wait(1)
exten => *76,n,Macro(user-callerid,)
exten => *76,n,GotoIf($["${DB(DND/${AMPUSER})}" = ""]?activate:deactivate)
exten => *76,n(activate),Set(DB(DND/${AMPUSER})=YES)
exten => *76,n,Set(STATE=ONHOLD)
exten => *76,n,Gosub(app-dnd-toggle,sstate,1())
exten => *76,n(hook_on),Playback(do-not-disturb&activated)
exten => *76,n,Macro(hangupcall,)
exten => *76,n(deactivate),Noop(Deleting: DND/${AMPUSER} ${DB_DELETE(DND/${AMPUSER})})
exten => *76,n,Set(STATE=NOT_INUSE)
exten => *76,n,Gosub(app-dnd-toggle,sstate,1())
exten => *76,n(hook_off),Playback(do-not-disturb&de-activated)
exten => *76,n,Macro(hangupcall,)

exten => sstate,1,Set(DEVICE_STATE(Custom:DND${AMPUSER})=${STATE})
exten => sstate,n,Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)})
exten => sstate,n,GotoIf($["${DEVICES}" = "" ]?return)
exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
exten => sstate,n,GotoIf($["${DEVICES}" = "" ]?return)
exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
exten => sstate,n,Set(ITER=1)
exten => sstate,n(begin),Set(DEVICE_STATE(Custom:DEVDND${CUT(DEVICES,&,${ITER})})=${STATE})
exten => sstate,n,Set(ITER=$[${ITER} + 1])
exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin)
exten => sstate,n(return),Return()

;--== end of [app-dnd-toggle] ==--;


After this I went into the FreePBX GUI and went to Settings > Advanced Settings and set Enable Custom Device States to YES

Basically I just told the system to change the state of the *76 DND command to be the state of "ONHOLD" which makes the light flash whenever someone turns on DND using *76. The one small caveat that I found is that this directs the caller to the "busy" voicemail, but that didn't seem to bother anyone.  Hopefully this helps others out in the future.

Thanks again
0
OAC TechnologyProfessional NerdsAuthor Commented:
See my final comment as well for the full solution
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IP Telephony

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.