[asterisk-users] Re: Set hint status from dialplan?

Steven asterisk at tescogroup.com
Tue Sep 26 10:00:02 MST 2006

;exten => 799,hint,DS/mmgc

Lacy,  What is the DS/mmgc?



  "Lacy Moore - Aspendora" <aspendora at gmail.com> wrote in message news:56a990d20609260822i63c7f28dpb9955b9a3be12f5c at mail.gmail.com...
    Is it possible to manually set the hint status of a virtual extension via the dialplan?

    I have an extension that turns my night mode on and off. 

    I would love to be able to manually set the hint to be able to turn on a light for night mode.

  See http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+BristuffDevstate for more info on this. 

  Here is a part of my extensions.conf that uses this:

  ; Night Mode Activations
  exten => 799,hint,DS/mmgc
  exten => 799,1,Macro(open-close,mmgc,custom/moore-moore-now-open,custom/moore-moore-now-closed)
  exten => 799,n,Playback(beep)
  exten => 799,n,Hangup 

  exten => s,1,DBGet(nightmode=nightmode/${ARG1})
  exten => s,n,NoOp(ARG1 ${ARG1} ARG2 ${ARG2} ARG3 ${ARG3})
  exten => s,n,Set(OpenFile=${ARG2})
  exten => s,n,Set(CloseFile=${ARG3}) 
  exten => s,n,NoOp(Close file ${CloseFile}. Open file ${OpenFile}.)
  exten => s,n,GotoIf(${nightmode}=1?s,Open:s,Close)
  exten => s,n(Open),DBPut(nightmode/${ARG1}=0)
  exten => s,n,Devstate(${ARG1},0) 
  exten => s,n,Playback(${OpenFile})
  exten => s,n,Goto(Return)
  exten => s,n(Close),DBPut(nightmode/${ARG1}=1)
  exten => s,n,Devstate(${ARG1},2)
  exten => s,n,Playback(${CloseFile})
  exten => s,n(Return),NoOp 
  On my Polycom, I have a speeddial set up for 799.  One press, and it turns night mode on and announces that, another press and it turns night mode off and announces that.. 

  Lacy Moore
  I'm the guy that doesn't give a damn about anyone's problems but my own... 


  --Bandwidth and Colocation provided by Easynews.com --

  asterisk-users mailing list
  To UNSUBSCRIBE or update options visit:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060926/40fa695f/attachment.htm

More information about the asterisk-users mailing list