app_dial/queue/followme: 'I' options to block initial updates in both directions

The 'I' option currently blocks initial CONNECTEDLINE or REDIRECTING updates
from the called parties to the caller.

This patch also blocks updates in the other direction before call is
answered.

ASTERISK-27980

Change-Id: I6ce9e151a2220ce9e95aa66666933cfb9e2a4a01
This commit is contained in:
Alexei Gradinari
2018-09-26 16:05:59 -04:00
parent 4eef448acc
commit 190b3d7412
3 changed files with 21 additions and 5 deletions

View File

@@ -5429,12 +5429,20 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
case AST_FRAME_CONTROL:
switch (f->subclass.integer) {
case AST_CONTROL_CONNECTED_LINE:
if (o->block_connected_update) {
ast_verb(3, "Connected line update to %s prevented.\n", ast_channel_name(o->chan));
break;
}
if (ast_channel_connected_line_sub(in, o->chan, f, 1) &&
ast_channel_connected_line_macro(in, o->chan, f, 0, 1)) {
ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
}
break;
case AST_CONTROL_REDIRECTING:
if (o->block_connected_update) {
ast_verb(3, "Redirecting update to %s prevented.\n", ast_channel_name(o->chan));
break;
}
if (ast_channel_redirecting_sub(in, o->chan, f, 1) &&
ast_channel_redirecting_macro(in, o->chan, f, 0, 1)) {
ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);