[Freeswitch-svn] [commit] r7848 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Sat Mar 8 16:37:17 EST 2008
Author: anthm
Date: Sat Mar 8 16:37:17 2008
New Revision: 7848
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Sat Mar 8 16:37:17 2008
@@ -223,8 +223,12 @@
switch_call_cause_t cause = switch_channel_get_cause(channel);
int sip_cause = hangup_cause_to_sip(cause);
- if (tech_pvt->profile->rtpip && tech_pvt->local_sdp_audio_port) {
- switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_audio_port);
+ if (tech_pvt->profile->rtpip) {
+ if (tech_pvt->local_sdp_audio_port) {
+ switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_audio_port);
+ } else if (tech_pvt->local_sdp_video_port) {
+ switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_video_port);
+ }
}
if (switch_test_flag(tech_pvt, TFLAG_SIP_HOLD) && cause != SWITCH_CAUSE_ATTENDED_TRANSFER) {
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Sat Mar 8 16:37:17 2008
@@ -488,8 +488,9 @@
return SWITCH_STATUS_SUCCESS;
}
}
- if (tech_pvt->adv_sdp_audio_port) {
- switch_rtp_release_port(tech_pvt->adv_sdp_audio_ip, tech_pvt->adv_sdp_audio_port);
+
+ if (tech_pvt->local_sdp_audio_port) {
+ switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_audio_port);
}
@@ -527,6 +528,10 @@
return SWITCH_STATUS_SUCCESS;
}
+ if (tech_pvt->local_sdp_video_port) {
+ switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_video_port);
+ }
+
if (!(tech_pvt->local_sdp_video_port = switch_rtp_request_port(tech_pvt->profile->rtpip))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "No RTP ports available!\n");
return SWITCH_STATUS_FALSE;
@@ -1634,11 +1639,11 @@
sofia_glue_check_video_codecs(tech_pvt);
- if (!tech_pvt->local_sdp_video_port) {
- sofia_glue_tech_choose_video_port(tech_pvt);
- }
-
if (switch_test_flag(tech_pvt, TFLAG_VIDEO) && tech_pvt->video_rm_encoding) {
+ if (!tech_pvt->local_sdp_video_port) {
+ sofia_glue_tech_choose_video_port(tech_pvt);
+ }
+
flags = (switch_rtp_flag_t) (SWITCH_RTP_FLAG_USE_TIMER | SWITCH_RTP_FLAG_AUTOADJ |
SWITCH_RTP_FLAG_DATAWAIT | SWITCH_RTP_FLAG_NOBLOCK | SWITCH_RTP_FLAG_RAW_WRITE);
sofia_glue_tech_set_video_codec(tech_pvt, 0);
More information about the Freeswitch-svn
mailing list