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
pull/29/head
Patrick Verzele 5 years ago committed by Friendly Automation
parent 1a5597741f
commit f8fe20eb9f

@ -2194,11 +2194,13 @@ static pj_bool_t session_reinvite_on_rx_request(pjsip_rx_data *rdata)
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);

Loading…
Cancel
Save