[Asterisk-code-review] res_pjsip_session: Deferred re-INVITE without SDP send a=sendrecv ins... (asterisk[18])
Joshua Colp
asteriskteam at digium.com
Thu Sep 3 08:15:15 CDT 2020
Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/14880 )
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 resume 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(-)
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/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 147ebad..f07ee38 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2194,11 +2194,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/+/14880
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I60341ce3d87f95869f3bc6dc358bd3e8286477a6
Gerrit-Change-Number: 14880
Gerrit-PatchSet: 2
Gerrit-Owner: Patrick Verzele <patrick at verzele.be>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200903/1c67898f/attachment.html>
More information about the asterisk-code-review
mailing list