MODSOFIA-94

This commit is contained in:
Anthony Minessale 2010-08-17 11:16:55 -05:00
parent 5c93d44094
commit 2843f1ad00
2 changed files with 12 additions and 1 deletions

View File

@ -4039,7 +4039,16 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
if (status == 200 && sofia_test_flag(tech_pvt, TFLAG_T38_PASSTHRU)) {
if (sip->sip_payload && sip->sip_payload->pl_data) {
switch_t38_options_t *t38_options = sofia_glue_extract_t38_options(session, sip->sip_payload->pl_data);
sofia_glue_copy_t38_options(t38_options, other_session);
if (t38_options) {
sofia_glue_copy_t38_options(t38_options, other_session);
} else {
sofia_clear_flag(tech_pvt, TFLAG_T38_PASSTHRU);
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;
}
}
}

View File

@ -3387,6 +3387,8 @@ void sofia_glue_copy_t38_options(switch_t38_options_t *t38_options, switch_core_
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_t38_options_t *local_t38_options = switch_channel_get_private(channel, "t38_options");
switch_assert(t38_options);
if (!local_t38_options) {
local_t38_options = switch_core_session_alloc(session, sizeof(switch_t38_options_t));
}