forked from Mirrors/freeswitch
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7848 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8cb08af737
commit
983ca0086d
@ -223,8 +223,12 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
||||
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) {
|
||||
|
@ -488,8 +488,9 @@ switch_status_t sofia_glue_tech_choose_port(private_object_t *tech_pvt, int forc
|
||||
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 @@ switch_status_t sofia_glue_tech_choose_video_port(private_object_t *tech_pvt)
|
||||
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 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user