summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slachta <jiri@slachta.eu>2019-07-12 22:14:51 +0200
committerGitHub <noreply@github.com>2019-07-12 22:14:51 +0200
commit039faa9ef975fc44dd9ef3c022f7d4e7c7e4222f (patch)
tree9a808b26bc91517956af30a09deb4b524cdbdab9
parent31398a3759c99bdb2dca359b78e25c17b6dd434a (diff)
parent15e6a1b558aced85f4ffac1ea388a217312085d0 (diff)
Merge pull request #435 from micmac1/17-ast13-AST-2019-003
(for 17.01) asterisk-13.x: fix AST-2019-003
-rw-r--r--net/asterisk-13.x/Makefile2
-rw-r--r--net/asterisk-13.x/patches/080-AST-2019-003-13.diff39
2 files changed, 40 insertions, 1 deletions
diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile
index b789fbb..07d42f8 100644
--- a/net/asterisk-13.x/Makefile
+++ b/net/asterisk-13.x/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk13
PKG_VERSION:=13.19.2
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases/
diff --git a/net/asterisk-13.x/patches/080-AST-2019-003-13.diff b/net/asterisk-13.x/patches/080-AST-2019-003-13.diff
new file mode 100644
index 0000000..afc8325
--- /dev/null
+++ b/net/asterisk-13.x/patches/080-AST-2019-003-13.diff
@@ -0,0 +1,39 @@
+From 3ab9291a563656dfebcb7de67c86351541f3de1c Mon Sep 17 00:00:00 2001
+From: Francesco Castellano <francesco.castellano@messagenet.it>
+Date: Fri, 28 Jun 2019 18:15:31 +0200
+Subject: [PATCH] chan_sip: Handle invalid SDP answer to T.38 re-invite
+
+The chan_sip module performs a T.38 re-invite using a single media
+stream of udptl, and expects the SDP answer to be the same.
+
+If an SDP answer is received instead that contains an additional
+media stream with no joint codec a crash will occur as the code
+assumes that at least one joint codec will exist in this
+scenario.
+
+This change removes this assumption.
+
+ASTERISK-28465
+
+Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87
+---
+
+diff --git a/channels/chan_sip.c b/channels/chan_sip.c
+index 7c8928d..223ff3c 100644
+--- a/channels/chan_sip.c
++++ b/channels/chan_sip.c
+@@ -10911,7 +10911,13 @@
+ ast_rtp_lookup_mime_multiple2(s3, NULL, newnoncodeccapability, 0, 0));
+ }
+
+- if (portno != -1 || vportno != -1 || tportno != -1) {
++ /* When UDPTL is negotiated it is expected that there are no compatible codecs as audio or
++ * video is not being transported, thus we continue in this function further up if that is
++ * the case. If we receive an SDP answer containing both a UDPTL stream and another media
++ * stream however we need to check again to ensure that there is at least one joint codec
++ * instead of assuming there is one.
++ */
++ if ((portno != -1 || vportno != -1 || tportno != -1) && ast_format_cap_count(newjointcapability)) {
+ /* We are now ready to change the sip session and RTP structures with the offered codecs, since
+ they are acceptable */
+ unsigned int framing;