switch_t38_options_t *t38_options = sofia_glue_extract_t38_options(session, sip->sip_payload->pl_data);
if (!t38_options) {
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_WARNING, "%s Error parsing SDP:\n%s\n",
- switch_channel_get_name(tech_pvt->channel), sip->sip_payload->pl_data);
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Could not parse T.38 options from sdp.\n");
+ switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "T.38 NEGOTIATION ERROR");
+ switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
+ switch_core_session_rwunlock(other_session);
goto end;
} else {
char *remote_host = switch_rtp_get_remote_host(tech_pvt->rtp_session);
}
}
-
- if (t38_options) {
- sofia_glue_copy_t38_options(t38_options, other_session);
- } else {
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Could not parse T.38 options from sdp.\n");
- switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "T.38 NEGOTIATION ERROR");
- switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
- goto end;
- }
+ sofia_glue_copy_t38_options(t38_options, other_session);
}
}