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

Henning Westerholt asteriskteam at digium.com
Mon Apr 10 10:48:37 CDT 2023


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


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 continues 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/50/20050/1

diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c
index 8890d23..a20bf6b 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 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;
 

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

Gerrit-Project: asterisk
Gerrit-Branch: 20
Gerrit-Change-Id: I5675df11e739be5226b328f8828d4b8d81fbefb4
Gerrit-Change-Number: 20050
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/20230410/3999a18b/attachment.html>


More information about the asterisk-code-review mailing list