[Asterisk-code-review] res_pjsip_session: Deferred re-INVITE without SDP send a=sendrecv ins... (asterisk[13])

Patrick Verzele asteriskteam at digium.com
Tue Sep 1 08:47:28 CDT 2020


Patrick Verzele has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14888 )


Change subject: res_pjsip_session: Deferred re-INVITE without SDP send a=sendrecv instead of a=sendonly
......................................................................

res_pjsip_session: Deferred re-INVITE without SDP send a=sendrecv instead of a=sendonly

Building on ASTERISK-25854. When the device requests hold by sending SDP with attribute recvonly, asterisk places the session in sendonly mode. When the device later requests to resumt the call by using a re-INVITE excluding SDP, asterisk needs to change the sendonly mode to sendrecv again.

Change-Id: I60341ce3d87f95869f3bc6dc358bd3e8286477a6
---
M res/res_pjsip_session.c
1 file changed, 4 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/14888/1

diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index c5298b2..eb0db18 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -1162,11 +1162,13 @@
 			pjmedia_sdp_media *m = local->media[i];
 			pjmedia_sdp_attr *recvonly;
 			pjmedia_sdp_attr *inactive;
+			pjmedia_sdp_attr *sendonly;
 
 			recvonly = pjmedia_sdp_attr_find2(m->attr_count, m->attr, "recvonly", NULL);
 			inactive = pjmedia_sdp_attr_find2(m->attr_count, m->attr, "inactive", NULL);
-			if (recvonly || inactive) {
-				pjmedia_sdp_attr *to_remove = recvonly ?: inactive;
+			sendonly = pjmedia_sdp_attr_find2(m->attr_count, m->attr, "sendonly", NULL);
+			if (recvonly || inactive || sendonly) {
+				pjmedia_sdp_attr *to_remove = recvonly ?: inactive ?: sendonly;
 				pjmedia_sdp_attr *sendrecv;
 
 				pjmedia_sdp_attr_remove(&m->attr_count, m->attr, to_remove);

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I60341ce3d87f95869f3bc6dc358bd3e8286477a6
Gerrit-Change-Number: 14888
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Verzele <patrick at verzele.be>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200901/ecce1c1e/attachment-0001.html>


More information about the asterisk-code-review mailing list