mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridge
There is a problem when an INVITE-with-Replaces transfer targets a channel in a ConfBridge. The transfer will unconditionally swap out the ConfBridge channel. Unfortunately, the ConfBridge state will not be aware of this change. Unexpected behavior will happen as a result since ConfBridge channels currently can only be replaced by a masquerade and not normal bridge channel moves. * We just need to pretend that the channel isn't in a bridge (like other transfer methods already do) so the transfer channel will masquerade into the ConfBridge channel. Change-Id: I209beb0e748fa4f4b92a576f36afa8f495ba4c82
This commit is contained in:
@@ -917,10 +917,7 @@ static int invite_replaces(void *data)
|
||||
ast_channel_ref(invite->session->channel);
|
||||
invite->channel = invite->session->channel;
|
||||
|
||||
ast_channel_lock(invite->channel);
|
||||
invite->bridge = ast_channel_get_bridge(invite->channel);
|
||||
ast_channel_unlock(invite->channel);
|
||||
|
||||
invite->bridge = ast_bridge_transfer_acquire_bridge(invite->channel);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user