Solved

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

Posted on 2014-10-06
4
551 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:OAC Technology
  • 3
4 Comments
 
LVL 15

Accepted Solution

by:
Phonebuff earned 500 total points
ID: 40371433
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:OAC Technology
ID: 40377110
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:OAC Technology
ID: 40416360
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:OAC Technology
ID: 40416362
See my final comment as well for the full solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hey there Heard about jingle, the add on for XMPP that enables point to point audio between two XMPP clients. No server config necessary. Actually quite a cool feature. However, how good is it if you can not use those voice capabilities to do a P…
Healthcare providers, insurance companies and other covered entities trust eFax Corporate to transmit their most sensitive documents. eFax Corporate can help your organization implement a HIPAA compliant cloud faxing solution.
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…
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, f…

920 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

17 Experts available now in Live!

Get 1:1 Help Now