Create and initialize udptl only when dialog negotiates for image media
authorMatthew Jordan <mjordan@digium.com>
Mon, 16 Jan 2012 19:13:56 +0000 (19:13 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 16 Jan 2012 19:13:56 +0000 (19:13 +0000)
commite09527b10db2826d8a695c214d335acb6cad14f8
tree7f2afa8bc6275b822813a12a99d50afce3e3d29e
parent409751e2dc5fe9e5973de9f3c989809f89f7b660
Create and initialize udptl only when dialog negotiates for image media

Prior to this patch, the udptl struct was allocated and initialized when a
dialog was associated with a peer that supported T.38, when a new SIP
channel was allocated, or what an INVITE request was received.  This resulted
in any dialog associated with a peer that supported T.38 having udptl support
assigned to it, including the UDP ports needed for communication.  This
occurred even in non-INVITE dialogs that would never send image media.

This patch creates and initializes the udptl structure only when the SDP
for a dialog specifies that image media is supported, or when Asterisk
indicates through the appropriate control frame that a dialog is to support
T.38.

(closes issue ASTERISK-16698)
Reported by: under
Tested by: Stefan Schmidt
Patches: udptl_20120113.diff uploaded by mjordan (License #6283)

(closes issue ASTERISK-16794)
Reported by: Elazar Broad
Tested by: Stefan Schmidt

review: https://reviewboard.asterisk.org/r/1668/
........

Merged revisions 351027 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 351028 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@351029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c