aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_spool.c
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-01 21:01:31 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-01 21:01:31 +0000
commitef4363371f4b59d7226cf34eb3344abb97a8f83a (patch)
tree1df9b399a1b59f781fe716efc5761e9f492d9677 /pbx/pbx_spool.c
parent143f06cec4526c4f8f9dadb3d3533b9c77ac250c (diff)
Pass accountcode to outgoing spool call when originated with Context&Extension&Priority
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1597 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_spool.c')
-rwxr-xr-xpbx/pbx_spool.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index d51c17e9c..638dea640 100755
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -69,6 +69,8 @@ struct outgoing {
/* Channel variables */
char variable[10*256];
+ /* Account code */
+ char account[256];
/* Maximum length of call */
int maxlen;
@@ -159,6 +161,8 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
strncat(o->variable, c, sizeof(o->variable) - strlen(o->variable) - 1);
strncat(o->variable, "|", sizeof(o->variable) - strlen(o->variable) - 1);
+ } else if (!strcasecmp(buf, "account")) {
+ strncpy(o->account, c, sizeof(o->account) - 1);
} else {
ast_log(LOG_WARNING, "Unknown keyword '%s' at line %d of %s\n", buf, lineno, fn);
}
@@ -185,11 +189,11 @@ static void *attempt_thread(void *data)
if (strlen(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->callerid, o->variable);
+ 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->callerid, o->variable, o->account);
} 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->callerid, o->variable );
+ 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->callerid, o->variable, o->account);
}
if (res) {
ast_log(LOG_NOTICE, "Call failed to go through, reason %d\n", reason);