[mod_sofia] Fix handling of late offer

This commit is contained in:
Jakub Karolczyk 2022-09-09 11:07:19 +01:00
parent 7b18e8c902
commit 71aa3cb03c

View File

@ -8576,8 +8576,12 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
if (!tech_pvt) goto done; if (!tech_pvt) goto done;
if (tech_pvt->mparams.num_codecs) { if (tech_pvt->mparams.num_codecs) {
if (sofia_test_flag(tech_pvt, TFLAG_GOT_ACK)) {
match = sofia_media_negotiate_sdp(session, r_sdp, SDP_TYPE_REQUEST);
} else {
match = sofia_media_negotiate_sdp(session, r_sdp, SDP_TYPE_RESPONSE); match = sofia_media_negotiate_sdp(session, r_sdp, SDP_TYPE_RESPONSE);
} }
}
if (match) { if (match) {
switch_channel_set_flag(tech_pvt->channel, CF_REINVITE); switch_channel_set_flag(tech_pvt->channel, CF_REINVITE);