summaryrefslogtreecommitdiff
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@digium.com>2008-04-21 23:42:45 +0000
committerJeff Peeler <jpeeler@digium.com>2008-04-21 23:42:45 +0000
commit41fd7a6a21fc870f75ceb219d130e0bd6519636c (patch)
tree5ea0c0e4501835ff0a5f3ba5d5857d07de851abb /channels/chan_mgcp.c
parentf773e294f17bf2460b1dee4b46a78aa8e59fbb68 (diff)
(closes issue #6113)
Reported by: oej Tested by: jpeeler This patch implements multiple parking lots for parked calls. The default parkinglot is used by default, however setting the channel variable PARKINGLOT in the dialplan will allow use of any other configured parkinglot. See configs/features.conf.sample for more details on setting up another non-default parkinglot. Also, one can (currently) set the default parkinglot to use in the driver configuration file via the parkinglot option. Patch initially written by oej, brought up to date and finalized by mvanbaak, and then stabilized and converted to astobj2 by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r--channels/chan_mgcp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index f18dac361..021999abd 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -143,6 +143,7 @@ static char context[AST_MAX_EXTENSION] = "default";
static char language[MAX_LANGUAGE] = "";
static char musicclass[MAX_MUSICCLASS] = "";
+static char parkinglot[AST_MAX_CONTEXT];
static char cid_num[AST_MAX_EXTENSION] = "";
static char cid_name[AST_MAX_EXTENSION] = "";
@@ -317,6 +318,7 @@ struct mgcp_endpoint {
char musicclass[MAX_MUSICCLASS];
char curtone[80]; /*!< Current tone */
char mailbox[AST_MAX_EXTENSION];
+ char parkinglot[AST_MAX_CONTEXT]; /*!< Parkinglot */
struct ast_event_sub *mwi_event_sub;
ast_group_t callgroup;
ast_group_t pickupgroup;
@@ -3685,6 +3687,8 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
}
} else if (!strcasecmp(v->name, "musiconhold")) {
ast_copy_string(musicclass, v->value, sizeof(musicclass));
+ } else if (!strcasecmp(v->name, "parkinglot")) {
+ ast_copy_string(parkinglot, v->value, sizeof(parkinglot));
} else if (!strcasecmp(v->name, "callgroup")) {
cur_callergroup = ast_get_group(v->value);
} else if (!strcasecmp(v->name, "pickupgroup")) {
@@ -3748,6 +3752,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
ast_copy_string(e->language, language, sizeof(e->language));
ast_copy_string(e->musicclass, musicclass, sizeof(e->musicclass));
ast_copy_string(e->mailbox, mailbox, sizeof(e->mailbox));
+ ast_copy_string(e->parkinglot, parkinglot, sizeof(e->parkinglot));
if (!ast_strlen_zero(e->mailbox)) {
char *mailbox, *context;
context = mailbox = ast_strdupa(e->mailbox);
@@ -3856,6 +3861,7 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v)
ast_copy_string(e->language, language, sizeof(e->language));
ast_copy_string(e->musicclass, musicclass, sizeof(e->musicclass));
ast_copy_string(e->mailbox, mailbox, sizeof(e->mailbox));
+ ast_copy_string(e->parkinglot, parkinglot, sizeof(e->parkinglot));
if (!ast_strlen_zero(mailbox)) {
ast_verb(3, "Setting mailbox '%s' on %s@%s\n", mailbox, gw->name, e->name);
}