1 /*****************************************************************************\
3 ** Linux Call Router **
5 **---------------------------------------------------------------------------**
6 ** Copyright: Andreas Eversberg **
8 ** Header file for defining fixed values for the current version **
10 \*****************************************************************************/
26 #include <sys/types.h>
29 #include <sys/ioctl.h>
32 #include <sys/resource.h>
33 #include <sys/socket.h>
38 #define VERSION_STRING VERSION
51 //extern pthread_mutex_t mutex_lcr; // lcr process mutex
53 extern FILE *debug_fp;
55 #define PDEBUG(mask, fmt, arg...) _printdebug(__FILE__, __FUNCTION__, __LINE__, mask, fmt, ## arg)
56 #define PERROR(fmt, arg...) _printerror(__FILE__, __FUNCTION__, __LINE__, fmt, ## arg)
57 #define PDEBUG_RUNTIME(mask, fmt, arg...) _printdebug(NULL, NULL, 0, mask, fmt, ## arg)
58 #define PERROR_RUNTIME(fmt, arg...) _printerror(NULL, NULL, 0, fmt, ## arg)
59 void _printdebug(const char *file, const char *function, int line, unsigned int mask, const char *fmt, ...);
60 void _printerror(const char *file, const char *function, int line, const char *fmt, ...);
62 void debug(const char *file, const char *function, int line, const char *prefix, char *buffer);
64 #define DEBUG_CONFIG 0x0001
65 #define DEBUG_MSG 0x0002
66 #define DEBUG_STACK 0x0004
67 #define DEBUG_BCHANNEL 0x0008
68 #define DEBUG_PORT 0x0100
69 #define DEBUG_ISDN 0x0110
70 #define DEBUG_GSM 0x0120
71 #define DEBUG_SS5 0x0140
72 #define DEBUG_VBOX 0x0180
73 #define DEBUG_SIP 0x10100
74 #define DEBUG_EPOINT 0x0200
75 #define DEBUG_JOIN 0x0400
76 #define DEBUG_VERSATEL 0x0800
77 #define DEBUG_CRYPT 0x1000
78 #define DEBUG_ROUTE 0x2000
79 #define DEBUG_IDLETIME 0x4000
81 // check any faulty malloc
82 #define MALLOC_CHECK_ 1
85 * one of the bits must be enabled in order to write log files
87 #define DEBUG_LOG 0xfffff
90 * load transmit buffer to avoid gaps at the beginning due to jitter
92 #define ISDN_LOAD 1024 // samples
94 /* give sendmail program. if not inside $PATH, give absolute path here (e.g. "/usr/sbin/sendmail")
96 #define SENDMAIL "sendmail"
98 /* leave it above 1024, because lower values can be unsafe, higher valuse cause
99 * data larger than 512 bytes of hex strings.
101 #define RSA_BITS 1536
103 /* 'goto' or 'menu' actions may cause infinite loops. they will be prevented by this limit.
104 * Also other recursions, like redialing the 'redial' action must be prevented.
105 * increase it ONLY IF you have a deeper tree of rule sets, than the value given here.
107 #define RULE_NESTING 10
109 /* to debug core bridging, rather than mISDN dsp bridging, enable.
110 * this is for debugging only, bridging conferences will not work
112 //#define DEBUG_COREBRIDGE
114 /* special debugging for buffer overflow bugs
115 * note: whenever a buffer gets strange values, the budetect function must
116 * be modified to detect the change of these values. whenever it is detected,
117 * an error message is given at budetect function.
119 //#define BUDETECT_DEF
121 /* internal limit of payload type in a message */
124 #define BUDETECT budetect(__FILE__, __LINE__, __FUNCTION__);
125 void budetect(const char *file, int line, const char *function);
134 #include <mISDN/mbuffer.h>
142 #include "interface.h"
143 #include "extension.h"
145 #include "endpoint.h"
146 #include "endpointapp.h"
148 #include "appbridge.h"
149 #include "callerid.h"
167 #if defined WITH_GSM_BS || defined WITH_GSM_MS
177 #include "ss5_encode.h"
178 #include "ss5_decode.h"
188 #include "alawulaw.h"
191 #include "socket_server.h"
196 #define DIRECTION_NONE 0
197 #define DIRECTION_OUT 1
198 #define DIRECTION_IN 2
202 struct mISDNport *mISDNport;