mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@9606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -212,11 +215,7 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
|
||||
ast_log(LOG_WARNING, "Malformed Set: argument! Should be Set: Variable=value\n");
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
@@ -260,11 +259,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);
|
||||
|
Reference in New Issue
Block a user