FS-3571 try this, I don't have a way to test it so this is just guessing, give me a lab box if this doesn't work
This commit is contained in:
parent
259a3e9fc3
commit
842ea87d64
|
@ -1181,7 +1181,8 @@ typedef enum {
|
|||
CF_APP_TAGGED = (1 << 0),
|
||||
CF_APP_T38 = (1 << 1),
|
||||
CF_APP_T38_REQ = (1 << 2),
|
||||
CF_APP_T38_FAIL = (1 << 3)
|
||||
CF_APP_T38_FAIL = (1 << 3),
|
||||
CF_APP_T38_NEGOTIATED = (1 << 4)
|
||||
} switch_channel_app_flag_t;
|
||||
|
||||
|
||||
|
|
|
@ -806,7 +806,7 @@ static t38_mode_t negotiate_t38(pvt_t *pvt)
|
|||
switch_channel_set_private(channel, "t38_options", NULL);
|
||||
} else {
|
||||
pvt->t38_mode = T38_MODE_NEGOTIATED;
|
||||
|
||||
switch_channel_set_app_flag_key("T38", channel, CF_APP_T38_NEGOTIATED);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "T38 SDP Origin = %s\n", t38_options->sdp_o_line);
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "T38FaxVersion = %d\n", t38_options->T38FaxVersion);
|
||||
|
@ -1211,6 +1211,7 @@ void mod_spandsp_fax_process_fax(switch_core_session_t *session, const char *dat
|
|||
} else if (switch_channel_test_app_flag_key("T38", channel, CF_APP_T38)) {
|
||||
switch_core_session_message_t msg = { 0 };
|
||||
pvt->t38_mode = T38_MODE_NEGOTIATED;
|
||||
switch_channel_set_app_flag_key("T38", channel, CF_APP_T38_NEGOTIATED);
|
||||
spanfax_init(pvt, T38_MODE);
|
||||
configure_t38(pvt);
|
||||
|
||||
|
@ -1493,13 +1494,14 @@ static switch_status_t t38_gateway_on_soft_execute(switch_core_session_t *sessio
|
|||
spanfax_init(pvt, T38_GATEWAY_MODE);
|
||||
configure_t38(pvt);
|
||||
pvt->t38_mode = T38_MODE_NEGOTIATED;
|
||||
switch_channel_set_app_flag_key("T38", channel, CF_APP_T38_NEGOTIATED);
|
||||
} else {
|
||||
if (negotiate_t38(pvt) != T38_MODE_NEGOTIATED) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "%s Could not negotiate T38\n", switch_channel_get_name(channel));
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
goto end_unlock;
|
||||
}
|
||||
|
||||
switch_channel_set_app_flag_key("T38", channel, CF_APP_T38_NEGOTIATED);
|
||||
spanfax_init(pvt, T38_GATEWAY_MODE);
|
||||
}
|
||||
|
||||
|
|
|
@ -5605,6 +5605,12 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||
}
|
||||
goto done;
|
||||
} else {
|
||||
|
||||
if (switch_channel_test_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_NEGOTIATED)) {
|
||||
nua_respond(tech_pvt->nh, SIP_200_OK, TAG_END());
|
||||
goto done;
|
||||
}
|
||||
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_REINVITE);
|
||||
|
||||
if (tech_pvt->num_codecs) {
|
||||
|
@ -5620,6 +5626,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||
if (sofia_glue_tech_choose_port(tech_pvt, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0);
|
||||
|
||||
if (sofia_glue_activate_rtp(tech_pvt, 0) != SWITCH_STATUS_SUCCESS) {
|
||||
|
|
|
@ -4404,6 +4404,11 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
|
|||
if (got_udptl && m->m_type == sdp_media_image && m->m_port) {
|
||||
switch_t38_options_t *t38_options = tech_process_udptl(tech_pvt, sdp, m);
|
||||
|
||||
if (switch_channel_test_app_flag_key("T38", tech_pvt->channel, CF_APP_T38_NEGOTIATED)) {
|
||||
match = 1;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (switch_channel_test_app_flag_key("T38", tech_pvt->channel, CF_APP_T38)) {
|
||||
sofia_set_flag(tech_pvt, TFLAG_NOREPLY);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue