FS-6544
This commit is contained in:
parent
d8836fb213
commit
ca9207aa32
|
@ -242,6 +242,7 @@ SWITCH_DECLARE(void) switch_core_media_set_telephony_event(switch_core_session_t
|
||||||
SWITCH_DECLARE(void) switch_core_media_set_telephony_recv_event(switch_core_session_t *session, switch_media_type_t type, switch_payload_t te);
|
SWITCH_DECLARE(void) switch_core_media_set_telephony_recv_event(switch_core_session_t *session, switch_media_type_t type, switch_payload_t te);
|
||||||
SWITCH_DECLARE(switch_rtp_stats_t *) switch_core_media_stats(switch_core_session_t *session, switch_media_type_t type, switch_memory_pool_t *pool);
|
SWITCH_DECLARE(switch_rtp_stats_t *) switch_core_media_stats(switch_core_session_t *session, switch_media_type_t type, switch_memory_pool_t *pool);
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_media_udptl_mode(switch_core_session_t *session, switch_media_type_t type);
|
SWITCH_DECLARE(switch_status_t) switch_core_media_udptl_mode(switch_core_session_t *session, switch_media_type_t type);
|
||||||
|
SWITCH_DECLARE(switch_bool_t) switch_core_media_check_udptl_mode(switch_core_session_t *session, switch_media_type_t type);
|
||||||
|
|
||||||
SWITCH_DECLARE(void) switch_core_media_set_rtp_flag(switch_core_session_t *session, switch_media_type_t type, switch_rtp_flag_t flag);
|
SWITCH_DECLARE(void) switch_core_media_set_rtp_flag(switch_core_session_t *session, switch_media_type_t type, switch_rtp_flag_t flag);
|
||||||
SWITCH_DECLARE(void) switch_core_media_clear_rtp_flag(switch_core_session_t *session, switch_media_type_t type, switch_rtp_flag_t flag);
|
SWITCH_DECLARE(void) switch_core_media_clear_rtp_flag(switch_core_session_t *session, switch_media_type_t type, switch_rtp_flag_t flag);
|
||||||
|
|
|
@ -6647,7 +6647,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
if (switch_channel_test_flag(channel, CF_ANSWERED) && (status == 180 || status == 183) && !r_sdp) {
|
if ((switch_channel_test_flag(channel, CF_ANSWERED) && (status == 180 || status == 183) && !r_sdp) || (ss_state == nua_callstate_ready && status >= 300)) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Channel %s skipping state [%s][%d]\n",
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Channel %s skipping state [%s][%d]\n",
|
||||||
switch_channel_get_name(channel), nua_callstate_name(ss_state), status);
|
switch_channel_get_name(channel), nua_callstate_name(ss_state), status);
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -8855,7 +8855,14 @@ void sofia_handle_sip_i_reinvite(switch_core_session_t *session,
|
||||||
tech_pvt->mparams.last_sdp_str = tech_pvt->mparams.prev_sdp_str;
|
tech_pvt->mparams.last_sdp_str = tech_pvt->mparams.prev_sdp_str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_channel_execute_on(channel, "execute_on_sip_reinvite");
|
|
||||||
|
if (switch_core_media_check_udptl_mode(session, SWITCH_MEDIA_TYPE_AUDIO)) {
|
||||||
|
/* Refuse all re-invites once we are doing T.38 */
|
||||||
|
nua_respond(nh, SIP_488_NOT_ACCEPTABLE, TAG_END());
|
||||||
|
switch_channel_hangup(channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
|
||||||
|
} else {
|
||||||
|
switch_channel_execute_on(channel, "execute_on_sip_reinvite");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8342,6 +8342,24 @@ SWITCH_DECLARE(switch_rtp_stats_t *) switch_core_media_get_stats(switch_core_ses
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//?
|
||||||
|
SWITCH_DECLARE(switch_bool_t) switch_core_media_check_udptl_mode(switch_core_session_t *session, switch_media_type_t type)
|
||||||
|
{
|
||||||
|
switch_media_handle_t *smh;
|
||||||
|
|
||||||
|
switch_assert(session);
|
||||||
|
|
||||||
|
if (!(smh = session->media_handle)) {
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (switch_rtp_ready(smh->engines[type].rtp_session)) {
|
||||||
|
return switch_rtp_test_flag(smh->engines[type].rtp_session, SWITCH_RTP_FLAG_UDPTL) ? SWITCH_TRUE : SWITCH_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SWITCH_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
//?
|
//?
|
||||||
SWITCH_DECLARE(switch_status_t) switch_core_media_udptl_mode(switch_core_session_t *session, switch_media_type_t type)
|
SWITCH_DECLARE(switch_status_t) switch_core_media_udptl_mode(switch_core_session_t *session, switch_media_type_t type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue