[asterisk-commits] mvanbaak: branch group/multiparking r114020 - /team/group/multiparking/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 10 07:08:02 CDT 2008
Author: mvanbaak
Date: Thu Apr 10 07:08:01 2008
New Revision: 114020
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114020
Log:
add parkinglot to a couple of channel drivers
Modified:
team/group/multiparking/channels/chan_console.c
team/group/multiparking/channels/chan_gtalk.c
team/group/multiparking/channels/chan_jingle.c
team/group/multiparking/channels/chan_mgcp.c
team/group/multiparking/channels/chan_unistim.c
Modified: team/group/multiparking/channels/chan_console.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/channels/chan_console.c?view=diff&rev=114020&r1=114019&r2=114020
==============================================================================
--- team/group/multiparking/channels/chan_console.c (original)
+++ team/group/multiparking/channels/chan_console.c Thu Apr 10 07:08:01 2008
@@ -141,6 +141,8 @@
AST_STRING_FIELD(mohinterpret);
/*! Default language */
AST_STRING_FIELD(language);
+ /*! Default parkinglot */
+ AST_STRING_FIELD(parkinglot);
);
/*! Current channel for this device */
struct ast_channel *owner;
@@ -1004,6 +1006,7 @@
"=== ---> CallerID Name: %s\n"
"=== ---> MOH Interpret: %s\n"
"=== ---> Language: %s\n"
+ "=== ---> Parkinglot: %s\n"
"=== ---> Muted: %s\n"
"=== ---> Auto-Answer: %s\n"
"=== ---> Override Context: %s\n"
@@ -1011,7 +1014,7 @@
pvt->name, (pvt == active_pvt) ? "Yes" : "No",
pvt->input_device, pvt->output_device, pvt->context,
pvt->exten, pvt->cid_num, pvt->cid_name, pvt->mohinterpret,
- pvt->language, pvt->muted ? "Yes" : "No", pvt->autoanswer ? "Yes" : "No",
+ pvt->language, pvt->parkinglot, pvt->muted ? "Yes" : "No", pvt->autoanswer ? "Yes" : "No",
pvt->overridecontext ? "Yes" : "No");
console_pvt_unlock(pvt);
@@ -1236,6 +1239,7 @@
ast_string_field_set(pvt, language, "");
ast_string_field_set(pvt, cid_num, "");
ast_string_field_set(pvt, cid_name, "");
+ ast_string_field_set(pvt, parkinglot, "");
pvt->overridecontext = 0;
pvt->autoanswer = 0;
@@ -1248,6 +1252,7 @@
ast_string_field_set(pvt, language, globals.language);
ast_string_field_set(pvt, cid_num, globals.cid_num);
ast_string_field_set(pvt, cid_name, globals.cid_name);
+ ast_string_field_set(pvt, parkinglot, globals.parkinglot);
pvt->overridecontext = globals.overridecontext;
pvt->autoanswer = globals.autoanswer;
@@ -1287,6 +1292,7 @@
CV_F("callerid", store_callerid(pvt, value));
CV_BOOL("overridecontext", pvt->overridecontext);
CV_BOOL("autoanswer", pvt->autoanswer);
+ CV_STRFIELD("parkinglot", pvt, parkinglot);
if (pvt != &globals) {
CV_F("active", set_active(pvt, value))
Modified: team/group/multiparking/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/channels/chan_gtalk.c?view=diff&rev=114020&r1=114019&r2=114020
==============================================================================
--- team/group/multiparking/channels/chan_gtalk.c (original)
+++ team/group/multiparking/channels/chan_gtalk.c Thu Apr 10 07:08:01 2008
@@ -142,6 +142,7 @@
int amaflags; /*!< AMA Flags */
char user[AJI_MAX_JIDLEN];
char context[AST_MAX_CONTEXT];
+ char parkinglot[AST_MAX_CONTEXT]; /*!< Parkinglot */
char accountcode[AST_MAX_ACCOUNT_CODE]; /*!< Account code */
int capability;
ast_group_t callgroup; /*!< Call group */
@@ -1024,6 +1025,8 @@
ast_string_field_set(tmp, language, client->language);
if (!ast_strlen_zero(client->musicclass))
ast_string_field_set(tmp, musicclass, client->musicclass);
+ if (!ast_strlen_zero(client->parkinglot))
+ ast_string_field_set(tmp, parkinglot, client->parkinglot);
i->owner = tmp;
ast_module_ref(ast_module_info->self);
ast_copy_string(tmp->context, client->context, sizeof(tmp->context));
@@ -1794,6 +1797,8 @@
ast_parse_allow_disallow(&member->prefs, &member->capability, var->value, 1);
else if (!strcasecmp(var->name, "context"))
ast_copy_string(member->context, var->value, sizeof(member->context));
+ else if (!strcasecmp(var->name, "parkinglot"))
+ ast_copy_string(member->parkinglot, var->value, sizeof(member->parkinglot));
#if 0
else if (!strcasecmp(var->name, "candidate")) {
candidate = gtalk_create_candidate(var->value);
@@ -1832,6 +1837,7 @@
char *cat = NULL;
struct ast_config *cfg = NULL;
char context[AST_MAX_CONTEXT];
+ char parkinglot[AST_MAX_CONTEXT];
int allowguest = 1;
struct ast_variable *var;
struct gtalk *member;
@@ -1864,6 +1870,8 @@
ast_parse_allow_disallow(&prefs, &global_capability, var->value, 1);
else if (!strcasecmp(var->name, "context"))
ast_copy_string(context, var->value, sizeof(context));
+ else if (!strcasecmp(var->name, "parkinglot"))
+ ast_copy_string(parkinglot, var->value, sizeof(parkinglot));
else if (!strcasecmp(var->name, "bindaddr")) {
if (!(hp = ast_gethostbyname(var->value, &ahp))) {
ast_log(LOG_WARNING, "Invalid address: %s\n", var->value);
@@ -1892,6 +1900,7 @@
ast_copy_string(member->name, "guest", sizeof(member->name));
ast_copy_string(member->user, "guest", sizeof(member->user));
ast_copy_string(member->context, context, sizeof(member->context));
+ ast_copy_string(member->parkinglot, parkinglot, sizeof(member->parkinglot));
member->allowguest = allowguest;
member->prefs = prefs;
while (var) {
@@ -1904,6 +1913,9 @@
else if (!strcasecmp(var->name, "context"))
ast_copy_string(member->context, var->value,
sizeof(member->context));
+ else if (!strcasecmp(var->name, "parkinglot"))
+ ast_copy_string(member->parkinglot, var->value,
+ sizeof(member->parkinglot));
/* Idea to allow for custom candidates */
/*
else if (!strcasecmp(var->name, "candidate")) {
Modified: team/group/multiparking/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/channels/chan_jingle.c?view=diff&rev=114020&r1=114019&r2=114020
==============================================================================
--- team/group/multiparking/channels/chan_jingle.c (original)
+++ team/group/multiparking/channels/chan_jingle.c Thu Apr 10 07:08:01 2008
@@ -151,6 +151,7 @@
int allowguest;
char language[MAX_LANGUAGE]; /*!< Default language for prompts */
char musicclass[MAX_MUSICCLASS]; /*!< Music on Hold class */
+ char parkinglot[AST_MAX_CONTEXT]; /*!< Parkinglot */
};
struct jingle_container {
@@ -1741,6 +1742,9 @@
else if (!strcasecmp(var->name, "context"))
ast_copy_string(member->context, var->value,
sizeof(member->context));
+ else if (!strcasecmp(var->name, "parkinglot"))
+ ast_copy_string(member->parkinglot, var->value,
+ sizeof(member->parkinglot));
/* Idea to allow for custom candidates */
/*
else if (!strcasecmp(var->name, "candidate")) {
Modified: team/group/multiparking/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/channels/chan_mgcp.c?view=diff&rev=114020&r1=114019&r2=114020
==============================================================================
--- team/group/multiparking/channels/chan_mgcp.c (original)
+++ team/group/multiparking/channels/chan_mgcp.c Thu Apr 10 07:08:01 2008
@@ -143,6 +143,7 @@
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 @@
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 @@
}
} 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 @@
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 @@
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);
}
Modified: team/group/multiparking/channels/chan_unistim.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/channels/chan_unistim.c?view=diff&rev=114020&r1=114019&r2=114020
==============================================================================
--- team/group/multiparking/channels/chan_unistim.c (original)
+++ team/group/multiparking/channels/chan_unistim.c Thu Apr 10 07:08:01 2008
@@ -404,6 +404,8 @@
int amaflags;
/*! Codec supported */
int capability;
+ /*! Parkinglot */
+ char parkinglot[AST_MAX_CONTEXT];
struct unistim_line *next;
struct unistim_device *parent;
};
@@ -5110,6 +5112,8 @@
l->pickupgroup = ast_get_group(v->value);
else if (!strcasecmp(v->name, "mailbox"))
ast_copy_string(l->mailbox, v->value, sizeof(l->mailbox));
+ else if (!strcasecmp(v->name, "parkinglot"))
+ ast_copy_string(l->parkinglot, v->value, sizeof(l->parkinglot));
else if (!strcasecmp(v->name, "linelabel"))
unquote(linelabel, v->value, sizeof(linelabel) - 1);
else if (!strcasecmp(v->name, "extension")) {
More information about the asterisk-commits
mailing list