aboutsummaryrefslogtreecommitdiffstats
path: root/channel.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 /channel.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 '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))