diff options
author | Martin Pycko <martinp@digium.com> | 2003-10-01 21:01:31 +0000 |
---|---|---|
committer | Martin Pycko <martinp@digium.com> | 2003-10-01 21:01:31 +0000 |
commit | b239d0de273d55ce72bb026736c3a18c6f6be194 (patch) | |
tree | 1df9b399a1b59f781fe716efc5761e9f492d9677 /channel.c | |
parent | c0dde4ac5bd68b8003eead4120f4edc836452fac (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-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)) |