Support hold/unhold in Zap, update IAX2 parser to know about modern commands, forward hold/unhold in dial, add hold device state

and implement holding in the SLA.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2006-07-08 02:24:07 +00:00
parent a7d62fd60c
commit 4c90cf59b7
8 changed files with 220 additions and 19 deletions

View File

@@ -728,10 +728,13 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
if (ast_write(outgoing->chan, f))
ast_log(LOG_WARNING, "Unable to forward voice\n");
}
if (single && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_VIDUPDATE)) {
if (single && (f->frametype == AST_FRAME_CONTROL) &&
((f->subclass == AST_CONTROL_HOLD) ||
(f->subclass == AST_CONTROL_UNHOLD) ||
(f->subclass == AST_CONTROL_VIDUPDATE))) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "%s requested a video update, passing it to %s\n", in->name,outgoing->chan->name);
ast_indicate(outgoing->chan, AST_CONTROL_VIDUPDATE);
ast_verbose(VERBOSE_PREFIX_3 "%s requested special control %d, passing it to %s\n", in->name, f->subclass, outgoing->chan->name);
ast_indicate_data(outgoing->chan, f->subclass, f->data, f->datalen);
}
ast_frfree(f);
}