res_pjsip_session: Fix leaked video RTP ports.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 28 May 2014 16:56:07 +0000 (16:56 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 28 May 2014 16:56:07 +0000 (16:56 +0000)
commit69125a7ae2516902c682ba9a91c5dfa1d189ad29
tree457360104b1bc9c779113eb038bd0c8f623a585f
parenta5aea0cca026fe894b9f50b6995f6ab5dcf080b1
res_pjsip_session: Fix leaked video RTP ports.

Simply enabling PJSIP to negotiage a video codec (e.g., h264) would leak
video RTP ports if the codec were not negotiated by an incoming call.

* Made add_sdp_streams() associate the handler with the media stream if
the handler handled the media stream.  Otherwise, when the
ast_sip_session_media object was destroyed it didn't know how to clean up
the RTP resources.

* Fixed sdp_requires_deferral() associating the handler with the media
stream when deciding if the SDP processing needs to be deferred for T.38.
Like the leaked video RTP ports, the T.38 handler needs to clean up
allocated resources from deciding if SDP processing needs to be deffered.

* Cleaned up some dead code in handle_incoming_sdp() and
sdp_requires_deferral().

ASTERISK-23721 #close
Reported by: cervajs

Review: https://reviewboard.asterisk.org/r/3571/
........

Merged revisions 414749 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/res_pjsip_session.h
res/res_pjsip_session.c
res/res_pjsip_t38.c