Solved

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

Posted on 2014-10-06
4
539 Views
Last Modified: 2014-10-31
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
0
Comment
Question by:DataDudes
  • 3
4 Comments
 
LVL 15

Accepted Solution

by:
Phonebuff earned 500 total points
Comment Utility
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
 
LVL 2

Author Comment

by:DataDudes
Comment Utility
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
 
LVL 2

Author Comment

by:DataDudes
Comment Utility
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
 
LVL 2

Author Closing Comment

by:DataDudes
Comment Utility
See my final comment as well for the full solution
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I recently purchased a Bluetooth headset called the Music Jogger (model BSH10). The control buttons on it look like this: One of my goals is to use it as the microphone and speakers for Skype calls. In that respect, it works well. However, I …
Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now