提交 caee4cbf authored 作者: Anthony Minessale's avatar Anthony Minessale

replace

上级 92ddf472
......@@ -5154,8 +5154,8 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
}
if (switch_channel_test_flag(channel, CF_PROXY_MEDIA) && has_t38) {
if (switch_rtp_ready(tech_pvt->rtp_session)) {
switch_rtp_udptl_mode(tech_pvt->rtp_session);
if (switch_core_media_ready(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO)) {
switch_core_media_udptl_mode(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO);
if ((uuid = switch_channel_get_partner_uuid(channel)) && (other_session = switch_core_session_locate(uuid))) {
if (switch_core_session_compare(session, other_session)) {
......@@ -5234,9 +5234,9 @@ 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) && has_t38) {
if (switch_rtp_ready(tech_pvt->rtp_session) && switch_rtp_ready(other_tech_pvt->rtp_session)) {
if (switch_core_media_ready(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO) && switch_rtp_ready(other_tech_pvt->rtp_session)) {
switch_channel_clear_flag(tech_pvt->channel, CF_NOTIMER_DURING_BRIDGE);
switch_rtp_udptl_mode(tech_pvt->rtp_session);
switch_core_media_udptl_mode(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Activating T38 Passthru\n");
}
}
......@@ -5998,7 +5998,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
}
if (!switch_rtp_ready(tech_pvt->rtp_session)) {
if (!switch_core_media_ready(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO)) {
switch_core_media_prepare_codecs(tech_pvt->session, SWITCH_FALSE);
if ((status = switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0)) != SWITCH_STATUS_SUCCESS) {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
......@@ -6156,7 +6156,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
}
break;
case nua_callstate_ready:
if (r_sdp && !is_dup_sdp && switch_rtp_ready(tech_pvt->rtp_session) && !sofia_test_flag(tech_pvt, TFLAG_NOSDP_REINVITE)) {
if (r_sdp && !is_dup_sdp && switch_core_media_ready(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO) && !sofia_test_flag(tech_pvt, TFLAG_NOSDP_REINVITE)) {
/* sdp changed since 18X w sdp, we're supposed to ignore it but we, of course, were pressured into supporting it */
uint8_t match = 0;
......
......@@ -1142,7 +1142,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
}
if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
if (switch_rtp_ready(tech_pvt->rtp_session)) {
if (switch_core_media_ready(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO)) {
switch_core_media_proxy_remote_addr(session, NULL);
}
switch_core_media_patch_sdp(tech_pvt->session);
......@@ -1991,24 +1991,24 @@ int sofia_recover_callback(switch_core_session_t *session)
goto end;
}
if (switch_rtp_ready(tech_pvt->rtp_session)) {
if (switch_core_media_ready(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO)) {
if ((tmp = switch_channel_get_variable(channel, "sip_audio_recv_pt"))) {
switch_rtp_set_recv_pt(tech_pvt->rtp_session, (switch_payload_t)atoi(tmp));
switch_core_media_set_recv_pt(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO, (switch_payload_t)atoi(tmp));
}
}
if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
if (switch_core_media_ready(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_VIDEO)) {
if ((tmp = switch_channel_get_variable(channel, "sip_video_recv_pt"))) {
switch_rtp_set_recv_pt(tech_pvt->rtp_session, (switch_payload_t)atoi(tmp));
switch_core_media_set_recv_pt(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO, (switch_payload_t)atoi(tmp));
}
}
if (tech_pvt->te) {
switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
switch_core_media_set_telephony_event(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO, tech_pvt->te);
}
if (tech_pvt->recv_te) {
switch_rtp_set_telephony_recv_event(tech_pvt->rtp_session, tech_pvt->recv_te);
switch_core_media_set_telephony_recv_event(tech_pvt->media_handle, SWITCH_MEDIA_TYPE_AUDIO, tech_pvt->recv_te);
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论