summaryrefslogtreecommitdiff
path: root/pbx.c
diff options
context:
space:
mode:
authorJeremy McNamara <jj@nufone.net>2003-11-24 03:43:14 +0000
committerJeremy McNamara <jj@nufone.net>2003-11-24 03:43:14 +0000
commit541568fbb6496bc5d644cfebd9a63a5a0710d06d (patch)
tree84f880a58a68d2324ab07a8b8169217f5c6dca02 /pbx.c
parent171b29fd4c591322244b286cb2bfa700eb8283c9 (diff)
deal with accountcode correctly and update CDR on a goto
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pbx.c b/pbx.c
index f7dd0a2f0..ccc42c94f 100755
--- a/pbx.c
+++ b/pbx.c
@@ -3828,6 +3828,7 @@ int ast_pbx_outgoing_exten(char *type, int format, void *data, int timeout, char
LOAD_OH(oh);
chan = __ast_request_and_dial(type, format, data, timeout, reason, callerid, &oh);
if (chan) {
+ pbx_builtin_setaccount(chan, account);
if (chan->_state == AST_STATE_UP) {
res = 0;
if (option_verbose > 3)
@@ -3883,6 +3884,7 @@ int ast_pbx_outgoing_exten(char *type, int format, void *data, int timeout, char
free(as);
return -1;
}
+ pbx_builtin_setaccount(chan, account);
as->chan = chan;
strncpy(as->context, context, sizeof(as->context) - 1);
strncpy(as->exten, exten, sizeof(as->exten) - 1);
@@ -3938,6 +3940,7 @@ int ast_pbx_outgoing_app(char *type, int format, void *data, int timeout, char *
if (sync) {
chan = ast_request_and_dial(type, format, data, timeout, reason, callerid);
if (chan) {
+ pbx_builtin_setaccount(chan, account);
if (variable) {
vartmp = ast_strdupa(variable);
for (var = strtok_r(vartmp, "|", &vartmp); var; var = strtok_r(NULL, "|", &vartmp)) {
@@ -3986,6 +3989,7 @@ int ast_pbx_outgoing_app(char *type, int format, void *data, int timeout, char *
free(as);
return -1;
}
+ pbx_builtin_setaccount(chan, account);
as->chan = chan;
strncpy(as->app, app, sizeof(as->app) - 1);
if (appdata)
@@ -4321,6 +4325,7 @@ static int pbx_builtin_goto(struct ast_channel *chan, void *data)
strncpy(chan->context, context, sizeof(chan->context)-1);
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Goto (%s,%s,%d)\n", chan->context,chan->exten, chan->priority+1);
+ ast_cdr_update(chan);
return 0;
}