[Asterisk-code-review] chan_pjsip: fix music on hold continues after INVITE with replaces (asterisk[18])

Henning Westerholt asteriskteam at digium.com
Tue Mar 21 02:59:49 CDT 2023


Henning Westerholt has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/20020 )


Change subject: chan_pjsip: fix music on hold continues after INVITE with replaces
......................................................................

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 continue to get music on
hold, and the call is not properly bridged between them.

ASTERISK-30428

Change-Id: I5675df11e739be5226b328f8828d4b8d81fbefb4
---
M res/res_pjsip_refer.c
1 file changed, 19 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/20/20020/1

diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c
index 8890d23..d68d215 100644
--- a/res/res_pjsip_refer.c
+++ b/res/res_pjsip_refer.c
@@ -1019,6 +1019,10 @@
 	ast_debug(3, "INVITE with Replaces being attempted.  '%s' --> '%s'\n",
 		ast_channel_name(session->channel), ast_channel_name(invite.channel));
 
+	/* Unhold the channel already, 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;
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/20020
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I5675df11e739be5226b328f8828d4b8d81fbefb4
Gerrit-Change-Number: 20020
Gerrit-PatchSet: 1
Gerrit-Owner: Henning Westerholt <hw at gilawa.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230321/ee9d5f7c/attachment.html>


More information about the asterisk-code-review mailing list