[Asterisk-code-review] pjsip: 183 without To tag does not negotiate media (asterisk[15])

Joshua Colp asteriskteam at digium.com
Mon Nov 27 09:54:05 CST 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/7350 )

Change subject: pjsip: 183 without To tag does not negotiate media
......................................................................

pjsip: 183 without To tag does not negotiate media

If a 183 with sdp response is receive without a To tag the sdp is not
negotiated. According to RFC 3261 section 12.1.2 while a To tag is required,
the client needs to still be able to handle the missing tag case for
backwards compatibility.

This patch, accepted by and applied to pjproject, makes it so if an incoming
180/183 with SDP comes in without a To tag it gets appropriately handled.

ASTERISK-27442 #close

Change-Id: Ic9d6b01e05e8f4874eebbd7adfe05d932025d203
---
A third-party/pjproject/patches/0040-183_without_to_tag.patch
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/third-party/pjproject/patches/0040-183_without_to_tag.patch b/third-party/pjproject/patches/0040-183_without_to_tag.patch
new file mode 100644
index 0000000..e8692fe
--- /dev/null
+++ b/third-party/pjproject/patches/0040-183_without_to_tag.patch
@@ -0,0 +1,17 @@
+diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
+index c9686a0..fc52a63 100644
+--- a/pjsip/src/pjsip-ua/sip_inv.c
++++ b/pjsip/src/pjsip-ua/sip_inv.c
+@@ -4156,9 +4156,10 @@ static void inv_on_state_calling( pjsip_inv_session *inv, pjsip_event *e)
+ 		    status = pjsip_inv_send_msg(inv, cancel);
+ 	    }
+ 
+-	    if (dlg->remote.info->tag.slen) {
++	    if (tsx->status_code != 100) {
+ 
+-		inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
++		if (dlg->remote.info->tag.slen)
++		    inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
+ 
+ 		inv_check_sdp_in_incoming_msg(inv, tsx, 
+ 					      e->body.tsx_state.src.rdata);

-- 
To view, visit https://gerrit.asterisk.org/7350
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9d6b01e05e8f4874eebbd7adfe05d932025d203
Gerrit-Change-Number: 7350
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171127/145bdd53/attachment-0001.html>


More information about the asterisk-code-review mailing list