summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-06-13 08:36:41 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-06-13 08:36:41 -0500
commit0b8b95292154508a37312adcc196f7309278a8d8 (patch)
tree0d5ed6a6c3ec2602736d8dad32d5457c91e845fe /main
parent2618d1e6380659441c3ab5c94a8cdd2f26c53f49 (diff)
parentdbb067279e7d7555c5090546572a0d01f796fe55 (diff)
Merge "bridge: When performing a blonde transfer update connected line information." into 13
Diffstat (limited to 'main')
-rw-r--r--main/bridge_channel.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/bridge_channel.c b/main/bridge_channel.c
index 0a5c16c35..b7f0ba51a 100644
--- a/main/bridge_channel.c
+++ b/main/bridge_channel.c
@@ -1761,6 +1761,17 @@ static void after_bridge_move_channel(struct ast_channel *chan_bridged, void *da
return;
}
+ /* The ast_channel_move function will end up updating the connected line information
+ * on chan_target to the value we have here, but will not inform it. To ensure that
+ * AST_FRAME_READ_ACTION_CONNECTED_LINE_MACRO is executed we wipe it away here. If
+ * we don't do this then the change will be considered redundant, since the connected
+ * line information is already there (despite the channel not being told).
+ */
+ ast_channel_lock(chan_target);
+ ast_party_connected_line_free(ast_channel_connected_indicated(chan_target));
+ ast_party_connected_line_init(ast_channel_connected_indicated(chan_target));
+ ast_channel_unlock(chan_target);
+
if ((payload_size = ast_connected_line_build_data(connected_line_data,
sizeof(connected_line_data), &connected_target, NULL)) != -1) {
struct ast_control_read_action_payload *frame_payload;
@@ -1774,6 +1785,15 @@ static void after_bridge_move_channel(struct ast_channel *chan_bridged, void *da
ast_queue_control_data(chan_target, AST_CONTROL_READ_ACTION, frame_payload, frame_size);
}
+ /* A connected line update is queued so that if chan_target is remotely involved with
+ * anything (such as dialing a channel) the other channel(s) will be informed of the
+ * new channel they are involved with.
+ */
+ ast_channel_lock(chan_target);
+ ast_connected_line_copy_from_caller(&connected_target, ast_channel_caller(chan_target));
+ ast_channel_queue_connected_line_update(chan_target, &connected_target, NULL);
+ ast_channel_unlock(chan_target);
+
ast_party_connected_line_free(&connected_target);
}