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

Friendly Automation asteriskteam at digium.com
Mon Apr 10 12:07:26 CDT 2023


Friendly Automation has submitted this change. ( 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 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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit




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/+/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: 4
Gerrit-Owner: Henning Westerholt <hw at gilawa.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-CC: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230410/7c943fd1/attachment-0001.html>


More information about the asterisk-code-review mailing list