Merge pull request #849 from micmac1/ast-20.5.2
authorJiri Slachta <jiri@slachta.eu>
Fri, 29 Dec 2023 10:11:14 +0000 (11:11 +0100)
committerGitHub <noreply@github.com>
Fri, 29 Dec 2023 10:11:14 +0000 (11:11 +0100)
asterisk: bump to 20.5.2

libs/pjproject/Makefile
libs/pjproject/patches/0004-config_site.patch
libs/pjproject/patches/0020-log-dropped-packet-in-debug.patch [new file with mode: 0644]
net/asterisk/Makefile
net/asterisk/patches/130-eventfd.patch
net/asterisk/patches/140-use-default-lua.patch
net/asterisk/patches/180-app_queue_time_t.patch [new file with mode: 0644]
net/asterisk/patches/180-res_crypto.c-Avoid-using-the-non-portable-ALLPERMS-m.patch [deleted file]
net/asterisk/patches/190-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch [deleted file]

index 9b5372c0b02e92d74be600b32b113fc726ef1ffc..326708c3dae53e1df92e602088d8ade4b7e19066 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pjproject
 PKG_VERSION:=2.13.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_CPE_ID:=cpe:/a:pjsip:pjsip
 
 # download "vX.Y.tar.gz" as "pjproject-vX.Y.tar.gz"
index 3a1e1b9c8ddfc0eb682099aac8539f9e8b3629ed..d9d67aecfeb873af4a4b1d9aa4fde6c160bf68d9 100644 (file)
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/pjlib/include/pj/config_site.h
-@@ -0,0 +1,83 @@
+@@ -0,0 +1,91 @@
 +/*
 + * Asterisk config_site.h
 + */
 +#define PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR 0
 +#define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 0
 +#define PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER 1
++
++/*
++ * The default is 32 with 8 being used by pjproject itself.
++ * Since this value is used in invites, dialogs, transports
++ * and subscriptions as well as the global pjproject endpoint,
++ * we don't want to increase it too much.
++ */
++#define PJSIP_MAX_MODULE 38
diff --git a/libs/pjproject/patches/0020-log-dropped-packet-in-debug.patch b/libs/pjproject/patches/0020-log-dropped-packet-in-debug.patch
new file mode 100644 (file)
index 0000000..e625f2e
--- /dev/null
@@ -0,0 +1,26 @@
+--- a/pjsip/src/pjsip/sip_transport.c
++++ b/pjsip/src/pjsip/sip_transport.c
+@@ -2088,15 +2088,17 @@ PJ_DEF(pj_ssize_t) pjsip_tpmgr_receive_p
+              * which were sent to keep NAT bindings.
+              */
+             if (tmp.slen) {
+-                PJ_LOG(1, (THIS_FILE, 
+-                      "Error processing %d bytes packet from %s %s:%d %.*s:\n"
+-                      "%.*s\n"
+-                      "-- end of packet.",
++                PJ_LOG(2, (THIS_FILE,
++                      "Dropping %d bytes packet from %s %s:%d %.*s\n",
+                       msg_fragment_size,
+                       rdata->tp_info.transport->type_name,
+-                      rdata->pkt_info.src_name, 
++                      rdata->pkt_info.src_name,
+                       rdata->pkt_info.src_port,
+-                      (int)tmp.slen, tmp.ptr,
++                      (int)tmp.slen, tmp.ptr));
++                PJ_LOG(4, (THIS_FILE,
++                      "Dropped packet:"
++                      "%.*s\n"
++                      "-- end of packet.",
+                       (int)msg_fragment_size,
+                       rdata->msg_info.msg_buf));
+             }
index 361928c1acbc6fdc35c0ad5d2e9eddb82e9e7724..e5075caaa84dd84908892a8c4c3e37051f73fb4b 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=asterisk
-PKG_VERSION:=20.3.0
-PKG_RELEASE:=2
+PKG_VERSION:=20.5.2
+PKG_RELEASE:=1
 PKG_CPE_ID:=cpe:/a:digium:asterisk
 
 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
-PKG_HASH:=2e70b4bb40114966c6572eae38b5106b588a7a759d41f1c90a6032407dd60463
+PKG_HASH:=8f68e1789dfb8aa04b0eba87ea1d599a62e088ddd20926afc997f36b455e1859
 
 PKG_BUILD_DEPENDS:=libxml2/host
 
index ba54c74c9fcee02e707d607172172759f42607bc..60e7d26b4402ecfec62b6debfb0e5b32db77a98f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1256,7 +1256,7 @@ if test "${ac_cv_have_variable_fdset}x"
+@@ -1257,7 +1257,7 @@ if test "${ac_cv_have_variable_fdset}x"
  fi
  
  AC_MSG_CHECKING([if we have usable eventfd support])
index 6d38d187bb5c8854c4ccc7bb143fa8b7bc80db69..006a07fffddd1e9a8f8b881ae5eaf2f1ca7b048c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -2616,7 +2616,7 @@ if test -z "$__opus_include" -o x"$__opu
+@@ -2608,7 +2608,7 @@ if test -z "$__opus_include" -o x"$__opu
  fi
  AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
  
diff --git a/net/asterisk/patches/180-app_queue_time_t.patch b/net/asterisk/patches/180-app_queue_time_t.patch
new file mode 100644 (file)
index 0000000..d582a39
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/apps/app_queue.c
++++ b/apps/app_queue.c
+@@ -4614,8 +4614,12 @@ static int is_longest_waiting_caller(str
+                                        * will be unused until the first caller is picked up.
+                                        */
+                                       if (ch->start < caller->start && !ch->pending) {
+-                                              ast_debug(1, "Queue %s has a call at position %i that's been waiting longer (%li vs %li)\n",
+-                                                                q->name, ch->pos, ch->start, caller->start);
++                                              char time1[AST_TIME_T_LEN];
++                                              char time2[AST_TIME_T_LEN];
++                                              ast_time_t_to_string(ch->start, time1, sizeof(time1));
++                                              ast_time_t_to_string(caller->start, time2, sizeof(time2));
++                                              ast_debug(1, "Queue %s has a call at position %i that's been waiting longer (%s vs %s)\n",
++                                                                q->name, ch->pos, time1, time2);
+                                               is_longest_waiting = 0;
+                                               break;
+                                       }
diff --git a/net/asterisk/patches/180-res_crypto.c-Avoid-using-the-non-portable-ALLPERMS-m.patch b/net/asterisk/patches/180-res_crypto.c-Avoid-using-the-non-portable-ALLPERMS-m.patch
deleted file mode 100644 (file)
index ff801c6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-From 94c884d5b8afca96164852cfb29fc496bc5b9e0a Mon Sep 17 00:00:00 2001
-From: Sean Bright <sean@seanbright.com>
-Date: Mon, 5 Jun 2023 18:17:47 -0400
-Subject: [PATCH] res_crypto.c: Avoid using the non-portable ALLPERMS macro.
-
-ALLPERMS is not POSIX and it's trivial enough to not jump through
-autoconf hoops to check for it.
-
-Fixes #149.
----
- res/res_crypto.c | 9 +++++++--
- 1 file changed, 7 insertions(+), 2 deletions(-)
-
---- a/res/res_crypto.c
-+++ b/res/res_crypto.c
-@@ -217,10 +217,15 @@ static struct ast_key *try_load_key(cons
-               return NULL;
-       }
-+      /* PERM_MASK is a bitwise OR of all possible file mode bits encoded in the
-+       * `st_mode` member of `struct stat`. For POSIX compatible systems this
-+       * will be 07777. */
-+#define PERM_MASK (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
-+
-       /* only user read or read/write modes allowed */
-       if (ktype == AST_KEY_PRIVATE &&
--          ((st.st_mode & ALLPERMS) & ~(S_IRUSR | S_IWUSR)) != 0) {
--              ast_log(LOG_ERROR, "Private key file has bad permissions: %s: %#4o\n", ffname, st.st_mode & ALLPERMS);
-+          ((st.st_mode & PERM_MASK) & ~(S_IRUSR | S_IWUSR)) != 0) {
-+              ast_log(LOG_ERROR, "Private key file has bad permissions: %s: %#4o\n", ffname, st.st_mode & PERM_MASK);
-               fclose(f);
-               return NULL;
-       }
diff --git a/net/asterisk/patches/190-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch b/net/asterisk/patches/190-chan_iax2.c-Avoid-crash-with-IAX2-switch-support.patch
deleted file mode 100644 (file)
index dc8e180..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From d26a00ef3484f7fa602044e73e31bcefc8ca1917 Mon Sep 17 00:00:00 2001
-From: Sean Bright <sean@seanbright.com>
-Date: Fri, 7 Jul 2023 15:57:39 -0400
-Subject: [PATCH] chan_iax2.c: Avoid crash with IAX2 switch support.
-
-A change made in 82cebaa0 did not properly handle the case when a
-channel was not provided, triggering a crash. ast_check_hangup(...)
-does not protect against NULL pointers.
-
-Fixes #180
----
- channels/chan_iax2.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/channels/chan_iax2.c
-+++ b/channels/chan_iax2.c
-@@ -14323,7 +14323,7 @@ static struct iax2_dpcache *find_cache(s
-                       ast_log(LOG_WARNING, "Timeout waiting for %s exten %s\n", data, exten);
-               }
--              if (ast_check_hangup(chan)) {
-+              if (chan && ast_check_hangup(chan)) {
-                       doabort = 1;
-               }