git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7848 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-03-08 21:37:17 +00:00
parent 8cb08af737
commit 983ca0086d
2 changed files with 17 additions and 8 deletions

View File

@@ -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) {