summaryrefslogtreecommitdiff
path: root/main/channel_internal_api.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-08-07 12:46:36 +0000
committerMatthew Jordan <mjordan@digium.com>2012-08-07 12:46:36 +0000
commit5c4578f4ad9af0d13638ec72a2bc141227ec8b3c (patch)
tree77427fe11562062a59774f755a23ffc82c5cbff5 /main/channel_internal_api.c
parent096baa0897f556b2de6bfb8fa0acc09a504e39a4 (diff)
Add named callgroups/pickupgroups
This patch adds named calledgroups/pickupgroups to Asterisk. Named groups are implemented in parallel to the existing numbered callgroup/pickupgroup implementation. However, unlike the existing implementation, which is limited to a maximum of 64 defined groups, the number of defined groups allowed for named callgroups/pickupgroups is effectively unlimited. Named groups are configured with the keywords "namedcallgroup" and "namedpickupgroup". This corresponds to the numbered group definitions of "callgroup" and "pickupgroup". Note that as the implementation of named groups coexists with the existing numbered implementation, a defined named group of "4" does not equate to numbered group 4. Support for the named groups has been added to the SIP, DAHDI, and mISDN channel drivers. Review: https://reviewboard.asterisk.org/r/2043 Uploaded by: Guenther Kelleter(license #6372) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel_internal_api.c')
-rw-r--r--main/channel_internal_api.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c
index b659fb9b6..368940fa1 100644
--- a/main/channel_internal_api.c
+++ b/main/channel_internal_api.c
@@ -136,6 +136,9 @@ struct ast_channel {
struct varshead varshead; /*!< A linked list for channel variables. See \ref AstChanVar */
ast_group_t callgroup; /*!< Call group for call pickups */
ast_group_t pickupgroup; /*!< Pickup group - which calls groups can be picked up? */
+ struct ast_namedgroups *named_callgroups; /*!< Named call group for call pickups */
+ struct ast_namedgroups *named_pickupgroups; /*!< Named pickup group - which call groups can be picked up? */
+ struct timeval creationtime; /*!< The time of channel creation */
struct ast_readq_list readq;
struct ast_jb jb; /*!< The jitterbuffer state */
struct timeval dtmf_tv; /*!< The time that an in process digit began, or the last digit ended */
@@ -983,6 +986,14 @@ void ast_channel_varshead_set(struct ast_channel *chan, struct varshead *value)
{
chan->varshead = *value;
}
+struct timeval ast_channel_creationtime(struct ast_channel *chan)
+{
+ return chan->creationtime;
+}
+void ast_channel_creationtime_set(struct ast_channel *chan, struct timeval *value)
+{
+ chan->creationtime = *value;
+}
/* Evil softhangup accessors */
int ast_channel_softhangup_internal_flag(struct ast_channel *chan)
@@ -1026,6 +1037,24 @@ void ast_channel_pickupgroup_set(struct ast_channel *chan, ast_group_t value)
{
chan->pickupgroup = value;
}
+struct ast_namedgroups *ast_channel_named_callgroups(const struct ast_channel *chan)
+{
+ return chan->named_callgroups;
+}
+void ast_channel_named_callgroups_set(struct ast_channel *chan, struct ast_namedgroups *value)
+{
+ ast_unref_namedgroups(chan->named_callgroups);
+ chan->named_callgroups = ast_ref_namedgroups(value);
+}
+struct ast_namedgroups *ast_channel_named_pickupgroups(const struct ast_channel *chan)
+{
+ return chan->named_pickupgroups;
+}
+void ast_channel_named_pickupgroups_set(struct ast_channel *chan, struct ast_namedgroups *value)
+{
+ ast_unref_namedgroups(chan->named_pickupgroups);
+ chan->named_pickupgroups = ast_ref_namedgroups(value);
+}
/* Alertpipe functions */
int ast_channel_alert_write(struct ast_channel *chan)