Skip to content
Snippets Groups Projects
Commit d73281e2 authored by Mark Spencer's avatar Mark Spencer
Browse files

Check for call forwarding while waiting for answer, too

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@705 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent f4c5c7a8
No related branches found
No related tags found
No related merge requests found
......@@ -186,6 +186,17 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
*allowdisconnect = o->allowdisconnect;
}
} else if (o->chan == winner) {
if (strlen(o->chan->call_forward)) {
/* Before processing channel, go ahead and check for forwarding */
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Now forwarding %s to '%s@%s' (thanks to %s)\n", in->name, o->chan->call_forward, o->chan->context, o->chan->name);
/* Setup parameters */
strncpy(in->exten, o->chan->call_forward, sizeof(in->exten));
strncpy(in->context, o->chan->context, sizeof(in->context));
in->priority = 0;
*to = 0;
break;
}
f = ast_read(winner);
if (f) {
if (f->frametype == AST_FRAME_CONTROL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment