pjproject: sync patches with asterisk 20.5.2
[feed/telephony.git] / libs / pjproject / patches / 0004-config_site.patch
1 --- /dev/null
2 +++ b/pjlib/include/pj/config_site.h
3 @@ -0,0 +1,91 @@
4 +/*
5 + * Asterisk config_site.h
6 + */
7 +
8 +#include <sys/select.h>
9 +
10 +/*
11 + * Defining PJMEDIA_HAS_SRTP to 0 does NOT disable Asterisk's ability to use srtp.
12 + * It only disables the pjmedia srtp transport which Asterisk doesn't use.
13 + * The reason for the disable is that while Asterisk works fine with older libsrtp
14 + * versions, newer versions of pjproject won't compile with them.
15 + */
16 +#define PJMEDIA_HAS_SRTP 0
17 +
18 +#define PJ_HAS_IPV6 1
19 +#define NDEBUG 1
20 +
21 +#define PJ_MAX_HOSTNAME (256)
22 +#define PJSIP_MAX_URL_SIZE (512)
23 +#ifdef PJ_HAS_LINUX_EPOLL
24 +#define PJ_IOQUEUE_MAX_HANDLES (5000)
25 +#else
26 +#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE)
27 +#endif
28 +#define PJ_IOQUEUE_HAS_SAFE_UNREG 1
29 +#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16)
30 +
31 +#define PJ_SCANNER_USE_BITWISE 0
32 +#define PJ_OS_HAS_CHECK_STACK 0
33 +
34 +#ifndef PJ_LOG_MAX_LEVEL
35 +#define PJ_LOG_MAX_LEVEL 6
36 +#endif
37 +
38 +#define PJ_ENABLE_EXTRA_CHECK 1
39 +#define PJSIP_MAX_TSX_COUNT ((64*1024)-1)
40 +#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1)
41 +#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024)
42 +#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024)
43 +#define PJ_DEBUG 0
44 +#define PJSIP_SAFE_MODULE 0
45 +#define PJ_HAS_STRICMP_ALNUM 0
46 +
47 +/*
48 + * Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is
49 + * inconsistently used when calculating the hash value and doesn't
50 + * convert the same characters as pj_tolower()/tolower(). Thus you
51 + * can get different hash values if the string hashed has certain
52 + * characters in it. (ASCII '@', '[', '\\', ']', '^', and '_')
53 + */
54 +#undef PJ_HASH_USE_OWN_TOLOWER
55 +
56 +/*
57 + It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
58 + Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
59 +*/
60 +#undef PJSIP_UNESCAPE_IN_PLACE
61 +#define PJSIP_MAX_PKT_LEN 65535
62 +
63 +#undef PJ_TODO
64 +#define PJ_TODO(x)
65 +
66 +/* Defaults too low for WebRTC */
67 +#define PJ_ICE_MAX_CAND 64
68 +#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
69 +
70 +/* Increase limits to allow more formats */
71 +#define PJMEDIA_MAX_SDP_FMT 64
72 +#define PJMEDIA_MAX_SDP_BANDW 4
73 +#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*3 + 4)
74 +#define PJMEDIA_MAX_SDP_MEDIA 16
75 +
76 +/*
77 + * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds),
78 + * which conflicts with the global section's keep_alive_interval option in
79 + * pjsip.conf.
80 + */
81 +#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0
82 +#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0
83 +
84 +#define PJSIP_TSX_UAS_CONTINUE_ON_TP_ERROR 0
85 +#define PJ_SSL_SOCK_OSSL_USE_THREAD_CB 0
86 +#define PJSIP_AUTH_ALLOW_MULTIPLE_AUTH_HEADER 1
87 +
88 +/*
89 + * The default is 32 with 8 being used by pjproject itself.
90 + * Since this value is used in invites, dialogs, transports
91 + * and subscriptions as well as the global pjproject endpoint,
92 + * we don't want to increase it too much.
93 + */
94 +#define PJSIP_MAX_MODULE 38