summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorMartin Pycko <martinp@digium.com>2003-10-01 21:01:31 +0000
committerMartin Pycko <martinp@digium.com>2003-10-01 21:01:31 +0000
commitb239d0de273d55ce72bb026736c3a18c6f6be194 (patch)
tree1df9b399a1b59f781fe716efc5761e9f492d9677 /channel.c
parentc0dde4ac5bd68b8003eead4120f4edc836452fac (diff)
Pass accountcode to outgoing spool call when originated with Context&Extension&Priority
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rwxr-xr-xchannel.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/channel.c b/channel.c
index e6f0e98ae..094a8a330 100755
--- a/channel.c
+++ b/channel.c
@@ -1509,12 +1509,14 @@ struct ast_channel *__ast_request_and_dial(char *type, int format, void *data, i
while( (var = strtok_r(NULL, "|", &tmp)) ) {
pbx_builtin_setvar( chan, var );
} /* /JDG */
- if (*oh->context)
+ if (oh->context && *oh->context)
strncpy(chan->context, oh->context, sizeof(chan->context) - 1);
- if (*oh->exten)
+ if (oh->exten && *oh->exten)
strncpy(chan->exten, oh->exten, sizeof(chan->exten) - 1);
- if (*oh->callerid)
+ if (oh->callerid && *oh->callerid)
ast_set_callerid(chan, oh->callerid, 1);
+ if (oh->account && *oh->account)
+ ast_cdr_setaccount(chan, oh->account);
chan->priority = oh->priority;
}
if (callerid && strlen(callerid))