Merge "app_dial.c: Make 'A' option pass COLP updates."

This commit is contained in:
Matt Jordan
2015-09-29 07:27:02 -05:00
committed by Gerrit Code Review

View File

@@ -2748,7 +2748,9 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
active_chan = ast_waitfor_n(chans, 2, &ms);
if (active_chan) {
struct ast_channel *other_chan;
struct ast_frame *fr = ast_read(active_chan);
if (!fr) {
ast_autoservice_chan_hangup_peer(chan, peer);
res = -1;
@@ -2769,6 +2771,20 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
ast_autoservice_chan_hangup_peer(chan, peer);
res = -1;
goto done;
case AST_CONTROL_CONNECTED_LINE:
/* Pass COLP update to the other channel. */
if (active_chan == chan) {
other_chan = peer;
} else {
other_chan = chan;
}
if (ast_channel_connected_line_sub(active_chan, other_chan, fr, 1)
&& ast_channel_connected_line_macro(active_chan,
other_chan, fr, other_chan == chan, 1)) {
ast_indicate_data(other_chan, fr->subclass.integer,
fr->data.ptr, fr->datalen);
}
break;
default:
break;
}