[Asterisk-cvs] asterisk/apps app_dial.c, 1.122, 1.123 app_queue.c,
1.111, 1.112
markster at lists.digium.com
markster at lists.digium.com
Sat Jan 8 11:19:01 CST 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv6862/apps
Modified Files:
app_dial.c app_queue.c
Log Message:
Make queue support channel variable inheritance (bug #3274)
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- app_dial.c 6 Jan 2005 17:19:54 -0000 1.122
+++ app_dial.c 8 Jan 2005 17:23:29 -0000 1.123
@@ -488,9 +488,6 @@
char *newnum;
char *l;
char *url=NULL; /* JDG */
- struct ast_var_t *current;
- struct varshead *headp, *newheadp;
- struct ast_var_t *newvar;
unsigned int calldurationlimit=0;
char *cdl;
time_t now;
@@ -511,9 +508,7 @@
char toast[80];
int play_to_caller=0,play_to_callee=0;
int playargs=0, sentringing=0, moh=0;
- char *varname;
char *mohclass = NULL;
- int vartype;
char *outbound_group = NULL;
char *macro_result = NULL, *macro_transfer_dest = NULL;
int digit = 0;
@@ -853,40 +848,8 @@
}
}
- /* Contitionally copy channel variables to the newly created channel */
- headp = &chan->varshead;
- AST_LIST_TRAVERSE(headp, current, entries) {
- varname = ast_var_full_name(current);
- vartype = 0;
- if (varname) {
- if (varname[0] == '_') {
- vartype = 1;
- if (varname[1] == '_')
- vartype = 2;
- }
- }
- if (vartype == 1) {
- newvar = ast_var_assign((char*)&(varname[1]),
- ast_var_value(current));
- newheadp = &tmp->chan->varshead;
- AST_LIST_INSERT_HEAD(newheadp, newvar, entries);
- if (option_debug)
- ast_log(LOG_DEBUG, "Copying soft-transferable variable %s.\n",
- ast_var_name(newvar));
- } else if (vartype == 2) {
- newvar = ast_var_assign(ast_var_full_name(current),
- ast_var_value(current));
- newheadp = &tmp->chan->varshead;
- AST_LIST_INSERT_HEAD(newheadp, newvar, entries);
- if (option_debug)
- ast_log(LOG_DEBUG, "Copying hard-transferable variable %s.\n",
- ast_var_name(newvar));
- } else {
- if (option_debug)
- ast_log(LOG_DEBUG, "Not copying variable %s.\n",
- ast_var_name(current));
- }
- }
+ /* Inherit specially named variables from parent channel */
+ ast_channel_inherit_variables(chan, tmp->chan);
tmp->chan->appl = "AppDial";
tmp->chan->data = "(Outgoing Line)";
Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- app_queue.c 7 Jan 2005 04:05:22 -0000 1.111
+++ app_queue.c 8 Jan 2005 17:23:29 -0000 1.112
@@ -823,8 +823,13 @@
tmp->chan->cid.cid_name = strdup(qe->chan->cid.cid_name);
if (qe->chan->cid.cid_ani)
tmp->chan->cid.cid_ani = strdup(qe->chan->cid.cid_ani);
+
+ /* Inherit specially named variables from parent channel */
+ ast_channel_inherit_variables(qe->chan, tmp->chan);
+
/* Presense of ADSI CPE on outgoing channel follows ours */
tmp->chan->adsicpe = qe->chan->adsicpe;
+
/* Place the call, but don't wait on the answer */
res = ast_call(tmp->chan, location, 0);
if (res) {
More information about the svn-commits
mailing list