diff options
author | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-10-01 21:01:31 +0000 |
---|---|---|
committer | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-10-01 21:01:31 +0000 |
commit | ef4363371f4b59d7226cf34eb3344abb97a8f83a (patch) | |
tree | 1df9b399a1b59f781fe716efc5761e9f492d9677 /channel.c | |
parent | 143f06cec4526c4f8f9dadb3d3533b9c77ac250c (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-x | channel.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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)) |