pjproject: add config_site.h
[feed/telephony.git] / libs / pjproject / patches / 150-config_site.patch
1 --- /dev/null
2 +++ b/pjlib/include/pj/config_site.h
3 @@ -0,0 +1,92 @@
4 +/*
5 + * Asterisk config_site.h
6 + */
7 +
8 +#include <sys/select.h>
9 +
10 +/*
11 + * Since both pjproject and asterisk source files will include config_site.h,
12 + * we need to make sure that only pjproject source files include asterisk_malloc_debug.h.
13 + */
14 +
15 +/* #if defined(MALLOC_DEBUG) && !defined(_ASTERISK_ASTMM_H)
16 + * #include "asterisk_malloc_debug.h"
17 + * #endif
18 + */
19 +
20 +/*
21 + * Defining PJMEDIA_HAS_SRTP to 0 does NOT disable Asterisk's ability to use srtp.
22 + * It only disables the pjmedia srtp transport which Asterisk doesn't use.
23 + * The reason for the disable is that while Asterisk works fine with older libsrtp
24 + * versions, newer versions of pjproject won't compile with them.
25 + */
26 +
27 +/*
28 + * This doesn't disable SRTP completely, so we have to keep using the external
29 + * libsrtp, otherwise pjsip would just build the internal one.
30 + */
31 +
32 +#define PJMEDIA_HAS_SRTP 0
33 +
34 +/*
35 + * Defining PJMEDIA_HAS_WEBRTC_AEC to 0 does NOT disable Asterisk's ability to use
36 + * webrtc. It only disables the pjmedia webrtc transport which Asterisk doesn't use.
37 + */
38 +#define PJMEDIA_HAS_WEBRTC_AEC 0
39 +
40 +#define PJ_HAS_IPV6 1
41 +#define NDEBUG 1
42 +#define PJ_MAX_HOSTNAME (256)
43 +#define PJSIP_MAX_URL_SIZE (512)
44 +#ifdef PJ_HAS_LINUX_EPOLL
45 +#define PJ_IOQUEUE_MAX_HANDLES (5000)
46 +#else
47 +#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE)
48 +#endif
49 +#define PJ_IOQUEUE_HAS_SAFE_UNREG 1
50 +#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16)
51 +
52 +#define PJ_SCANNER_USE_BITWISE 0
53 +#define PJ_OS_HAS_CHECK_STACK 0
54 +
55 +#ifndef PJ_LOG_MAX_LEVEL
56 +#define PJ_LOG_MAX_LEVEL 6
57 +#endif
58 +
59 +#define PJ_ENABLE_EXTRA_CHECK 1
60 +#define PJSIP_MAX_TSX_COUNT ((64*1024)-1)
61 +#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1)
62 +#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024)
63 +#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024)
64 +#define PJ_DEBUG 0
65 +#define PJSIP_SAFE_MODULE 0
66 +#define PJ_HAS_STRICMP_ALNUM 0
67 +
68 +/*
69 + * Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is
70 + * inconsistently used when calculating the hash value and doesn't
71 + * convert the same characters as pj_tolower()/tolower(). Thus you
72 + * can get different hash values if the string hashed has certain
73 + * characters in it. (ASCII '@', '[', '\\', ']', '^', and '_')
74 + */
75 +#undef PJ_HASH_USE_OWN_TOLOWER
76 +
77 +/*
78 + It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
79 + Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
80 +*/
81 +#undef PJSIP_UNESCAPE_IN_PLACE
82 +#define PJSIP_MAX_PKT_LEN 6000
83 +
84 +#undef PJ_TODO
85 +#define PJ_TODO(x)
86 +
87 +/* Defaults too low for WebRTC */
88 +#define PJ_ICE_MAX_CAND 32
89 +#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
90 +
91 +/* Increase limits to allow more formats */
92 +#define PJMEDIA_MAX_SDP_FMT 64
93 +#define PJMEDIA_MAX_SDP_BANDW 4
94 +#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*2 + 4)
95 +#define PJMEDIA_MAX_SDP_MEDIA 16