aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsmith <jsmith@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-29 14:07:44 +0000
committerjsmith <jsmith@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-29 14:07:44 +0000
commit848960cd68d9e6e307e85ba708ca1eba1f2f7fc5 (patch)
treebc0a024f82d23f75cf91ddfe1624d61b20b681ec
parent5be2178eff8f5cb6c9f83d6d5f6aef061c79a69a (diff)
This patch adds custom device state handling for ConfBridge conferences,
matching the devstate handling of the MeetMe conferences. Review: https://reviewboard.asterisk.org/r/572/ Closes issue #16972 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@255281 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--CHANGES2
-rw-r--r--apps/app_confbridge.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 950741072..8e1e96259 100644
--- a/CHANGES
+++ b/CHANGES
@@ -141,6 +141,8 @@ Applications
type features.
* Added new application VMSayName that will play the recorded name of the voicemail
user if it exists, otherwise will play the mailbox number.
+ * Added custom device states to ConfBridge bridges. Use 'confbridge:<name>' to
+ retrieve state for a particular bridge, where <name> is the conference name
Dialplan Functions
------------------
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 6ea2ac47f..88fc81a2d 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -463,6 +463,11 @@ static struct conference_bridge *join_conference_bridge(const char *name, struct
conference_bridge->markedusers++;
}
+ /* Set the device state for this conference */
+ if (conference_bridge->users == 1) {
+ ast_devstate_changed(AST_DEVICE_INUSE, "confbridge:%s", conference_bridge->name);
+ }
+
/* If the caller is a marked user or is waiting for a marked user to enter pass 'em off, otherwise pass them off to do regular joining stuff */
if (ast_test_flag(&conference_bridge_user->flags, OPTION_MARKEDUSER | OPTION_WAITMARKED)) {
post_join_marked(conference_bridge, conference_bridge_user);
@@ -533,6 +538,9 @@ static void leave_conference_bridge(struct conference_bridge *conference_bridge
}
}
} else {
+ /* Set device state to "not in use" */
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, "confbridge:%s", conference_bridge->name);
+
ao2_unlink(conference_bridges, conference_bridge);
}