aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_spool.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-11 18:31:59 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-11 18:31:59 +0000
commit0a0b84d8deb680293d6dcbe15b169f4bf084d8d8 (patch)
tree5c41daa1c544d5af1e159c2fd22ea4d3cd5e0011 /pbx/pbx_spool.c
parent39387e08ccf4896b76ad37e4aba0728fecdb1fd1 (diff)
Merged revisions 9581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r9581 | russell | 2006-02-11 13:15:00 -0500 (Sat, 11 Feb 2006) | 2 lines now that CDR is a loadable module, don't depend on it elsewhere (issue #6460) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9582 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_spool.c')
-rw-r--r--pbx/pbx_spool.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 2fa6f5f52..a03085ed6 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -86,6 +86,9 @@ struct outgoing {
char cid_num[256];
char cid_name[256];
+ /* account code */
+ char account[AST_MAX_ACCOUNT_CODE];
+
/* Variables and Functions */
struct ast_variable *vars;
@@ -211,11 +214,7 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
} else
ast_log(LOG_WARNING, "Malformed \"%s\" argument. Should be \"%s: variable=value\"\n", buf, buf);
} else if (!strcasecmp(buf, "account")) {
- var = ast_variable_new("CDR(accountcode|r)", c);
- if (var) {
- var->next = o->vars;
- o->vars = var;
- }
+ ast_copy_string(o->account, c, sizeof(o->account));
} else {
ast_log(LOG_WARNING, "Unknown keyword '%s' at line %d of %s\n", buf, lineno, fn);
}
@@ -259,11 +258,11 @@ static void *attempt_thread(void *data)
if (!ast_strlen_zero(o->app)) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Attempting call on %s/%s for application %s(%s) (Retry %d)\n", o->tech, o->dest, o->app, o->data, o->retries);
- res = ast_pbx_outgoing_app(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->app, o->data, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, NULL);
+ res = ast_pbx_outgoing_app(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->app, o->data, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
} else {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Attempting call on %s/%s for %s@%s:%d (Retry %d)\n", o->tech, o->dest, o->exten, o->context,o->priority, o->retries);
- res = ast_pbx_outgoing_exten(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, NULL);
+ res = ast_pbx_outgoing_exten(o->tech, AST_FORMAT_SLINEAR, o->dest, o->waittime * 1000, o->context, o->exten, o->priority, &reason, 2 /* wait to finish */, o->cid_num, o->cid_name, o->vars, o->account, NULL);
}
if (res) {
ast_log(LOG_NOTICE, "Call failed to go through, reason %d\n", reason);