Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 203 lines (149 sloc) 6.009 kb
ccaaa81 Initial revision
bogdan_iancu authored
1 /*
2 * $Id$
3 *
4 * Copyright (C) 2001-2003 FhG Fokus
5 *
6 * This file is part of openser, a free SIP server.
7 *
8 * openser is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version
12 *
13 * openser is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 * History:
23 * --------
24 * 2003-04-05 DEFAULT_*_URL introduced (jiri)
25 * 2003-07-04 fixed SRV lookup prefix for TLS/sips (andrei)
26 */
27
28
29
30
31 #ifndef config_h
32 #define config_h
33
34 #include "types.h"
35
36 /* default sip port if none specified */
37 #define SIP_PORT 5060
38 #define SIPS_PORT 5061
39
cfc105b fixed default config file (reported by "radius")
bogdan_iancu authored
40 #define CFG_FILE CFG_DIR "openser.cfg"
ccaaa81 Initial revision
bogdan_iancu authored
41
42 #define TLS_PKEY_FILE CFG_DIR "cert.pem"
43 #define TLS_CERT_FILE CFG_DIR "cert.pem"
44 #define TLS_CA_FILE 0 /* no CA list file by default */
45
46
47 /* maximum number of addresses on which we will listen */
48 #define MAX_LISTEN 16
49
50 /* default number of child processes started */
51 #define CHILD_NO 8
52
1a6791e maximum number of script routes increased - since witht the ability of h...
bogdan_iancu authored
53 #define RT_NO 40 /* routing tables number */
ccaaa81 Initial revision
bogdan_iancu authored
54 #define FAILURE_RT_NO RT_NO /* on_failure routing tables number */
55 #define ONREPLY_RT_NO RT_NO /* on_reply routing tables number */
985a972 -core support for BRANCH routes (partial from SER)
bogdan_iancu authored
56 #define BRANCH_RT_NO RT_NO /* T-branch routing tables number */
ccaaa81 Initial revision
bogdan_iancu authored
57 #define DEFAULT_RT 0 /* default routing table */
58
59 #define MAX_REC_LEV 100 /* maximum number of recursive calls */
60 #define ROUTE_MAX_REC_LEV 100 /* maximum number of recursive calls
61 for route()*/
62
63 #define MAX_URI_SIZE 1024 /* used when rewriting URIs */
64
17812ac - applied patch for Path support according to RFC 3327 for usage in
bogdan_iancu authored
65 /* TODO: varchar-restriction for mysql-based usrloc? */
66 #define MAX_PATH_SIZE 255 /* maximum length of Path header */
67
ccaaa81 Initial revision
bogdan_iancu authored
68 #define MY_VIA "Via: SIP/2.0/UDP "
69 #define MY_VIA_LEN (sizeof(MY_VIA) - 1)
70
71 #define CONTENT_LENGTH "Content-Length: "
72 #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1)
73
74 #define USER_AGENT "User-Agent: OpenSer (" VERSION " (" ARCH "/" OS"))"
75 #define USER_AGENT_LEN (sizeof(USER_AGENT)-1)
76
77 #define SERVER_HDR "Server: OpenSer (" VERSION " (" ARCH "/" OS"))"
78 #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1)
79
80 #define MAX_WARNING_LEN 256
81
82 #define MY_BRANCH ";branch="
83 #define MY_BRANCH_LEN (sizeof(MY_BRANCH) - 1)
84
85 #define MAX_PORT_LEN 7 /* ':' + max 5 letters + \0 */
86 #define CRLF "\r\n"
87 #define CRLF_LEN (sizeof(CRLF) - 1)
88
89 #define RECEIVED ";received="
90 #define RECEIVED_LEN (sizeof(RECEIVED) - 1)
91
92 #define TRANSPORT_PARAM ";transport="
93 #define TRANSPORT_PARAM_LEN (sizeof(TRANSPORT_PARAM) - 1)
94
95 #define TOTAG_TOKEN ";tag="
96 #define TOTAG_TOKEN_LEN (sizeof(TOTAG_TOKEN)-1)
97
98 #define RPORT ";rport="
99 #define RPORT_LEN (sizeof(RPORT) - 1)
100
101 #define ID_PARAM ";i="
102 #define ID_PARAM_LEN (sizeof(ID_PARAM) - 1)
103
104 #define SRV_UDP_PREFIX "_sip._udp."
105 #define SRV_UDP_PREFIX_LEN (sizeof(SRV_UDP_PREFIX) - 1)
106
107 #define SRV_TCP_PREFIX "_sip._tcp."
108 #define SRV_TCP_PREFIX_LEN (sizeof(SRV_TCP_PREFIX) - 1)
109
110 #define SRV_TLS_PREFIX "_sips._tcp."
111 #define SRV_TLS_PREFIX_LEN (sizeof(SRV_TLS_PREFIX) - 1)
112
113 #define SRV_MAX_PREFIX_LEN SRV_TLS_PREFIX_LEN
114
115 /*used only if PKG_MALLOC is defined*/
116 #define PKG_MEM_POOL_SIZE 1024*1024
117
118 /*used if SH_MEM is defined*/
119 #define SHM_MEM_SIZE 32
120
121 #define TIMER_TICK 1
122
123 /* dimensioning buckets in q_malloc */
124 /* size of the size2bucket table; everything beyond that asks for
125 a variable-size kilo-bucket
126 */
127 #define MAX_FIXED_BLOCK 3072
128 /* distance of kilo-buckets */
129 #define BLOCK_STEP 512
130 /* maximum number of possible buckets */
131 #define MAX_BUCKET 15
132
133 /* receive buffer size -- preferably set low to
134 avoid terror of excessively huge messages; they are
135 useless anyway
136 */
137 #define BUF_SIZE 65535
138
139 /* forwarding -- Via buffer dimensioning */
140 #define MAX_VIA_LINE_SIZE 240
141 #define MAX_RECEIVED_SIZE 57
142 #define MAX_RPORT_SIZE 13
143
144 /* maximum number of branches per transaction */
145 #define MAX_BRANCHES 12
146
147 /* maximum length of a FIFO server command */
148 #define MAX_FIFO_COMMAND 512
149
150 /* buffer dimensions for FIFO server */
151 #define MAX_CONSUME_BUFFER 1024
152 /* where reply pipes may be opened */
153 #define DEFAULT_FIFO_DIR "/tmp/"
154 /* max length of the text of fifo 'print' command */
155 #define MAX_PRINT_TEXT 256
156
157 /* maximum length of Contact header field in redirection replies */
158 #define MAX_REDIRECTION_LEN 512
159
160 /* used by FIFO statistics in module to terminate line;
161 extra whitespaces are used to overwrite remainders of
162 previous line if longer than current one
163 */
164 #define CLEANUP_EOL " \n"
165
166 /* how patient is ser with FIFO clients not awaiting a reply?
167 4 x 80ms = 0.32 sec
168 */
169 #define FIFO_REPLY_RETRIES 4
170 #define FIFO_REPLY_WAIT 80000
171
172 /* magic cookie for transaction matching as defined in RFC3261 */
173 #define MCOOKIE "z9hG4bK"
174 #define MCOOKIE_LEN (sizeof(MCOOKIE)-1)
175 /* Maximum length of values appended to Via-branch parameter */
0fe48ab - fixed the value of MAX_BRANCH_PARAM_LEN
miconda authored
176 #define MAX_BRANCH_PARAM_LEN (MCOOKIE_LEN+8 /*int2hex*/ + 1 /*sep*/ + \
177 MD5_LEN + 1 /*sep*/ + 8 /*int2hex*/ + \
178 1 /*extra space, needed by t_calc_branch*/)
ccaaa81 Initial revision
bogdan_iancu authored
179
180
181 /* maximum path length */
182 #define PATH_MAX_GUESS 1024
183
184 #define DEFAULT_DB_URL "mysql://openser:openserrw@localhost/openser"
185 #define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1)
186
187 #define DEFAULT_RODB_URL "mysql://openserro:openserro@localhost/openser"
188 #define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1)
189
190 /* table holding versions of other ser tables */
191 #define VERSION_TABLE "version"
192 #define VERSION_COLUMN "table_version"
193 #define TABLENAME_COLUMN "table_name"
194
195 /* minimum packet size; smaller packets will be dropped silently */
196 #define MIN_UDP_PACKET 32
197
198
ceafd5e -RADIUS AVP "SIP-AVP" may define all types of OpenSER AVPs (STRING/ID na...
bogdan_iancu authored
199 #define DEFAULT_RADIUSCLEINT_CONF \
200 "/usr/local/etc/radiusclient-ng/radiusclient.conf"
ccaaa81 Initial revision
bogdan_iancu authored
201
202 #endif
Something went wrong with that request. Please try again.