Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions libs/pjproject/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=pjproject
PKG_VERSION:=2.15.1
PKG_VERSION:=2.17
PKG_RELEASE:=1
PKG_CPE_ID:=cpe:/a:pjsip:pjsip

# 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/refs/tags
PKG_HASH:=8f3bd99caf003f96ed8038b8a36031eb9d8cd9eaea1eaff7e01c2eef6bd55706
PKG_HASH:=065fe06c06788d97c35f563796d59f00ce52fe9558a52d7b490a042a966facce
PKG_INSTALL:=1

PKG_LICENSE:=GPL-2.0
Expand Down Expand Up @@ -95,6 +95,11 @@ CONFIGURE_ARGS+= \

TARGET_CFLAGS+=$(TARGET_CPPFLAGS)

define Build/Prepare
$(call Build/Prepare/Default)
$(CP) config_site.h $(PKG_BUILD_DIR)/pjlib/include/pj/config_site.h
endef

define Build/Compile
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) EXCLUDE_APP=1 dep
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) EXCLUDE_APP=1
Expand Down
117 changes: 117 additions & 0 deletions libs/pjproject/config_site.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* Asterisk config_site.h
*/

#include <sys/select.h>

/*
* Defining PJMEDIA_HAS_SRTP to 0 does NOT disable Asterisk's ability to use srtp.
* It only disables the pjmedia srtp transport which Asterisk doesn't use.
* The reason for the disable is that while Asterisk works fine with older libsrtp
* versions, newer versions of pjproject won't compile with them.
*/
#define PJMEDIA_HAS_SRTP 0

#define PJ_HAS_IPV6 1
#define NDEBUG 1

#define PJ_MAX_HOSTNAME (256)
#define PJSIP_MAX_URL_SIZE (512)
#ifdef PJ_HAS_LINUX_EPOLL
#define PJ_IOQUEUE_MAX_HANDLES (5000)
#else
#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE)
#endif
#define PJ_IOQUEUE_HAS_SAFE_UNREG 1
#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16)

/*
* Increase the number of socket options available. This adjustment is necessary
* to accommodate additional TCP keepalive settings required for optimizing SIP
* transport stability, especially in environments prone to connection timeouts.
* The default limit is insufficient when configuring all desired keepalive
* parameters along with standard socket options.
*/
#define PJ_MAX_SOCKOPT_PARAMS 5

#define PJ_SCANNER_USE_BITWISE 0
#define PJ_OS_HAS_CHECK_STACK 0

#ifndef PJ_LOG_MAX_LEVEL
#define PJ_LOG_MAX_LEVEL 6
#endif

#define PJ_ENABLE_EXTRA_CHECK 1
#define PJSIP_MAX_TSX_COUNT ((64*1024)-1)
#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1)
#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024)
#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024)
#define PJ_DEBUG 0
#define PJSIP_SAFE_MODULE 0
#define PJ_HAS_STRICMP_ALNUM 0

/*
* Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is
* inconsistently used when calculating the hash value and doesn't
* convert the same characters as pj_tolower()/tolower(). Thus you
* can get different hash values if the string hashed has certain
* characters in it. (ASCII '@', '[', '\\', ']', '^', and '_')
*/
#undef PJ_HASH_USE_OWN_TOLOWER

/*
It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
*/
#undef PJSIP_UNESCAPE_IN_PLACE
#define PJSIP_MAX_PKT_LEN 65535

#undef PJ_TODO
#define PJ_TODO(x)

/* Defaults too low for WebRTC */
#define PJ_ICE_MAX_CAND 64
#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)

/* Increase limits to allow more formats */
#define PJMEDIA_MAX_SDP_FMT 72
#define PJMEDIA_MAX_SDP_BANDW 4
#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*6 + 4)
#define PJMEDIA_MAX_SDP_MEDIA 16

/*
* Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds),
* which conflicts with the global section's keep_alive_interval option in
* pjsip.conf.
*/
#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0
#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0

#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 0

/*
* 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

/*
* Disable ICE check for source address match. Asterisk handles
* this itself and having both enabled causes the rtp stream
* to not be established correctly.
*/

#define PJ_ICE_SESS_CHECK_SRC_ADDR 0

/*
* Disables internal absorption of retransmitted INVITE requests
* after ACK, restoring legacy behavior where retransmissions
* are forwarded to the application layer instead of being
* silently handled by the PJSIP stack.
*/

#define PJSIP_INV_ABSORB_RETRANS_AFTER_ACK 0
102 changes: 0 additions & 102 deletions libs/pjproject/patches/0004-config_site.patch

This file was deleted.

2 changes: 1 addition & 1 deletion libs/pjproject/patches/0006-fix-pkg_config-file.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Description: Multimedia communication library
--- a/build.mak.in
+++ b/build.mak.in
@@ -352,6 +352,6 @@ export PJ_LIBXX_FILES := $(APP_LIBXX_FIL
@@ -358,6 +358,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@
Expand Down
Loading
Loading