include $(TOPDIR)/rules.mk
PKG_NAME:=pjproject
-PKG_VERSION:=2.12.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.13
+PKG_RELEASE:=1
# download "vX.Y.tar.gz" as "pjproject-vX.Y.tar.gz"
PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_URL_FILE)
PKG_SOURCE_URL:=https://github.com/pjsip/$(PKG_NAME)/archive
-PKG_HASH:=d0feef6963b07934e821ba4328aecb4c36358515c1b3e507da5874555d713533
+PKG_HASH:=4178bb9f586299111463fc16ea04e461adca4a73e646f8ddef61ea53dafa92d9
PKG_INSTALL:=1
PKG_LICENSE:=GPL-2.0
--disable-ilbc-codec \
--disable-ipp \
--disable-l16-codec \
+ --disable-libsrtp \
--disable-libwebrtc \
--disable-libyuv \
--disable-opencore-amr \
--disable-sound \
--disable-speex-aec \
--disable-speex-codec \
+ --disable-upnp \
--disable-v4l2 \
--disable-video \
--enable-shared \
- --with-external-srtp="$(STAGING_DIR)/usr" \
--with-ssl="$(STAGING_DIR)/usr" \
--without-external-gsm \
--without-external-pa \
$(eval $(call PJSIPpackage,libpj,libpj,+librt))
$(eval $(call PJSIPpackage,libpjlib-util,libpjlib-util,+libpj +librt))
-$(eval $(call PJSIPpackage,libpjmedia,libpjmedia*,+libpj +libpjlib-util +libpjnath +librt +libsrtp2))
+$(eval $(call PJSIPpackage,libpjmedia,libpjmedia*,+libpj +libpjlib-util +libpjnath +librt))
$(eval $(call PJSIPpackage,libpjnath,libpjnath,+libpj +libpjlib-util +librt))
$(eval $(call PJSIPpackage,libpjsip-simple,libpjsip-simple,+libpj +libpjlib-util +libpjsip +librt))
$(eval $(call PJSIPpackage,libpjsip-ua,libpjsip-ua,+libpj +libpjlib-util +libpjmedia +libpjsip-simple +libpjsip +librt))
-$(eval $(call PJSIPpackage,libpjsip,libpjsip,+libpj +libpjlib-util +librt +libsrtp2))
+$(eval $(call PJSIPpackage,libpjsip,libpjsip,+libpj +libpjlib-util +librt))
$(eval $(call PJSIPpackage,libpjsua,libpjsua,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +librt))
$(eval $(call PJSIPpackage,libpjsua2,libpjsua2,+libpj +libpjlib-util +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +librt +libpjsua))
Description: Multimedia communication library
--- a/build.mak.in
+++ b/build.mak.in
-@@ -349,6 +349,6 @@ export PJ_LIBXX_FILES := $(APP_LIBXX_FIL
+@@ -352,6 +352,6 @@ export PJ_LIBXX_FILES := $(APP_LIBXX_FIL
export PJ_INSTALL_DIR := @prefix@
export PJ_INSTALL_INC_DIR := @includedir@
export PJ_INSTALL_LIB_DIR := @libdir@
+++ /dev/null
-In upstream commit b236337 unit tests were extended to print stack traces when
-crashing, using GNU extensions. But this won't work with musl etc. (no
-"execinfo.h"), so we need to update the condition to make sure this is only
-done when glibc is used.
-
---- a/pjlib-util/src/pjlib-util-test/main.c
-+++ b/pjlib-util/src/pjlib-util-test/main.c
-@@ -33,7 +33,7 @@ static void init_signals()
- sigaction(SIGALRM, &act, NULL);
- }
-
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || PJ_DARWINOS
-
- #include <execinfo.h>\r
- #include <signal.h>
---- a/pjlib/src/pjlib-test/main.c
-+++ b/pjlib/src/pjlib-test/main.c
-@@ -54,7 +54,7 @@ static void init_signals()
- sigaction(SIGALRM, &act, NULL);
- }
-
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || PJ_DARWINOS
-
- #include <execinfo.h>\r
- #include <signal.h>
---- a/pjmedia/src/test/main.c
-+++ b/pjmedia/src/test/main.c
-@@ -32,7 +32,7 @@
- #endif
-
-
--#if PJ_LINUX || PJ_DARWINOS
-+#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || PJ_DARWINOS
-
- #include <execinfo.h>\r
- #include <signal.h>
---- a/pjnath/src/pjnath-test/main.c
-+++ b/pjnath/src/pjnath-test/main.c
-@@ -32,7 +32,7 @@ static void init_signals()
- sigaction(SIGALRM, &act, NULL);
- }
-
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || PJ_DARWINOS
-
- #include <execinfo.h>\r
- #include <signal.h>
---- a/pjsip-apps/src/pjsua/main.c
-+++ b/pjsip-apps/src/pjsua/main.c
-@@ -80,7 +80,7 @@ static void setup_signal_handler(void)
- SetConsoleCtrlHandler(&CtrlHandler, TRUE);
- }
-
--#elif PJ_LINUX || PJ_DARWINOS
-+#elif (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || PJ_DARWINOS
-
- #include <execinfo.h>
- #include <signal.h>
---- a/pjsip/src/test/main.c
-+++ b/pjsip/src/test/main.c
-@@ -36,7 +36,7 @@ static void usage(void)
- list_tests();
- }
-
--#if PJ_LINUX || PJ_DARWINOS
-+#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || PJ_DARWINOS
-
- #include <execinfo.h>\r
- #include <signal.h>
--- /dev/null
+From ac685b30c17be461b2bf5b46a772ed9742b8e985 Mon Sep 17 00:00:00 2001
+From: Riza Sulistyo <trengginas@users.noreply.github.com>
+Date: Thu, 9 Feb 2023 13:19:23 +0700
+Subject: [PATCH] Make sure that NOTIFY tdata is set before sending it.
+
+---
+ pjsip/src/pjsip-simple/evsub.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/pjsip/src/pjsip-simple/evsub.c
++++ b/pjsip/src/pjsip-simple/evsub.c
+@@ -2224,9 +2224,12 @@ static void on_tsx_state_uas( pjsip_evsu
+ /* Send the pending NOTIFY sent by app from inside
+ * on_rx_refresh() callback.
+ */
+- pj_assert(sub->pending_notify);
+- status = pjsip_evsub_send_request(sub, sub->pending_notify);
+- sub->pending_notify = NULL;
++ //pj_assert(sub->pending_notify);
++ /* Make sure that pending_notify is set. */
++ if (sub->pending_notify) {
++ status = pjsip_evsub_send_request(sub, sub->pending_notify);
++ sub->pending_notify = NULL;
++ }
+
+ } else if (pjsip_method_cmp(&tsx->method, &pjsip_notify_method)==0) {
+
+++ /dev/null
-commit 8e95490e37938f45d9d812905246036c3185b94f
-Author: Riza Sulistyo <trengginas@users.noreply.github.com>
-Date: Thu Mar 24 12:53:03 2022 +0700
-
- Add compile time option to allow multiple Authorization header (#3010)
-
---- a/pjsip/include/pjsip/sip_config.h
-+++ b/pjsip/include/pjsip/sip_config.h
-@@ -1280,6 +1280,18 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void)
- # define PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY 1
- #endif
-
-+/**
-+ * Allow client to send multiple Authorization header when receiving multiple
-+ * WWW-Authenticate header fields. If this is disabled, the stack will send
-+ * Authorization header field containing credentials that match the
-+ * topmost header field.
-+ *
-+ * Default is 0
-+ */
-+#ifndef PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER
-+# define PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER 0
-+#endif
-+
- /*****************************************************************************
- * SIP Event framework and presence settings.
- */
-@@ -1458,6 +1470,11 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void)
- # define PJSIP_INV_ACCEPT_UNKNOWN_BODY PJ_FALSE
- #endif
-
-+/**
-+ * Dump configuration to log with verbosity equal to info(3).
-+ */
-+PJ_DECL(void) pjsip_dump_config(void);
-+
- PJ_END_DECL
-
- /**
---- a/pjsip/src/pjsip/sip_auth_client.c
-+++ b/pjsip/src/pjsip/sip_auth_client.c
-@@ -1367,7 +1367,7 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_reini
- chal_cnt = 0;
- auth_cnt = 0;
- last_auth_err = PJSIP_EAUTHNOAUTH;
-- while (hdr != &rdata->msg_info.msg->hdr && auth_cnt == 0) {
-+ while (hdr != &rdata->msg_info.msg->hdr) {
- pjsip_cached_auth *cached_auth;
- const pjsip_www_authenticate_hdr *hchal;
- pjsip_authorization_hdr *hauth;
-@@ -1431,6 +1431,11 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_reini
- /* Process next header. */
- hdr = hdr->next;
- auth_cnt++;
-+
-+#if defined(PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER) && \
-+ PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER==0
-+ break;
-+#endif
- }
-
- /* Check if challenge is present */
---- a/pjsip/src/pjsip/sip_config.c
-+++ b/pjsip/src/pjsip/sip_config.c
-@@ -19,6 +19,9 @@
- */
-
- #include <pjsip/sip_config.h>
-+#include <pj/log.h>
-+
-+static const char *id = "sip_config.c";
-
- /* pjsip configuration instance, initialized with default values */
- pjsip_cfg_t pjsip_sip_cfg_var =
-@@ -65,6 +68,195 @@ pjsip_cfg_t pjsip_sip_cfg_var =
- }
- };
-
-+PJ_DEF(void) pjsip_dump_config(void)
-+{
-+ PJ_LOG(3, (id, "Dumping PJSIP configurations:"));
-+ PJ_LOG(3, (id, " PJSIP_MAX_DIALOG_COUNT : %d",
-+ PJSIP_MAX_DIALOG_COUNT));
-+ PJ_LOG(3, (id, " PJSIP_MAX_TRANSPORTS : %d",
-+ PJSIP_MAX_TRANSPORTS));
-+ PJ_LOG(3, (id, " PJSIP_TPMGR_HTABLE_SIZE : %d",
-+ PJSIP_TPMGR_HTABLE_SIZE));
-+ PJ_LOG(3, (id, " PJSIP_MAX_URL_SIZE : %d",
-+ PJSIP_MAX_URL_SIZE));
-+ PJ_LOG(3, (id, " PJSIP_MAX_MODULE : %d",
-+ PJSIP_MAX_MODULE));
-+ PJ_LOG(3, (id, " PJSIP_MAX_PKT_LEN : %d",
-+ PJSIP_MAX_PKT_LEN));
-+ PJ_LOG(3, (id, " PJSIP_HANDLE_EVENTS_HAS_SLEEP_ON_ERR : %d",
-+ PJSIP_HANDLE_EVENTS_HAS_SLEEP_ON_ERR));
-+ PJ_LOG(3, (id, " PJSIP_ACCEPT_MULTIPLE_SDP_ANSWERS : %d",
-+ PJSIP_ACCEPT_MULTIPLE_SDP_ANSWERS));
-+ PJ_LOG(3, (id, " PJSIP_UDP_SIZE_THRESHOLD : %d",
-+ PJSIP_UDP_SIZE_THRESHOLD));
-+ PJ_LOG(3, (id, " PJSIP_INCLUDE_ALLOW_HDR_IN_DLG : %d",
-+ PJSIP_INCLUDE_ALLOW_HDR_IN_DLG));
-+ PJ_LOG(3, (id, " PJSIP_SAFE_MODULE : %d",
-+ PJSIP_SAFE_MODULE));
-+ PJ_LOG(3, (id, " PJSIP_CHECK_VIA_SENT_BY : %d",
-+ PJSIP_CHECK_VIA_SENT_BY));
-+ PJ_LOG(3, (id, " PJSIP_UNESCAPE_IN_PLACE : %d",
-+ PJSIP_UNESCAPE_IN_PLACE));
-+ PJ_LOG(3, (id, " PJSIP_MAX_NET_EVENTS : %d",
-+ PJSIP_MAX_NET_EVENTS));
-+ PJ_LOG(3, (id, " PJSIP_MAX_TIMED_OUT_ENTRIES : %d",
-+ PJSIP_MAX_TIMED_OUT_ENTRIES));
-+ PJ_LOG(3, (id, " PJSIP_TRANSPORT_IDLE_TIME : %d",
-+ PJSIP_TRANSPORT_IDLE_TIME));
-+ PJ_LOG(3, (id, " PJSIP_TRANSPORT_SERVER_IDLE_TIME : %d",
-+ PJSIP_TRANSPORT_SERVER_IDLE_TIME));
-+ PJ_LOG(3, (id, " PJSIP_MAX_TRANSPORT_USAGE : %d",
-+ PJSIP_MAX_TRANSPORT_USAGE));
-+ PJ_LOG(3, (id, " PJSIP_TCP_TRANSPORT_BACKLOG : %d",
-+ PJSIP_TCP_TRANSPORT_BACKLOG));
-+ PJ_LOG(3, (id, " PJSIP_TCP_TRANSPORT_REUSEADDR : %d",
-+ PJSIP_TCP_TRANSPORT_REUSEADDR));
-+ PJ_LOG(3, (id, " PJSIP_TCP_TRANSPORT_DONT_CREATE_LISTENER : %d",
-+ PJSIP_TCP_TRANSPORT_DONT_CREATE_LISTENER));
-+ PJ_LOG(3, (id, " PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER : %d",
-+ PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER));
-+ PJ_LOG(3, (id, " PJSIP_TCP_KEEP_ALIVE_INTERVAL : %d",
-+ PJSIP_TCP_KEEP_ALIVE_INTERVAL));
-+ PJ_LOG(3, (id, " PJSIP_POOL_INC_TRANSPORT : %d",
-+ PJSIP_POOL_INC_TRANSPORT));
-+ PJ_LOG(3, (id, " PJSIP_POOL_LEN_TDATA : %d",
-+ PJSIP_POOL_LEN_TDATA));
-+ PJ_LOG(3, (id, " PJSIP_POOL_INC_TDATA : %d",
-+ PJSIP_POOL_INC_TDATA));
-+ PJ_LOG(3, (id, " PJSIP_POOL_LEN_UA : %d",
-+ PJSIP_POOL_LEN_UA));
-+ PJ_LOG(3, (id, " PJSIP_POOL_INC_UA : %d",
-+ PJSIP_POOL_INC_UA));
-+ PJ_LOG(3, (id, " PJSIP_POOL_EVSUB_LEN : %d",
-+ PJSIP_POOL_EVSUB_LEN));
-+ PJ_LOG(3, (id, " PJSIP_POOL_EVSUB_INC : %d",
-+ PJSIP_POOL_EVSUB_INC));
-+ PJ_LOG(3, (id, " PJSIP_MAX_FORWARDS_VALUE : %d",
-+ PJSIP_MAX_FORWARDS_VALUE));
-+ PJ_LOG(3, (id, " PJSIP_RFC3261_BRANCH_ID : %s",
-+ PJSIP_RFC3261_BRANCH_ID));
-+ PJ_LOG(3, (id, " PJSIP_RFC3261_BRANCH_LEN : %d",
-+ PJSIP_RFC3261_BRANCH_LEN));
-+ PJ_LOG(3, (id, " PJSIP_POOL_TSX_LAYER_LEN : %d",
-+ PJSIP_POOL_TSX_LAYER_LEN));
-+ PJ_LOG(3, (id, " PJSIP_POOL_TSX_LAYER_INC : %d",
-+ PJSIP_POOL_TSX_LAYER_INC));
-+ PJ_LOG(3, (id, " PJSIP_POOL_TSX_LEN : %d",
-+ PJSIP_POOL_TSX_LEN));
-+ PJ_LOG(3, (id, " PJSIP_POOL_TSX_INC : %d",
-+ PJSIP_POOL_TSX_INC));
-+ PJ_LOG(3, (id, " PJSIP_TSX_1XX_RETRANS_DELAY : %d",
-+ PJSIP_TSX_1XX_RETRANS_DELAY));
-+ PJ_LOG(3, (id, " PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR : %d",
-+ PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR));
-+ PJ_LOG(3, (id, " PJSIP_MAX_TSX_KEY_LEN : %d",
-+ PJSIP_MAX_TSX_KEY_LEN));
-+ PJ_LOG(3, (id, " PJSIP_POOL_LEN_USER_AGENT : %d",
-+ PJSIP_POOL_LEN_USER_AGENT));
-+ PJ_LOG(3, (id, " PJSIP_POOL_INC_USER_AGENT : %d",
-+ PJSIP_POOL_INC_USER_AGENT));
-+ PJ_LOG(3, (id, " PJSIP_MAX_BRANCH_LEN : %d",
-+ PJSIP_MAX_HNAME_LEN));
-+ PJ_LOG(3, (id, " PJSIP_POOL_LEN_DIALOG : %d",
-+ PJSIP_POOL_LEN_DIALOG));
-+ PJ_LOG(3, (id, " PJSIP_POOL_INC_DIALOG : %d",
-+ PJSIP_POOL_INC_DIALOG));
-+ PJ_LOG(3, (id, " PJSIP_MAX_HEADER_TYPES : %d",
-+ PJSIP_MAX_HEADER_TYPES));
-+ PJ_LOG(3, (id, " PJSIP_MAX_URI_TYPES : %d",
-+ PJSIP_MAX_URI_TYPES));
-+ PJ_LOG(3, (id, " PJSIP_AUTH_HEADER_CACHING : %d",
-+ PJSIP_AUTH_HEADER_CACHING));
-+ PJ_LOG(3, (id, " PJSIP_AUTH_AUTO_SEND_NEXT : %d",
-+ PJSIP_AUTH_AUTO_SEND_NEXT));
-+ PJ_LOG(3, (id, " PJSIP_AUTH_QOP_SUPPORT : %d",
-+ PJSIP_AUTH_QOP_SUPPORT));
-+ PJ_LOG(3, (id, " PJSIP_MAX_STALE_COUNT : %d",
-+ PJSIP_MAX_STALE_COUNT));
-+ PJ_LOG(3, (id, " PJSIP_HAS_DIGEST_AKA_AUTH : %d",
-+ PJSIP_HAS_DIGEST_AKA_AUTH));
-+ PJ_LOG(3, (id, " PJSIP_REGISTER_CLIENT_DELAY_BEFORE_REFRESH : %d",
-+ PJSIP_REGISTER_CLIENT_DELAY_BEFORE_REFRESH));
-+ PJ_LOG(3, (id, " PJSIP_REGISTER_ALLOW_EXP_REFRESH : %d",
-+ PJSIP_REGISTER_ALLOW_EXP_REFRESH));
-+ PJ_LOG(3, (id, " PJSIP_AUTH_CACHED_POOL_MAX_SIZE : %d",
-+ PJSIP_AUTH_CACHED_POOL_MAX_SIZE));
-+ PJ_LOG(3, (id, " PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY : %d",
-+ PJSIP_AUTH_CNONCE_USE_DIGITS_ONLY));
-+ PJ_LOG(3, (id, " PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER : %d",
-+ PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER));
-+ PJ_LOG(3, (id, " PJSIP_EVSUB_TIME_UAC_REFRESH : %d",
-+ PJSIP_EVSUB_TIME_UAC_REFRESH));
-+ PJ_LOG(3, (id, " PJSIP_PUBLISHC_DELAY_BEFORE_REFRESH : %d",
-+ PJSIP_PUBLISHC_DELAY_BEFORE_REFRESH));
-+ PJ_LOG(3, (id, " PJSIP_EVSUB_TIME_UAC_TERMINATE : %d",
-+ PJSIP_EVSUB_TIME_UAC_TERMINATE));
-+ PJ_LOG(3, (id, " PJSIP_EVSUB_TIME_UAC_WAIT_NOTIFY : %d",
-+ PJSIP_EVSUB_TIME_UAC_WAIT_NOTIFY));
-+ PJ_LOG(3, (id, " PJSIP_PRES_DEFAULT_EXPIRES : %d",
-+ PJSIP_PRES_DEFAULT_EXPIRES));
-+ PJ_LOG(3, (id, " PJSIP_PRES_BAD_CONTENT_RESPONSE : %d",
-+ PJSIP_PRES_BAD_CONTENT_RESPONSE));
-+ PJ_LOG(3, (id, " PJSIP_PRES_PIDF_ADD_TIMESTAMP : %d",
-+ PJSIP_PRES_PIDF_ADD_TIMESTAMP));
-+ PJ_LOG(3, (id, " PJSIP_SESS_TIMER_DEF_SE : %d",
-+ PJSIP_SESS_TIMER_DEF_SE));
-+ PJ_LOG(3, (id, " PJSIP_SESS_TIMER_RETRY_DELAY : %d",
-+ PJSIP_SESS_TIMER_RETRY_DELAY));
-+ PJ_LOG(3, (id, " PJSIP_PUBLISHC_QUEUE_REQUEST : %d",
-+ PJSIP_PUBLISHC_QUEUE_REQUEST));
-+ PJ_LOG(3, (id, " PJSIP_MWI_DEFAULT_EXPIRES : %d",
-+ PJSIP_MWI_DEFAULT_EXPIRES));
-+ PJ_LOG(3, (id, " PJSIP_HAS_TX_DATA_LIST : %d",
-+ PJSIP_HAS_TX_DATA_LIST));
-+ PJ_LOG(3, (id, " PJSIP_INV_ACCEPT_UNKNOWN_BODY : %d",
-+ PJSIP_INV_ACCEPT_UNKNOWN_BODY));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.allow_port_in_fromto_hdr : %d",
-+ pjsip_cfg()->endpt.allow_port_in_fromto_hdr));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.accept_replace_in_early_state : %d",
-+ pjsip_cfg()->endpt.accept_replace_in_early_state));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.allow_tx_hash_in_uri : %d",
-+ pjsip_cfg()->endpt.allow_tx_hash_in_uri));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.disable_rport : %d",
-+ pjsip_cfg()->endpt.disable_rport));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.disable_tcp_switch : %d",
-+ pjsip_cfg()->endpt.disable_tcp_switch));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.disable_tls_switch : %d",
-+ pjsip_cfg()->endpt.disable_tls_switch));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.follow_early_media_fork : %d",
-+ pjsip_cfg()->endpt.follow_early_media_fork));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.req_has_via_alias : %d",
-+ pjsip_cfg()->endpt.req_has_via_alias));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.resolve_hostname_to_get_interface:%d",
-+ pjsip_cfg()->endpt.resolve_hostname_to_get_interface));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.disable_secure_dlg_check : %d",
-+ pjsip_cfg()->endpt.disable_secure_dlg_check));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.use_compact_form : %d",
-+ pjsip_cfg()->endpt.use_compact_form));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.accept_multiple_sdp_answers : %d",
-+ pjsip_cfg()->endpt.accept_multiple_sdp_answers));
-+ PJ_LOG(3, (id, " pjsip_cfg()->endpt.keep_inv_after_tsx_timeout : %d",
-+ pjsip_cfg()->endpt.keep_inv_after_tsx_timeout));
-+ PJ_LOG(3, (id, " pjsip_cfg()->tsx.max_count : %d",
-+ pjsip_cfg()->tsx.max_count));
-+ PJ_LOG(3, (id, " pjsip_cfg()->tsx.t1 : %d",
-+ pjsip_cfg()->tsx.t1));
-+ PJ_LOG(3, (id, " pjsip_cfg()->tsx.t2 : %d",
-+ pjsip_cfg()->tsx.t2));
-+ PJ_LOG(3, (id, " pjsip_cfg()->tsx.t4 : %d",
-+ pjsip_cfg()->tsx.t4));
-+ PJ_LOG(3, (id, " pjsip_cfg()->td : %d",
-+ pjsip_cfg()->tsx.td));
-+ PJ_LOG(3, (id, " pjsip_cfg()->regc.check_contact : %d",
-+ pjsip_cfg()->regc.check_contact));
-+ PJ_LOG(3, (id, " pjsip_cfg()->regc.add_xuid_param : %d",
-+ pjsip_cfg()->regc.add_xuid_param));
-+ PJ_LOG(3, (id, " pjsip_cfg()->tcp.keep_alive_interval : %d",
-+ pjsip_cfg()->tcp.keep_alive_interval));
-+ PJ_LOG(3, (id, " pjsip_cfg()->tls.keep_alive_interval : %d",
-+ pjsip_cfg()->tls.keep_alive_interval));
-+}
-+
-
- #ifdef PJ_DLL
- PJ_DEF(pjsip_cfg_t*) pjsip_cfg(void)
---- a/pjsip/src/pjsua-lib/pjsua_core.c
-+++ b/pjsip/src/pjsua-lib/pjsua_core.c
-@@ -3443,8 +3443,10 @@ PJ_DEF(void) pjsua_dump(pj_bool_t detail
- old_decor = pj_log_get_decor();
- pj_log_set_decor(old_decor & (PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_CR));
-
-- if (detail)
-+ if (detail) {
- pj_dump_config();
-+ pjsip_dump_config();
-+ }
-
- pjsip_endpt_dump(pjsua_get_pjsip_endpt(), detail);
-
---- a/tests/pjsua/inc_sip.py
-+++ b/tests/pjsua/inc_sip.py
-@@ -306,9 +306,11 @@ class RecvfromTransaction:
- body = None
- # Pattern to be expected on pjsua when receiving the response
- expect = ""
-+ # Required config
-+ pj_config = ""
-
- def __init__(self, title, resp_code, check_cseq=True,
-- include=[], exclude=[], cmds=[], resp_hdr=[], resp_body=None, expect=""):
-+ include=[], exclude=[], cmds=[], resp_hdr=[], resp_body=None, expect="", pj_config=""):
- self.title = title
- self.cmds = cmds
- self.include = include
-@@ -317,6 +319,7 @@ class RecvfromTransaction:
- self.resp_hdr = resp_hdr
- self.body = resp_body
- self.expect = expect
-+ self.pj_config=pj_config
-
-
- class RecvfromCfg:
-@@ -328,15 +331,18 @@ class RecvfromCfg:
- transaction = None
- # Use TCP?
- tcp = False
-+ # Required config
-+ pj_config = ""
-
- # Note:
- # Any "$PORT" string in the pjsua_args will be replaced
- # by server port
-- def __init__(self, name, pjsua_args, transaction, tcp=False):
-+ def __init__(self, name, pjsua_args, transaction, tcp=False, pj_config=""):
- self.name = name
- self.inst_param = cfg.InstanceParam("pjsua", pjsua_args)
- self.transaction = transaction
- self.tcp=tcp
-+ self.pj_config=pj_config
-
-
-
---- a/tests/pjsua/mod_recvfrom.py
-+++ b/tests/pjsua/mod_recvfrom.py
-@@ -18,10 +18,20 @@ def test_func(test):
- local_port=srv_port,
- tcp=cfg_file.recvfrom_cfg.tcp)
-
-+ config = pjsua.get_config(cfg_file.recvfrom_cfg.pj_config)
-+ print "Config : " + config
-+
- last_cseq = 0
- last_method = ""
- last_call_id = ""
- for t in cfg_file.recvfrom_cfg.transaction:
-+ # Check if transaction requires configuration
-+ if t.pj_config != "":
-+ r = re.compile(t.pj_config, re.I)
-+ if r.search(config) == None:
-+ print "Configuration : " + t.pj_config + " not found, skipping"
-+ continue
-+
- # Print transaction title
- if t.title != "":
- dlg.trace(t.title)
---- a/tests/pjsua/run.py
-+++ b/tests/pjsua/run.py
-@@ -249,6 +249,10 @@ class Expect(threading.Thread):
- time.sleep(0.01)
- return None
-
-+ def get_config(self, key_config):
-+ self.send("dd")
-+ line = self.expect(key_config);
-+ return line
-
- def sync_stdout(self):
- if not self.use_telnet:
---- a/tests/pjsua/scripts-recvfrom/215_reg_good_multi_ok.py
-+++ b/tests/pjsua/scripts-recvfrom/215_reg_good_multi_ok.py
-@@ -14,16 +14,27 @@ req1 = sip.RecvfromTransaction("Initial
- expect="SIP/2.0 401"
- )
-
--req2 = sip.RecvfromTransaction("Registration retry with auth", 200,
-+req2 = sip.RecvfromTransaction("Registration retry with auth (not allowed multiple auth)", 200,
- include=["REGISTER sip",
-- # Must only have 1 Auth hdr since #2887
- "Authorization:", # [\\s\\S]+Authorization:"
- "realm=\"python1\"", # "realm=\"python2\"",
- "username=\"theuser1\"", # "username=\"theuser2\"",
- "nonce=\"1234\"", # "nonce=\"6789\"",
- "response="],
-- expect="registration success"
-+ expect="registration success",
-+ pj_config="PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER.*: 0"
- )
-
-+req3 = sip.RecvfromTransaction("Registration retry with auth (allowed multiple auth)", 200,
-+ include=["REGISTER sip",
-+ "Authorization:[\\s\\S]+Authorization:", # Must have 2 Auth hdrs
-+ "realm=\"python1\"", "realm=\"python2\"",
-+ "username=\"theuser1\"", "username=\"theuser2\"",
-+ "nonce=\"1234\"", "nonce=\"6789\"",
-+ "response="],
-+ expect="registration success",
-+ pj_config="PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER.*: 1"
-+ )
-+
- recvfrom_cfg = sip.RecvfromCfg("Multiple authentication challenges",
-- pjsua, [req1, req2])
-+ pjsua, [req1, req2, req3], pj_config="PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER")
+++ /dev/null
-From c4d34984ec92b3d5252a7d5cddd85a1d3a8001ae Mon Sep 17 00:00:00 2001
-From: sauwming <ming@teluu.com>
-Date: Mon, 3 Oct 2022 08:07:22 +0800
-Subject: [PATCH] Merge pull request from GHSA-fq45-m3f7-3mhj
-
-* Initial patch
-
-* Use 'pj_scan_is_eof(scanner)'
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Use 'pj_scan_is_eof(scanner)'
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Use 'pj_scan_is_eof(scanner)'
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Use `!pj_scan_is_eof` instead of manually checking `scanner->curptr < scanner->end`
-
-Co-authored-by: Maksim Mukosey <mmukosey@gmail.com>
-
-* Update pjlib-util/src/pjlib-util/scanner.c
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Update pjlib-util/src/pjlib-util/scanner.c
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Update pjlib-util/src/pjlib-util/scanner.c
-
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-
-* Revert '>=' back to '>' in pj_scan_stricmp_alnum()
-
-* Fix error compiles.
-
-Co-authored-by: Nanang Izzuddin <nanang@teluu.com>
-Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
-Co-authored-by: Maksim Mukosey <mmukosey@gmail.com>
----
- pjlib-util/src/pjlib-util/scanner.c | 41 +++++++++++++++++++----------
- pjmedia/src/pjmedia/rtp.c | 11 +++++---
- pjmedia/src/pjmedia/sdp.c | 24 ++++++++++-------
- 3 files changed, 48 insertions(+), 28 deletions(-)
-
---- a/pjlib-util/src/pjlib-util/scanner.c
-+++ b/pjlib-util/src/pjlib-util/scanner.c
-@@ -195,7 +195,13 @@ PJ_DEF(void) pj_scan_skip_whitespace( pj
-
- PJ_DEF(void) pj_scan_skip_line( pj_scanner *scanner )
- {
-- char *s = pj_memchr(scanner->curptr, '\n', scanner->end - scanner->curptr);
-+ char *s;
-+
-+ if (pj_scan_is_eof(scanner)) {
-+ return;
-+ }
-+
-+ s = pj_memchr(scanner->curptr, '\n', scanner->end - scanner->curptr);
- if (!s) {
- scanner->curptr = scanner->end;
- } else {
-@@ -264,8 +270,7 @@ PJ_DEF(void) pj_scan_get( pj_scanner *sc
-
- pj_assert(pj_cis_match(spec,0)==0);
-
-- /* EOF is detected implicitly */
-- if (!pj_cis_match(spec, *s)) {
-+ if (pj_scan_is_eof(scanner) || !pj_cis_match(spec, *s)) {
- pj_scan_syntax_err(scanner);
- return;
- }
-@@ -299,8 +304,7 @@ PJ_DEF(void) pj_scan_get_unescape( pj_sc
- /* Must not match character '%' */
- pj_assert(pj_cis_match(spec,'%')==0);
-
-- /* EOF is detected implicitly */
-- if (!pj_cis_match(spec, *s) && *s != '%') {
-+ if (pj_scan_is_eof(scanner) || !pj_cis_match(spec, *s) && *s != '%') {
- pj_scan_syntax_err(scanner);
- return;
- }
-@@ -436,7 +440,9 @@ PJ_DEF(void) pj_scan_get_n( pj_scanner *
-
- scanner->curptr += N;
-
-- if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
-+ if (!pj_scan_is_eof(scanner) &&
-+ PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws)
-+ {
- pj_scan_skip_whitespace(scanner);
- }
- }
-@@ -467,15 +473,16 @@ PJ_DEF(int) pj_scan_get_char( pj_scanner
-
- PJ_DEF(void) pj_scan_get_newline( pj_scanner *scanner )
- {
-- if (!PJ_SCAN_IS_NEWLINE(*scanner->curptr)) {
-+ if (pj_scan_is_eof(scanner) || !PJ_SCAN_IS_NEWLINE(*scanner->curptr)) {
- pj_scan_syntax_err(scanner);
- return;
- }
-
-+ /* We have checked scanner->curptr validity above */
- if (*scanner->curptr == '\r') {
- ++scanner->curptr;
- }
-- if (*scanner->curptr == '\n') {
-+ if (!pj_scan_is_eof(scanner) && *scanner->curptr == '\n') {
- ++scanner->curptr;
- }
-
-@@ -520,7 +527,9 @@ PJ_DEF(void) pj_scan_get_until( pj_scann
-
- scanner->curptr = s;
-
-- if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
-+ if (!pj_scan_is_eof(scanner) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&
-+ scanner->skip_ws)
-+ {
- pj_scan_skip_whitespace(scanner);
- }
- }
-@@ -544,7 +553,9 @@ PJ_DEF(void) pj_scan_get_until_ch( pj_sc
-
- scanner->curptr = s;
-
-- if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
-+ if (!pj_scan_is_eof(scanner) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&
-+ scanner->skip_ws)
-+ {
- pj_scan_skip_whitespace(scanner);
- }
- }
-@@ -570,7 +581,9 @@ PJ_DEF(void) pj_scan_get_until_chr( pj_s
-
- scanner->curptr = s;
-
-- if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
-+ if (!pj_scan_is_eof(scanner) && PJ_SCAN_IS_PROBABLY_SPACE(*s) &&
-+ scanner->skip_ws)
-+ {
- pj_scan_skip_whitespace(scanner);
- }
- }
-@@ -585,7 +598,9 @@ PJ_DEF(void) pj_scan_advance_n( pj_scann
-
- scanner->curptr += N;
-
-- if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && skip_ws) {
-+ if (!pj_scan_is_eof(scanner) &&
-+ PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && skip_ws)
-+ {
- pj_scan_skip_whitespace(scanner);
- }
- }
-@@ -636,5 +651,3 @@ PJ_DEF(void) pj_scan_restore_state( pj_s
- scanner->line = state->line;
- scanner->start_line = state->start_line;
- }
--
--
---- a/pjmedia/src/pjmedia/rtp.c
-+++ b/pjmedia/src/pjmedia/rtp.c
-@@ -188,6 +188,11 @@ PJ_DEF(pj_status_t) pjmedia_rtp_decode_r
- /* Payload is located right after header plus CSRC */
- offset = sizeof(pjmedia_rtp_hdr) + ((*hdr)->cc * sizeof(pj_uint32_t));
-
-+ /* Check that offset is less than packet size */
-+ if (offset >= pkt_len) {
-+ return PJMEDIA_RTP_EINLEN;
-+ }
-+
- /* Decode RTP extension. */
- if ((*hdr)->x) {
- if (offset + sizeof (pjmedia_rtp_ext_hdr) > (unsigned)pkt_len)
-@@ -202,8 +207,8 @@ PJ_DEF(pj_status_t) pjmedia_rtp_decode_r
- dec_hdr->ext_len = 0;
- }
-
-- /* Check that offset is less than packet size */
-- if (offset > pkt_len)
-+ /* Check again that offset is still less than packet size */
-+ if (offset >= pkt_len)
- return PJMEDIA_RTP_EINLEN;
-
- /* Find and set payload. */
-@@ -393,5 +398,3 @@ void pjmedia_rtp_seq_update( pjmedia_rtp
- seq_status->status.value = st.status.value;
- }
- }
--
--
---- a/pjmedia/src/pjmedia/sdp.c
-+++ b/pjmedia/src/pjmedia/sdp.c
-@@ -983,13 +983,13 @@ static void parse_version(pj_scanner *sc
- ctx->last_error = PJMEDIA_SDP_EINVER;
-
- /* check equal sign */
-- if (*(scanner->curptr+1) != '=') {
-+ if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- on_scanner_error(scanner);
- return;
- }
-
- /* check version is 0 */
-- if (*(scanner->curptr+2) != '0') {
-+ if (scanner->curptr+2 >= scanner->end || *(scanner->curptr+2) != '0') {
- on_scanner_error(scanner);
- return;
- }
-@@ -1006,7 +1006,7 @@ static void parse_origin(pj_scanner *sca
- ctx->last_error = PJMEDIA_SDP_EINORIGIN;
-
- /* check equal sign */
-- if (*(scanner->curptr+1) != '=') {
-+ if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- on_scanner_error(scanner);
- return;
- }
-@@ -1052,7 +1052,7 @@ static void parse_time(pj_scanner *scann
- ctx->last_error = PJMEDIA_SDP_EINTIME;
-
- /* check equal sign */
-- if (*(scanner->curptr+1) != '=') {
-+ if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- on_scanner_error(scanner);
- return;
- }
-@@ -1080,7 +1080,7 @@ static void parse_generic_line(pj_scanne
- ctx->last_error = PJMEDIA_SDP_EINSDP;
-
- /* check equal sign */
-- if (*(scanner->curptr+1) != '=') {
-+ if ((scanner->curptr+1 >= scanner->end) || *(scanner->curptr+1) != '=') {
- on_scanner_error(scanner);
- return;
- }
-@@ -1149,7 +1149,7 @@ static void parse_media(pj_scanner *scan
- ctx->last_error = PJMEDIA_SDP_EINMEDIA;
-
- /* check the equal sign */
-- if (*(scanner->curptr+1) != '=') {
-+ if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- on_scanner_error(scanner);
- return;
- }
-@@ -1164,6 +1164,10 @@ static void parse_media(pj_scanner *scan
- /* port */
- pj_scan_get(scanner, &cs_token, &str);
- med->desc.port = (unsigned short)pj_strtoul(&str);
-+ if (pj_scan_is_eof(scanner)) {
-+ on_scanner_error(scanner);
-+ return;
-+ }
- if (*scanner->curptr == '/') {
- /* port count */
- pj_scan_get_char(scanner);
-@@ -1175,7 +1179,7 @@ static void parse_media(pj_scanner *scan
- }
-
- if (pj_scan_get_char(scanner) != ' ') {
-- PJ_THROW(SYNTAX_ERROR);
-+ on_scanner_error(scanner);
- }
-
- /* transport */
-@@ -1183,7 +1187,7 @@ static void parse_media(pj_scanner *scan
-
- /* format list */
- med->desc.fmt_count = 0;
-- while (*scanner->curptr == ' ') {
-+ while (scanner->curptr < scanner->end && *scanner->curptr == ' ') {
- pj_str_t fmt;
-
- pj_scan_get_char(scanner);
-@@ -1223,7 +1227,7 @@ static pjmedia_sdp_attr *parse_attr( pj_
- attr = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_attr);
-
- /* check equal sign */
-- if (*(scanner->curptr+1) != '=') {
-+ if (scanner->curptr+1 >= scanner->end || *(scanner->curptr+1) != '=') {
- on_scanner_error(scanner);
- return NULL;
- }
-@@ -1242,7 +1246,7 @@ static pjmedia_sdp_attr *parse_attr( pj_
- pj_scan_get_char(scanner);
-
- /* get value */
-- if (*scanner->curptr != '\r' && *scanner->curptr != '\n') {
-+ if (!pj_scan_is_eof(scanner) && *scanner->curptr != '\r' && *scanner->curptr != '\n') {
- pj_scan_get_until_chr(scanner, "\r\n", &attr->value);
- } else {
- attr->value.ptr = NULL;
+++ /dev/null
-From 450baca94f475345542c6953832650c390889202 Mon Sep 17 00:00:00 2001
-From: sauwming <ming@teluu.com>
-Date: Tue, 7 Jun 2022 12:00:13 +0800
-Subject: [PATCH] Merge pull request from GHSA-26j7-ww69-c4qj
-
----
- pjlib-util/src/pjlib-util/stun_simple.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
---- a/pjlib-util/src/pjlib-util/stun_simple.c
-+++ b/pjlib-util/src/pjlib-util/stun_simple.c
-@@ -54,6 +54,7 @@ PJ_DEF(pj_status_t) pjstun_parse_msg( vo
- {
- pj_uint16_t msg_type, msg_len;
- char *p_attr;
-+ int attr_max_cnt = PJ_ARRAY_SIZE(msg->attr);
-
- PJ_CHECK_STACK();
-
-@@ -83,7 +84,7 @@ PJ_DEF(pj_status_t) pjstun_parse_msg( vo
- msg->attr_count = 0;
- p_attr = (char*)buf + sizeof(pjstun_msg_hdr);
-
-- while (msg_len > 0) {
-+ while (msg_len > 0 && msg->attr_count < attr_max_cnt) {
- pjstun_attr_hdr **attr = &msg->attr[msg->attr_count];
- pj_uint32_t len;
- pj_uint16_t attr_type;
-@@ -111,6 +112,10 @@ PJ_DEF(pj_status_t) pjstun_parse_msg( vo
- p_attr += len;
- ++msg->attr_count;
- }
-+ if (msg->attr_count == attr_max_cnt) {
-+ PJ_LOG(4, (THIS_FILE, "Warning: max number attribute %d reached.",
-+ attr_max_cnt));
-+ }
-
- return PJ_SUCCESS;
- }
include $(TOPDIR)/rules.mk
PKG_NAME:=asterisk
-PKG_VERSION:=20.0.1
+PKG_VERSION:=20.3.0
PKG_RELEASE:=1
PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/asterisk/releases
-PKG_HASH:=52ae561893553f6cdaf3b295182f5d55dc8b950d210356a19708775cabe20085
+PKG_HASH:=2e70b4bb40114966c6572eae38b5106b588a7a759d41f1c90a6032407dd60463
PKG_BUILD_DEPENDS:=libxml2/host
app-blind-transfer \
app-bridgeaddchan \
app-bridgewait \
+ app-broadcast \
app-celgenuserevent \
app-chanisavail \
app-channelredirect \
app-flash \
app-followme \
app-getcpeid \
+ app-if \
app-ivrdemo \
app-mf \
app-milliwatt \
app-senddtmf \
app-sendtext \
app-sf \
+ app-signal \
app-skel \
app-sms \
app-softhangup \
func-enum \
func-env \
func-evalexten \
+ func-export \
func-extstate \
func-frame-drop \
func-frame-trace \
res-mwi-external-ami \
res-parking \
res-phoneprov \
+ res-pjsip-aoc \
res-pjsip-geolocation \
res-pjsip-phoneprov \
+ res-pjsip-rfc3329 \
res-pjsip-stir-shaken \
res-pjproject \
res-pktccops \
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-format-ogg-vorbis),--with-vorbis="$(STAGING_DIR)/usr",--without-vorbis) \
$(if $(CONFIG_PACKAGE_$(PKG_NAME)-app-voicemail-imap),--with-imap=system,--without-imap) \
--without-uriparser \
- --without-vpb \
--with-z="$(STAGING_DIR)/usr"
ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-codec-speex)$(CONFIG_PACKAGE_$(PKG_NAME)-format-ogg-speex)$(CONFIG_PACKAGE_$(PKG_NAME)-func-speex),)
--with-ogg="$(STAGING_DIR)/usr"
endif
-ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-res-pjproject)$(CONFIG_PACKAGE_$(PKG_NAME)-res-srtp),)
+ifeq ($(CONFIG_PACKAGE_$(PKG_NAME)-res-srtp),)
CONFIGURE_ARGS+= \
--without-srtp
else
$(eval $(call BuildAsteriskModule,app-blind-transfer,Blind transfer,Redirects all channels currently bridged to the caller channel to a specified destination.,,,app_blind_transfer,,))
$(eval $(call BuildAsteriskModule,app-bridgeaddchan,Bridge add channel,Bridge-add-channel application.,,,app_bridgeaddchan,,))
$(eval $(call BuildAsteriskModule,app-bridgewait,Holding bridge,Application to place a channel into a holding bridge.,+$(PKG_NAME)-bridge-holding,,app_bridgewait,,))
+$(eval $(call BuildAsteriskModule,app-broadcast,Channel audio broadcasting,Channel Audio Broadcasting.,,,app_broadcast,,))
$(eval $(call BuildAsteriskModule,app-celgenuserevent,User-defined CEL event,Generate a user defined CEL event.,,,app_celgenuserevent,,))
$(eval $(call BuildAsteriskModule,app-chanisavail,Channel availability check,Check channel availability.,,,app_chanisavail,,))
$(eval $(call BuildAsteriskModule,app-channelredirect,Redirect a channel,Redirects a given channel to a dialplan target.,,,app_channelredirect,,))
$(eval $(call BuildAsteriskModule,app-flash,Flash channel,Flash channel application.,+$(PKG_NAME)-chan-dahdi,,app_flash,,))
$(eval $(call BuildAsteriskModule,app-followme,Find-me/follow-me,Find-Me/Follow-Me application.,,followme.conf,app_followme,,))
$(eval $(call BuildAsteriskModule,app-getcpeid,Get ADSI CPE ID,Get ADSI CPE ID.,+asterisk-res-adsi,,app_getcpeid,,))
+$(eval $(call BuildAsteriskModule,app-if,If branch and conditional execution,If Branch and Conditional Execution.,,,app_if,,))
$(eval $(call BuildAsteriskModule,app-ivrdemo,IVR demo,IVR demo application.,,,app_ivrdemo,,))
$(eval $(call BuildAsteriskModule,app-mf,MF digits,Send MF digits Application.,,,app_mf,,))
$(eval $(call BuildAsteriskModule,app-milliwatt,Digital milliwatt [mu-law] test app,Digital milliwatt test application.,,,app_milliwatt,,))
$(eval $(call BuildAsteriskModule,app-senddtmf,Send DTMF digits,Send DTMF digits application.,,,app_senddtmf,,))
$(eval $(call BuildAsteriskModule,app-sendtext,Send text,Send text applications.,,,app_sendtext,,))
$(eval $(call BuildAsteriskModule,app-sf,SF Sender and Receiver Applications,SF Sender and Receiver Applications.,,,app_sf,,))
+$(eval $(call BuildAsteriskModule,app-signal,Channel signaling,Channel Signaling Applications.,,,app_signal,,))
$(eval $(call BuildAsteriskModule,app-skel,Skeleton [sample],Skeleton application.,,app_skel.conf,app_skel,,))
$(eval $(call BuildAsteriskModule,app-sms,SMS,SMS/PSTN handler.,,,app_sms,,))
$(eval $(call BuildAsteriskModule,app-softhangup,Hang up requested channel,Hangs up the requested channel.,,,app_softhangup,,))
$(eval $(call BuildAsteriskModule,func-enum,ENUM,ENUM related dialplan functions.,,enum.conf,func_enum,,))
$(eval $(call BuildAsteriskModule,func-env,Environment functions,Environment/filesystem dialplan functions.,,,func_env,,))
$(eval $(call BuildAsteriskModule,func-evalexten,Extension evaluation,Extension evaluation functions.,,,func_evalexten,,))
+$(eval $(call BuildAsteriskModule,func-export,Export function,Set variables and functions on other channels.,,,func_export,,))
$(eval $(call BuildAsteriskModule,func-extstate,Hinted extension state,Gets the state of an extension in the dialplan.,,,func_extstate,,))
$(eval $(call BuildAsteriskModule,func-frame-drop,Frame drop,Function to drop frames on a channel.,,,func_frame_drop,,))
$(eval $(call BuildAsteriskModule,func-frame-trace,Frame trace for internal ast_frame debugging,Frame trace for internal ast_frame debugging.,,,func_frame_trace,,))
$(eval $(call BuildAsteriskModule,res-format-attr-siren7,Siren7 format attribute module,Siren7 format attribute module.,,,res_format_attr_siren7,,))
$(eval $(call BuildAsteriskModule,res-format-attr-vp8,VP8 format attribute module,VP8 format attribute module.,,,res_format_attr_vp8,,))
$(eval $(call BuildAsteriskModule,res-geolocation,Geolocation,Geolocation support.,@ASTERISK_LIBXSLT_SUPPORT,geolocation.conf,res_geolocation,,))
-$(eval $(call BuildAsteriskModule,res-http-media-cache,HTTP media cache backend,HTTP media cache backend.,+$(PKG_NAME)-curl,,res_http_media_cache,,))
+$(eval $(call BuildAsteriskModule,res-http-media-cache,HTTP media cache backend,HTTP media cache backend.,+$(PKG_NAME)-curl,res_http_media_cache.conf,res_http_media_cache,,))
$(eval $(call BuildAsteriskModule,res-http-websocket,HTTP websocket,HTTP WebSocket support.,,,res_http_websocket,,))
$(eval $(call BuildAsteriskModule,res-limit,Resource limits,Resource limits.,,,res_limit,,))
$(eval $(call BuildAsteriskModule,res-manager-devicestate,Device state topic forwarder,Manager device state topic forwarder.,,,res_manager_devicestate,,))
$(eval $(call BuildAsteriskModule,res-mwi-external-ami,AMI for external MWI,AMI support for external MWI.,+$(PKG_NAME)-res-mwi-external,,res_mwi_external_ami,,))
$(eval $(call BuildAsteriskModule,res-parking,Phone Parking,Call parking resource.,+$(PKG_NAME)-bridge-holding,res_parking.conf,res_parking,,))
$(eval $(call BuildAsteriskModule,res-phoneprov,Phone Provisioning,HTTP phone provisioning.,,phoneprov.conf,res_phoneprov,,))
+$(eval $(call BuildAsteriskModule,res-pjsip-aoc,PJSIP AOC,PJSIP AOC Support.,+asterisk-pjsip +asterisk-res-pjproject,,res_pjsip_aoc,,))
$(eval $(call BuildAsteriskModule,res-pjsip-geolocation,PJSIP Geolocation,PJSIP Geolocation support.,+asterisk-pjsip +asterisk-res-geolocation,,res_pjsip_geolocation,,))
$(eval $(call BuildAsteriskModule,res-pjsip-phoneprov,PJSIP Phone Provisioning,PJSIP phone provisioning.,+$(PKG_NAME)-pjsip +$(PKG_NAME)-res-phoneprov,,res_pjsip_phoneprov_provider,,))
+$(eval $(call BuildAsteriskModule,res-pjsip-rfc3329,PJSIP RFC3329,PJSIP RFC3329 Support (partial).,+asterisk-pjsip +asterisk-res-pjproject,,res_pjsip_rfc3329,,))
$(eval $(call BuildAsteriskModule,res-pjsip-stir-shaken,PJSIP STIR/SHAKEN resource module,PJSIP STIR/SHAKEN resource module.,+$(PKG_NAME)-pjsip +$(PKG_NAME)-res-stir-shaken,,res_pjsip_stir_shaken,,))
-$(eval $(call BuildAsteriskModule,res-pjproject,Bridge PJPROJECT to Asterisk logging,PJProject log and utility support.,+asterisk-res-sorcery +libpj +libpjlib-util +libpjmedia +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +libpjsua +libpjsua2 +libsrtp2,pjproject.conf,res_pjproject,,))
+$(eval $(call BuildAsteriskModule,res-pjproject,Bridge PJPROJECT to Asterisk logging,PJProject log and utility support.,+asterisk-res-sorcery +libpj +libpjlib-util +libpjmedia +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsip +libpjsua +libpjsua2,pjproject.conf,res_pjproject,,))
$(eval $(call BuildAsteriskModule,res-pktccops,PktcCOPS manager for MGCP,PktcCOPS manager for MGCP.,,res_pktccops.conf,res_pktccops,,))
$(eval $(call BuildAsteriskModule,res-prometheus,Prometheus resource module,Prometheus resource module.,+libpjsip +libpjmedia +libpjnath +libpjsip-simple +libpjsip-ua +libpjsua +libpjsua2,prometheus.conf,res_prometheus,,))
$(eval $(call BuildAsteriskModule,res-realtime,RealTime CLI,Realtime data lookup/rewrite.,,,res_realtime,,))
--- a/res/ael/ael.flex
+++ b/res/ael/ael.flex
-@@ -601,7 +601,7 @@ includes { STORE_POS; return KW_INCLUDES
+@@ -598,7 +598,7 @@ includes { STORE_POS; return KW_INCLUDES
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
}
glob_ret = glob(fnamebuf, GLOB_NOMAGIC|GLOB_BRACE, NULL, &globbuf);
--- a/res/ael/ael_lex.c
+++ b/res/ael/ael_lex.c
-@@ -1982,7 +1982,7 @@ YY_RULE_SETUP
+@@ -1966,7 +1966,7 @@ YY_RULE_SETUP
snprintf(fnamebuf2,sizeof(fnamebuf2), "%s/%s", (char *)ast_config_AST_CONFIG_DIR, fnamebuf);
ast_copy_string(fnamebuf,fnamebuf2,sizeof(fnamebuf));
}
--- a/configure.ac
+++ b/configure.ac
-@@ -1255,7 +1255,7 @@ if test "${ac_cv_have_variable_fdset}x"
+@@ -1256,7 +1256,7 @@ if test "${ac_cv_have_variable_fdset}x"
fi
AC_MSG_CHECKING([if we have usable eventfd support])
--- a/configure.ac
+++ b/configure.ac
-@@ -2599,7 +2599,7 @@ if test -z "$__opus_include" -o x"$__opu
+@@ -2616,7 +2616,7 @@ if test -z "$__opus_include" -o x"$__opu
fi
AST_EXT_LIB_CHECK([OPUSFILE], [opusfile], [op_open_callbacks], [opus/opusfile.h], [], [$__opus_include])
--- /dev/null
+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;
+ }