From: Henning Westerholt Date: Tue, 21 Mar 2023 07:48:38 +0000 (+0000) Subject: chan_pjsip: fix music on hold continues after INVITE with replaces X-Git-Tag: 21.0.0-pre1~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58e88dec90c3e2d450cc005238abe9076eb494d7;p=thirdparty%2Fasterisk.git chan_pjsip: fix music on hold continues after INVITE with replaces In a three party scenario with INVITE with replaces, we need to unhold the call, otherwise one party continues to get music on hold, and the call is not properly bridged between them. ASTERISK-30428 Change-Id: I5675df11e739be5226b328f8828d4b8d81fbefb4 --- diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c index 8890d235b5..a20bf6ba4d 100644 --- a/res/res_pjsip_refer.c +++ b/res/res_pjsip_refer.c @@ -1019,6 +1019,10 @@ static int refer_incoming_invite_request(struct ast_sip_session *session, struct ast_debug(3, "INVITE with Replaces being attempted. '%s' --> '%s'\n", ast_channel_name(session->channel), ast_channel_name(invite.channel)); + /* Unhold the channel now, as later we are not having access to it anymore */ + ast_queue_unhold(session->channel); + ast_queue_frame(session->channel, &ast_null_frame); + if (!invite.bridge) { struct ast_channel *chan = session->channel;