Skip to content
Snippets Groups Projects
Commit 7e918cee authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Sébastien Blin
Browse files

sip: respond with the original offer once receiving empty offer from RE-INVITE

Gitlab: #528

Change-Id: I90ad328a2e24da9903bf39bcb595c84683c36f7e
parent 4a086ec6
No related branches found
No related tags found
No related merge requests found
...@@ -927,6 +927,8 @@ invite_session_state_changed_cb(pjsip_inv_session* inv, pjsip_event* ev) ...@@ -927,6 +927,8 @@ invite_session_state_changed_cb(pjsip_inv_session* inv, pjsip_event* ev)
static pj_status_t static pj_status_t
reinvite_received_cb(pjsip_inv_session* inv, const pjmedia_sdp_session* offer, pjsip_rx_data* rdata) reinvite_received_cb(pjsip_inv_session* inv, const pjmedia_sdp_session* offer, pjsip_rx_data* rdata)
{ {
if (!offer)
return !PJ_SUCCESS;
if (auto call = getCallFromInvite(inv)) { if (auto call = getCallFromInvite(inv)) {
return call->onReceiveOffer(offer, rdata); return call->onReceiveOffer(offer, rdata);
} }
...@@ -975,7 +977,7 @@ sdp_create_offer_cb(pjsip_inv_session* inv, pjmedia_sdp_session** p_offer) ...@@ -975,7 +977,7 @@ sdp_create_offer_cb(pjsip_inv_session* inv, pjmedia_sdp_session** p_offer)
sdp.setPublishedIP(address); sdp.setPublishedIP(address);
// This list should be provided by the client. Kept for backward compatibility. // This list should be provided by the client. Kept for backward compatibility.
auto mediaList = account->createDefaultMediaList(account->isVideoEnabled()); auto mediaList = account->createDefaultMediaList(!call->isAudioOnly());
const bool created = sdp.createOffer(mediaList); const bool created = sdp.createOffer(mediaList);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment