config_site.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Asterisk config_site.h
  3. */
  4. #include <sys/select.h>
  5. /*
  6. * Since both pjproject and asterisk source files will include config_site.h,
  7. * we need to make sure that only pjproject source files include asterisk_malloc_debug.h.
  8. */
  9. #if defined(MALLOC_DEBUG) && !defined(_ASTERISK_ASTMM_H)
  10. #include "asterisk_malloc_debug.h"
  11. #endif
  12. /*
  13. * Defining PJMEDIA_HAS_SRTP to 0 does NOT disable Asterisk's ability to use srtp.
  14. * It only disables the pjmedia srtp transport which Asterisk doesn't use.
  15. * The reason for the disable is that while Asterisk works fine with older libsrtp
  16. * versions, newer versions of pjproject won't compile with them.
  17. */
  18. #define PJMEDIA_HAS_SRTP 0
  19. #define PJ_HAS_IPV6 1
  20. #define NDEBUG 1
  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. #define PJ_SCANNER_USE_BITWISE 0
  31. #define PJ_OS_HAS_CHECK_STACK 0
  32. #ifndef PJ_LOG_MAX_LEVEL
  33. #define PJ_LOG_MAX_LEVEL 6
  34. #endif
  35. #define PJ_ENABLE_EXTRA_CHECK 1
  36. #define PJSIP_MAX_TSX_COUNT ((64*1024)-1)
  37. #define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1)
  38. #define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024)
  39. #define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024)
  40. #define PJ_DEBUG 0
  41. #define PJSIP_SAFE_MODULE 0
  42. #define PJ_HAS_STRICMP_ALNUM 0
  43. /*
  44. * Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is
  45. * inconsistently used when calculating the hash value and doesn't
  46. * convert the same characters as pj_tolower()/tolower(). Thus you
  47. * can get different hash values if the string hashed has certain
  48. * characters in it. (ASCII '@', '[', '\\', ']', '^', and '_')
  49. */
  50. #undef PJ_HASH_USE_OWN_TOLOWER
  51. /*
  52. It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
  53. Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
  54. */
  55. #undef PJSIP_UNESCAPE_IN_PLACE
  56. #define PJSIP_MAX_PKT_LEN 32000
  57. #undef PJ_TODO
  58. #define PJ_TODO(x)
  59. /* Defaults too low for WebRTC */
  60. #define PJ_ICE_MAX_CAND 32
  61. #define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
  62. /* Increase limits to allow more formats */
  63. #define PJMEDIA_MAX_SDP_FMT 64
  64. #define PJMEDIA_MAX_SDP_BANDW 4
  65. #define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*2 + 4)
  66. #define PJMEDIA_MAX_SDP_MEDIA 16
  67. /*
  68. * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds),
  69. * which conflicts with the global section's keep_alive_interval option in
  70. * pjsip.conf.
  71. */
  72. #define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0
  73. #define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0