aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-13 22:02:20 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-13 22:02:20 +0000
commitbb6564f8e744f7c8b28ba9a03b3f8f852952b5eb (patch)
tree6c0ae108c47a878e9cc329ef2c330982e02b80a3 /apps
parent76f1766c9ff8e9d1c5c9e094b21ef880379b858e (diff)
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: http://svn.digium.com/svn/asterisk/trunk@54261 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_meetme.c6
-rw-r--r--apps/app_queue.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 37ad8442b..fe79cfb7e 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -2867,7 +2867,7 @@ static void *recordthread(void *args)
}
/*! \brief Callback for devicestate providers */
-static int meetmestate(const char *data)
+static enum ast_device_state meetmestate(const char *data)
{
struct ast_conference *conf;
@@ -3540,12 +3540,12 @@ static int slatrunk_exec(struct ast_channel *chan, void *data)
return 0;
}
-static int sla_state(const char *data)
+static enum ast_device_state sla_state(const char *data)
{
char *buf, *station_name, *trunk_name;
struct sla_station *station;
struct sla_trunk_ref *trunk_ref;
- int res = AST_DEVICE_INVALID;
+ enum ast_device_state res = AST_DEVICE_INVALID;
trunk_name = buf = ast_strdupa(data);
station_name = strsep(&trunk_name, "_");
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 480f69d1c..a2bf6d91f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -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 */