This introduces a new dialplan function, DEVSTATE, which allows you to do some

pretty cool things.

First, you can get the device state of anything in the dialplan:
  NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)})
  NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)})

Most importantly, this allows you to create custom device states so you can
control phone lamps directly from the dialplan.
  Set(DEVSTATE(Custom:mycustomlamp)=BUSY)
  ...
  exten => mycustomlamp,hint,Custom:mycustomlamp


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2007-02-13 22:02:20 +00:00
parent 83856d4683
commit f60efe347a
9 changed files with 327 additions and 40 deletions

View File

@@ -612,7 +612,7 @@ static void *changethread(void *data)
return NULL;
}
static int statechange_queue(const char *dev, int state, void *ign)
static int statechange_queue(const char *dev, enum ast_device_state state, void *ign)
{
/* Avoid potential for deadlocks by spawning a new thread to handle
the event */