git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8557 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-05-23 22:30:50 +00:00
parent 40c0d82fa7
commit df6ba7bbba
1 changed files with 19 additions and 17 deletions

View File

@ -767,27 +767,29 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
tech_pvt->remote_sdp_video_ip = switch_core_session_strdup(tech_pvt->session, rip);
tech_pvt->remote_sdp_video_port = (switch_port_t) atoi(rvp);
}
if (!strcmp(tech_pvt->remote_sdp_video_ip, rip) && atoi(rvp) == tech_pvt->remote_sdp_video_port) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Remote video address:port [%s:%d] has not changed.\n",
tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port);
} else {
switch_set_flag_locked(tech_pvt, TFLAG_VIDEO);
switch_channel_set_flag(tech_pvt->channel, CF_VIDEO);
if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
if (switch_rtp_set_remote_address(tech_pvt->video_rtp_session, tech_pvt->remote_sdp_video_ip, tech_pvt->remote_sdp_video_port, &err) !=
SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "VIDEO RTP REPORTS ERROR: [%s]\n", err);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "VIDEO RTP CHANGING DEST TO: [%s:%d]\n",
tech_pvt->remote_sdp_video_ip, tech_pvt->remote_sdp_video_port);
/* Reactivate the NAT buster flag. */
switch_rtp_set_flag(tech_pvt->video_rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
if (tech_pvt->remote_sdp_video_ip && tech_pvt->remote_sdp_video_port) {
if (!strcmp(tech_pvt->remote_sdp_video_ip, rip) && atoi(rvp) == tech_pvt->remote_sdp_video_port) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Remote video address:port [%s:%d] has not changed.\n",
tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port);
} else {
switch_set_flag_locked(tech_pvt, TFLAG_VIDEO);
switch_channel_set_flag(tech_pvt->channel, CF_VIDEO);
if (switch_rtp_ready(tech_pvt->video_rtp_session)) {
if (switch_rtp_set_remote_address(tech_pvt->video_rtp_session, tech_pvt->remote_sdp_video_ip, tech_pvt->remote_sdp_video_port, &err) !=
SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "VIDEO RTP REPORTS ERROR: [%s]\n", err);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "VIDEO RTP CHANGING DEST TO: [%s:%d]\n",
tech_pvt->remote_sdp_video_ip, tech_pvt->remote_sdp_video_port);
/* Reactivate the NAT buster flag. */
switch_rtp_set_flag(tech_pvt->video_rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
}
}
}
}
if (!strcmp(tech_pvt->remote_sdp_audio_ip, rip) && atoi(rp) == tech_pvt->remote_sdp_audio_port) {
if (tech_pvt->remote_sdp_audio_ip && !strcmp(tech_pvt->remote_sdp_audio_ip, rip) && atoi(rp) == tech_pvt->remote_sdp_audio_port) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Remote address:port [%s:%d] has not changed.\n",
tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port);
return SWITCH_STATUS_SUCCESS;