mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Merge "bridge: When performing a blonde transfer update connected line information." into 13
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user