- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,221 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2001-2003 FhG Fokus |
|
3 |
- * |
|
4 |
- * This file is part of Kamailio, a free SIP server. |
|
5 |
- * |
|
6 |
- * Kamailio is free software; you can redistribute it and/or modify |
|
7 |
- * it under the terms of the GNU General Public License as published by |
|
8 |
- * the Free Software Foundation; either version 2 of the License, or |
|
9 |
- * (at your option) any later version |
|
10 |
- * |
|
11 |
- * Kamailio is distributed in the hope that it will be useful, |
|
12 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
- * GNU General Public License for more details. |
|
15 |
- * |
|
16 |
- * You should have received a copy of the GNU General Public License |
|
17 |
- * along with this program; if not, write to the Free Software |
|
18 |
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
19 |
- * |
|
20 |
- */ |
|
21 |
- |
|
22 |
-/*! |
|
23 |
- * \file |
|
24 |
- * \brief Kamailio core :: Configuration options |
|
25 |
- * \author jiri, andrei |
|
26 |
- * |
|
27 |
- * These settings are settable by the user before compilation |
|
28 |
- * |
|
29 |
- * \ingroup core |
|
30 |
- * Module: \ref core |
|
31 |
- */ |
|
32 |
- |
|
33 |
- |
|
34 |
- |
|
35 |
-#ifndef config_h |
|
36 |
-#define config_h |
|
37 |
- |
|
38 |
-#include "types.h" |
|
39 |
- |
|
40 |
-#define SIP_PORT 5060 /*!< default SIP port if none specified */ |
|
41 |
-#define SIPS_PORT 5061 /*!< default SIP port for TLS if none specified */ |
|
42 |
- |
|
43 |
-#define CFG_FILE CFG_DIR NAME ".cfg" |
|
44 |
- |
|
45 |
-#define TLS_PKEY_FILE "cert.pem" /*!< The certificate private key file */ |
|
46 |
-#define TLS_CERT_FILE "cert.pem" /*!< The certificate file */ |
|
47 |
-#define TLS_CA_FILE 0 /*!< no CA list file by default */ |
|
48 |
-#define TLS_CRL_FILE 0 /*!< no CRL by default */ |
|
49 |
- |
|
50 |
-#define MAX_LISTEN 16 /*!< maximum number of addresses on which we will listen */ |
|
51 |
- |
|
52 |
-#define CHILD_NO 8 /*!< default number of child processes started */ |
|
53 |
- |
|
54 |
-#define RT_NO 2 /*!< routing tables number */ |
|
55 |
-#define FAILURE_RT_NO RT_NO /*!< on_failure routing tables number */ |
|
56 |
-#define ONREPLY_RT_NO RT_NO /*!< on_reply routing tables number */ |
|
57 |
-#define BRANCH_RT_NO RT_NO /*!< branch_route routing tables number */ |
|
58 |
-#define ONSEND_RT_NO 1 /*!< onsend_route routing tables number */ |
|
59 |
-#define EVENT_RT_NO RT_NO /*!< event_route routing tables number */ |
|
60 |
-#define DEFAULT_RT 0 /*!< default routing table */ |
|
61 |
- |
|
62 |
-#define MAX_URI_SIZE 1024 /*!< Max URI size used when rewriting URIs */ |
|
63 |
- |
|
64 |
-#define MAX_PATH_SIZE 256 /*!< Maximum length of path header buffer */ |
|
65 |
- |
|
66 |
-#define MAX_INSTANCE_SIZE 256 /*!< Maximum length of +sip.instance contact header param value buffer */ |
|
67 |
- |
|
68 |
-#define MAX_RUID_SIZE 65 /*!< Maximum length of ruid for location records */ |
|
69 |
- |
|
70 |
-#define MAX_UA_SIZE 255 /*!< Maximum length of user-agent for location records */ |
|
71 |
- |
|
72 |
-#define MY_VIA "Via: SIP/2.0/UDP " |
|
73 |
-#define MY_VIA_LEN (sizeof(MY_VIA) - 1) |
|
74 |
- |
|
75 |
-#define ROUTE_PREFIX "Route: " |
|
76 |
-#define ROUTE_PREFIX_LEN (sizeof(ROUTE_PREFIX) - 1) |
|
77 |
- |
|
78 |
-#define ROUTE_SEPARATOR ", " |
|
79 |
-#define ROUTE_SEPARATOR_LEN (sizeof(ROUTE_SEPARATOR) - 1) |
|
80 |
- |
|
81 |
-#define CONTENT_LENGTH "Content-Length: " |
|
82 |
-#define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) |
|
83 |
- |
|
84 |
-#define USER_AGENT "User-Agent: " NAME \ |
|
85 |
- " (" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
86 |
-#define USER_AGENT_LEN (sizeof(USER_AGENT)-1) |
|
87 |
- |
|
88 |
-#define SERVER_HDR "Server: " NAME \ |
|
89 |
- " (" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
90 |
-#define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) |
|
91 |
- |
|
92 |
-#define MAX_WARNING_LEN 256 |
|
93 |
- |
|
94 |
-#define MY_BRANCH ";branch=" |
|
95 |
-#define MY_BRANCH_LEN (sizeof(MY_BRANCH) - 1) |
|
96 |
- |
|
97 |
-#define MAX_PORT_LEN 7 /* ':' + max 5 letters + \0 */ |
|
98 |
- |
|
99 |
-#define CRLF "\r\n" |
|
100 |
-#define CRLF_LEN (sizeof(CRLF) - 1) |
|
101 |
-#define CRLFCRLF "\r\n\r\n" |
|
102 |
-#define CRLFCRLF_LEN (sizeof(CRLFCRLF) - 1) |
|
103 |
- |
|
104 |
-#define RECEIVED ";received=" |
|
105 |
-#define RECEIVED_LEN (sizeof(RECEIVED) - 1) |
|
106 |
- |
|
107 |
-#define TRANSPORT_PARAM ";transport=" |
|
108 |
-#define TRANSPORT_PARAM_LEN (sizeof(TRANSPORT_PARAM) - 1) |
|
109 |
- |
|
110 |
-#define COMP_PARAM ";comp=" |
|
111 |
-#define COMP_PARAM_LEN (sizeof(COMP_PARAM)-1) |
|
112 |
- |
|
113 |
-#define SIGCOMP_NAME "sigcomp" |
|
114 |
-#define SIGCOMP_NAME_LEN (sizeof(SIGCOMP_NAME)-1) |
|
115 |
- |
|
116 |
-#define SERGZ_NAME "sergz" |
|
117 |
-#define SERGZ_NAME_LEN (sizeof(SERGZ_NAME)-1) |
|
118 |
- |
|
119 |
-#define TOTAG_TOKEN ";tag=" |
|
120 |
-#define TOTAG_TOKEN_LEN (sizeof(TOTAG_TOKEN)-1) |
|
121 |
- |
|
122 |
-#define RPORT ";rport=" |
|
123 |
-#define RPORT_LEN (sizeof(RPORT) - 1) |
|
124 |
- |
|
125 |
-#define ID_PARAM ";i=" |
|
126 |
-#define ID_PARAM_LEN (sizeof(ID_PARAM) - 1) |
|
127 |
- |
|
128 |
-#define SRV_UDP_PREFIX "_sip._udp." |
|
129 |
-#define SRV_UDP_PREFIX_LEN (sizeof(SRV_UDP_PREFIX) - 1) |
|
130 |
- |
|
131 |
-#define SRV_TCP_PREFIX "_sip._tcp." |
|
132 |
-#define SRV_TCP_PREFIX_LEN (sizeof(SRV_TCP_PREFIX) - 1) |
|
133 |
- |
|
134 |
-#define SRV_TLS_PREFIX "_sips._tcp." |
|
135 |
-#define SRV_TLS_PREFIX_LEN (sizeof(SRV_TLS_PREFIX) - 1) |
|
136 |
- |
|
137 |
-#define SRV_SCTP_PREFIX "_sip._sctp." |
|
138 |
-#define SRV_SCTP_PREFIX_LEN (sizeof(SRV_SCTP_PREFIX) - 1) |
|
139 |
- |
|
140 |
-#define SRV_MAX_PREFIX_LEN SRV_TLS_PREFIX_LEN |
|
141 |
- |
|
142 |
-#ifndef PKG_MEM_SIZE |
|
143 |
-#define PKG_MEM_SIZE 8 |
|
144 |
-#endif |
|
145 |
-#define PKG_MEM_POOL_SIZE PKG_MEM_SIZE*1024*1024 /*!< used only if PKG_MALLOC is defined*/ |
|
146 |
- |
|
147 |
-#define SHM_MEM_SIZE 64 /*!< used if SH_MEM is defined*/ |
|
148 |
-#define SHM_MEM_POOL_SIZE SHM_MEM_SIZE*1024*1024 |
|
149 |
- |
|
150 |
-/* dimensioning buckets in q_malloc */ |
|
151 |
-/*! \brief size of the size2bucket table; everything beyond that asks for |
|
152 |
- a variable-size kilo-bucket |
|
153 |
- */ |
|
154 |
-#define MAX_FIXED_BLOCK 3072 |
|
155 |
-#define BLOCK_STEP 512 /*!< distance of kilo-buckets */ |
|
156 |
-#define MAX_BUCKET 15 /*!< maximum number of possible buckets */ |
|
157 |
- |
|
158 |
-/*! \brief receive buffer size -- preferably set low to |
|
159 |
- avoid terror of excessively huge messages; they are |
|
160 |
- useless anyway |
|
161 |
-*/ |
|
162 |
-#define BUF_SIZE 65535 |
|
163 |
- |
|
164 |
-#define MAX_VIA_LINE_SIZE 240 /*!< forwarding -- Via buffer dimensioning */ |
|
165 |
-#define MAX_RECEIVED_SIZE 59 /*!< forwarding -- Via buffer dimensioning - Received header */ |
|
166 |
-#define MAX_RPORT_SIZE 13 /*!< forwarding -- Via buffer dimensioning - Rport */ |
|
167 |
- |
|
168 |
-#define MAX_BRANCHES_DEFAULT 12 /*!< default maximum number of branches per transaction */ |
|
169 |
-#define MAX_BRANCHES_LIMIT 32 /*!< limit of maximum number of branches per transaction */ |
|
170 |
- |
|
171 |
-#define MAX_PRINT_TEXT 256 /*!< max length of the text of fifo 'print' command */ |
|
172 |
- |
|
173 |
-#define MAX_REDIRECTION_LEN 512 /*!< maximum length of Contact header field in redirection replies */ |
|
174 |
- |
|
175 |
-/*! \brief used by FIFO statistics in module to terminate line; |
|
176 |
- extra whitespaces are used to overwrite remainders of |
|
177 |
- previous line if longer than current one |
|
178 |
-*/ |
|
179 |
-#define CLEANUP_EOL " \n" |
|
180 |
- |
|
181 |
-#define MCOOKIE "z9hG4bK" /*!< magic cookie for transaction matching as defined in RFC3261 */ |
|
182 |
-#define MCOOKIE_LEN (sizeof(MCOOKIE)-1) |
|
183 |
-/*! \brief Maximum length of values appended to Via-branch parameter */ |
|
184 |
-#define MAX_BRANCH_PARAM_LEN (MCOOKIE_LEN+8 /*int2hex*/ + 1 /*sep*/ + \ |
|
185 |
- MD5_LEN /* max(int2hex, MD5_LEN) */ \ |
|
186 |
- + 1 /*sep*/ + 8 /*int2hex*/ + \ |
|
187 |
- 1 /*extra space, needed by t_calc_branch*/) |
|
188 |
- |
|
189 |
-#define DEFAULT_SER_KILL_TIMEOUT 60 /*!< Kill timeout : seconds */ |
|
190 |
- |
|
191 |
-#define PATH_MAX_GUESS 1024 /*!< maximum path length */ |
|
192 |
- |
|
193 |
-#if defined KAMAILIO_MOD_INTERFACE || defined OPENSER_MOD_INTERFACE || \ |
|
194 |
- defined MOD_INTERFACE_V1 |
|
195 |
- #define DEFAULT_DB_URL "mysql://kamailio:kamailiorw@localhost/kamailio" |
|
196 |
- #define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
|
197 |
- #define DEFAULT_RODB_URL "mysql://kamailioro:kamailioro@localhost/kamailio" |
|
198 |
- #define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
|
199 |
-#else |
|
200 |
- #define DEFAULT_DB_URL "mysql://ser:heslo@localhost/ser" |
|
201 |
- #define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
|
202 |
- #define DEFAULT_RODB_URL "mysql://serro:47serro11@localhost/ser" |
|
203 |
- #define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
|
204 |
-#endif |
|
205 |
- |
|
206 |
-#define VERSION_TABLE "version" /*!< table holding versions of other ser tables */ |
|
207 |
-#define VERSION_TABLE_LEN (sizeof(VERSION_TABLE) - 1) |
|
208 |
-#define VERSION_COLUMN "table_version" /*!< Column holding version number in version table */ |
|
209 |
-#define TABLENAME_COLUMN "table_name" /*!< Column holding module name in version table */ |
|
210 |
- |
|
211 |
-#define MIN_UDP_PACKET 32 /*!< minimum UDP packet size; smaller packets will be dropped silently */ |
|
212 |
- |
|
213 |
-#define MIN_SCTP_PACKET MIN_UDP_PACKET /*!< minimum size of SCTP packet */ |
|
214 |
- |
|
215 |
-#define DEFAULT_RADIUS_CONFIG "/usr/local/etc/radiusclient/radiusclient.conf" /*!< Default FreeRadius configuration file */ |
|
216 |
- |
|
217 |
-#define DEFAULT_DID "_default" |
|
218 |
- |
|
219 |
-#define DEFAULT_MAX_WHILE_LOOPS 100 /*!< Maximum allowed iterations for a while (to catch runaways) */ |
|
220 |
- |
|
221 |
-#endif |
- used in pinging over tcp, makes it more coherent to use
... | ... |
@@ -90,13 +90,16 @@ |
90 | 90 |
#define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) |
91 | 91 |
|
92 | 92 |
#define MAX_WARNING_LEN 256 |
93 |
- |
|
93 |
+ |
|
94 | 94 |
#define MY_BRANCH ";branch=" |
95 | 95 |
#define MY_BRANCH_LEN (sizeof(MY_BRANCH) - 1) |
96 | 96 |
|
97 | 97 |
#define MAX_PORT_LEN 7 /* ':' + max 5 letters + \0 */ |
98 |
+ |
|
98 | 99 |
#define CRLF "\r\n" |
99 | 100 |
#define CRLF_LEN (sizeof(CRLF) - 1) |
101 |
+#define CRLFCRLF "\r\n\r\n" |
|
102 |
+#define CRLFCRLF_LEN (sizeof(CRLFCRLF) - 1) |
|
100 | 103 |
|
101 | 104 |
#define RECEIVED ";received=" |
102 | 105 |
#define RECEIVED_LEN (sizeof(RECEIVED) - 1) |
... | ... |
@@ -142,7 +142,7 @@ |
142 | 142 |
#define PKG_MEM_POOL_SIZE PKG_MEM_SIZE*1024*1024 /*!< used only if PKG_MALLOC is defined*/ |
143 | 143 |
|
144 | 144 |
#define SHM_MEM_SIZE 64 /*!< used if SH_MEM is defined*/ |
145 |
- |
|
145 |
+#define SHM_MEM_POOL_SIZE SHM_MEM_SIZE*1024*1024 |
|
146 | 146 |
|
147 | 147 |
/* dimensioning buckets in q_malloc */ |
148 | 148 |
/*! \brief size of the size2bucket table; everything beyond that asks for |
... | ... |
@@ -1,16 +1,14 @@ |
1 | 1 |
/* |
2 |
- * $Id$ |
|
3 |
- * |
|
4 | 2 |
* Copyright (C) 2001-2003 FhG Fokus |
5 | 3 |
* |
6 |
- * This file is part of SIP-router, a free SIP server. |
|
4 |
+ * This file is part of Kamailio, a free SIP server. |
|
7 | 5 |
* |
8 |
- * SIP-router is free software; you can redistribute it and/or modify |
|
6 |
+ * Kamailio is free software; you can redistribute it and/or modify |
|
9 | 7 |
* it under the terms of the GNU General Public License as published by |
10 | 8 |
* the Free Software Foundation; either version 2 of the License, or |
11 | 9 |
* (at your option) any later version |
12 | 10 |
* |
13 |
- * SIP-router is distributed in the hope that it will be useful, |
|
11 |
+ * Kamailio is distributed in the hope that it will be useful, |
|
14 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | 14 |
* GNU General Public License for more details. |
... | ... |
@@ -19,17 +17,12 @@ |
19 | 17 |
* along with this program; if not, write to the Free Software |
20 | 18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21 | 19 |
* |
22 |
- * History: |
|
23 |
- * -------- |
|
24 |
- * 2003-04-05 DEFAULT_*_URL introduced (jiri) |
|
25 |
- * 2003-07-04 fixed SRV lookup prefix for TLS/sips (andrei) |
|
26 |
- * 2005-04-25 MAX_BRANCH_PARAM_LEN too small, fixed (andrei) |
|
27 |
- * |
|
28 | 20 |
*/ |
29 | 21 |
|
30 | 22 |
/*! |
31 | 23 |
* \file |
32 | 24 |
* \brief SIP-router core :: Configuration options |
25 |
+ * \author jiri, andrei |
|
33 | 26 |
* |
34 | 27 |
* These settings are settable by the user before compilation |
35 | 28 |
* |
- the maximum number of uac branches can be set via config
- default value is 12 (old static value for MAX_BRNACHES)
- the upper limit is 31, it has to be at least 1
- example:
max_branches=16
... | ... |
@@ -169,7 +169,8 @@ |
169 | 169 |
#define MAX_RECEIVED_SIZE 59 /*!< forwarding -- Via buffer dimensioning - Received header */ |
170 | 170 |
#define MAX_RPORT_SIZE 13 /*!< forwarding -- Via buffer dimensioning - Rport */ |
171 | 171 |
|
172 |
-#define MAX_BRANCHES 12 /*!< maximum number of branches per transaction */ |
|
172 |
+#define MAX_BRANCHES_DEFAULT 12 /*!< default maximum number of branches per transaction */ |
|
173 |
+#define MAX_BRANCHES_LIMIT 32 /*!< limit of maximum number of branches per transaction */ |
|
173 | 174 |
|
174 | 175 |
#define MAX_PRINT_TEXT 256 /*!< max length of the text of fifo 'print' command */ |
175 | 176 |
|
- decent size at least for 64b architecture where pointer overhead is
bigger
... | ... |
@@ -148,7 +148,7 @@ |
148 | 148 |
#endif |
149 | 149 |
#define PKG_MEM_POOL_SIZE PKG_MEM_SIZE*1024*1024 /*!< used only if PKG_MALLOC is defined*/ |
150 | 150 |
|
151 |
-#define SHM_MEM_SIZE 32 /*!< used if SH_MEM is defined*/ |
|
151 |
+#define SHM_MEM_SIZE 64 /*!< used if SH_MEM is defined*/ |
|
152 | 152 |
|
153 | 153 |
|
154 | 154 |
/* dimensioning buckets in q_malloc */ |
- helper function to generate similar value
... | ... |
@@ -166,7 +166,7 @@ |
166 | 166 |
#define BUF_SIZE 65535 |
167 | 167 |
|
168 | 168 |
#define MAX_VIA_LINE_SIZE 240 /*!< forwarding -- Via buffer dimensioning */ |
169 |
-#define MAX_RECEIVED_SIZE 57 /*!< forwarding -- Via buffer dimensioning - Received header */ |
|
169 |
+#define MAX_RECEIVED_SIZE 59 /*!< forwarding -- Via buffer dimensioning - Received header */ |
|
170 | 170 |
#define MAX_RPORT_SIZE 13 /*!< forwarding -- Via buffer dimensioning - Rport */ |
171 | 171 |
|
172 | 172 |
#define MAX_BRANCHES 12 /*!< maximum number of branches per transaction */ |
- as per discussion on mailing lists
... | ... |
@@ -17,7 +17,7 @@ |
17 | 17 |
* |
18 | 18 |
* You should have received a copy of the GNU General Public License |
19 | 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 |
|
20 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
21 | 21 |
* |
22 | 22 |
* History: |
23 | 23 |
* -------- |
- replace define ROUTE_MAX_REC_LEV with config paramter
- number of allowed recusive levels can be set in config now
- it affects calls of route blocks and chained if { ... } else if { ...
} else ...
... | ... |
@@ -66,9 +66,6 @@ |
66 | 66 |
#define EVENT_RT_NO RT_NO /*!< event_route routing tables number */ |
67 | 67 |
#define DEFAULT_RT 0 /*!< default routing table */ |
68 | 68 |
|
69 |
-#define MAX_REC_LEV 100 /*!< maximum number of recursive calls */ |
|
70 |
-#define ROUTE_MAX_REC_LEV 100 /*!< maximum number of recursive calls for route()*/ |
|
71 |
- |
|
72 | 69 |
#define MAX_URI_SIZE 1024 /*!< Max URI size used when rewriting URIs */ |
73 | 70 |
|
74 | 71 |
#define MAX_PATH_SIZE 256 /*!< Maximum length of path header buffer */ |
... | ... |
@@ -77,6 +77,8 @@ |
77 | 77 |
|
78 | 78 |
#define MAX_RUID_SIZE 65 /*!< Maximum length of ruid for location records */ |
79 | 79 |
|
80 |
+#define MAX_UA_SIZE 255 /*!< Maximum length of user-agent for location records */ |
|
81 |
+ |
|
80 | 82 |
#define MY_VIA "Via: SIP/2.0/UDP " |
81 | 83 |
#define MY_VIA_LEN (sizeof(MY_VIA) - 1) |
82 | 84 |
|
... | ... |
@@ -198,7 +198,7 @@ |
198 | 198 |
defined MOD_INTERFACE_V1 |
199 | 199 |
#define DEFAULT_DB_URL "mysql://kamailio:kamailiorw@localhost/kamailio" |
200 | 200 |
#define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
201 |
- #define DEFAULT_RODB_URL "mysql://kamailio:kamailiorw@localhost/okamailio" |
|
201 |
+ #define DEFAULT_RODB_URL "mysql://kamailioro:kamailioro@localhost/kamailio" |
|
202 | 202 |
#define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
203 | 203 |
#else |
204 | 204 |
#define DEFAULT_DB_URL "mysql://ser:heslo@localhost/ser" |
... | ... |
@@ -75,6 +75,8 @@ |
75 | 75 |
|
76 | 76 |
#define MAX_INSTANCE_SIZE 256 /*!< Maximum length of +sip.instance contact header param value buffer */ |
77 | 77 |
|
78 |
+#define MAX_RUID_SIZE 65 /*!< Maximum length of ruid for location records */ |
|
79 |
+ |
|
78 | 80 |
#define MY_VIA "Via: SIP/2.0/UDP " |
79 | 81 |
#define MY_VIA_LEN (sizeof(MY_VIA) - 1) |
80 | 82 |
|
When kamailio is part of a bigger project and is sharing its database with
it, it is nice to have a less generic table name than "version".
Also usefull when upgrading kamailio, where the new version has (backwards
compatibel) changes in the database definition. If each kamailio version uses
its own version table, they can all use the same database.
... | ... |
@@ -206,6 +206,7 @@ |
206 | 206 |
#endif |
207 | 207 |
|
208 | 208 |
#define VERSION_TABLE "version" /*!< table holding versions of other ser tables */ |
209 |
+#define VERSION_TABLE_LEN (sizeof(VERSION_TABLE) - 1) |
|
209 | 210 |
#define VERSION_COLUMN "table_version" /*!< Column holding version number in version table */ |
210 | 211 |
#define TABLENAME_COLUMN "table_name" /*!< Column holding module name in version table */ |
211 | 212 |
|
- they were changed by accident by previous commit
... | ... |
@@ -87,11 +87,11 @@ |
87 | 87 |
#define CONTENT_LENGTH "Content-Length: " |
88 | 88 |
#define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) |
89 | 89 |
|
90 |
-#define USER_AGENT "User-Agent: OpenXg SIP Proxy "\ |
|
90 |
+#define USER_AGENT "User-Agent: " NAME \ |
|
91 | 91 |
" (" VERSION " (" ARCH "/" OS_QUOTED "))" |
92 | 92 |
#define USER_AGENT_LEN (sizeof(USER_AGENT)-1) |
93 | 93 |
|
94 |
-#define SERVER_HDR "Server: OpenXg SIP Proxy "\ |
|
94 |
+#define SERVER_HDR "Server: " NAME \ |
|
95 | 95 |
" (" VERSION " (" ARCH "/" OS_QUOTED "))" |
96 | 96 |
#define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) |
97 | 97 |
|
- added instance and reg_id fields to branch_t
- added instance and reg_id arguments to append_branch function
- modified append_branch calls in core and several modules
- did not touch obsolete or modules_s modules (which are to be
removed from next release)
... | ... |
@@ -73,6 +73,8 @@ |
73 | 73 |
|
74 | 74 |
#define MAX_PATH_SIZE 256 /*!< Maximum length of path header buffer */ |
75 | 75 |
|
76 |
+#define MAX_INSTANCE_SIZE 256 /*!< Maximum length of +sip.instance contact header param value buffer */ |
|
77 |
+ |
|
76 | 78 |
#define MY_VIA "Via: SIP/2.0/UDP " |
77 | 79 |
#define MY_VIA_LEN (sizeof(MY_VIA) - 1) |
78 | 80 |
|
... | ... |
@@ -85,11 +87,11 @@ |
85 | 87 |
#define CONTENT_LENGTH "Content-Length: " |
86 | 88 |
#define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) |
87 | 89 |
|
88 |
-#define USER_AGENT "User-Agent: " NAME \ |
|
90 |
+#define USER_AGENT "User-Agent: OpenXg SIP Proxy "\ |
|
89 | 91 |
" (" VERSION " (" ARCH "/" OS_QUOTED "))" |
90 | 92 |
#define USER_AGENT_LEN (sizeof(USER_AGENT)-1) |
91 | 93 |
|
92 |
-#define SERVER_HDR "Server: " NAME \ |
|
94 |
+#define SERVER_HDR "Server: OpenXg SIP Proxy "\ |
|
93 | 95 |
" (" VERSION " (" ARCH "/" OS_QUOTED "))" |
94 | 96 |
#define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) |
95 | 97 |
|
... | ... |
@@ -192,9 +192,9 @@ |
192 | 192 |
|
193 | 193 |
#if defined KAMAILIO_MOD_INTERFACE || defined OPENSER_MOD_INTERFACE || \ |
194 | 194 |
defined MOD_INTERFACE_V1 |
195 |
- #define DEFAULT_DB_URL "mysql://openser:openserrw@localhost/openser" |
|
195 |
+ #define DEFAULT_DB_URL "mysql://kamailio:kamailiorw@localhost/kamailio" |
|
196 | 196 |
#define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
197 |
- #define DEFAULT_RODB_URL "mysql://openserro:openserro@localhost/openser" |
|
197 |
+ #define DEFAULT_RODB_URL "mysql://kamailio:kamailiorw@localhost/okamailio" |
|
198 | 198 |
#define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
199 | 199 |
#else |
200 | 200 |
#define DEFAULT_DB_URL "mysql://ser:heslo@localhost/ser" |
- OPENSER_MOD_INTERFACE still works if used in module Makefile
... | ... |
@@ -190,7 +190,8 @@ |
190 | 190 |
|
191 | 191 |
#define PATH_MAX_GUESS 1024 /*!< maximum path length */ |
192 | 192 |
|
193 |
-#ifdef OPENSER_MOD_INTERFACE |
|
193 |
+#if defined KAMAILIO_MOD_INTERFACE || defined OPENSER_MOD_INTERFACE || \ |
|
194 |
+ defined MOD_INTERFACE_V1 |
|
194 | 195 |
#define DEFAULT_DB_URL "mysql://openser:openserrw@localhost/openser" |
195 | 196 |
#define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
196 | 197 |
#define DEFAULT_RODB_URL "mysql://openserro:openserro@localhost/openser" |
Support for certificate revocation lists.
Patch by Couprie Geoffroy geoffroy.couprie atosorigin com
(FS#88) ported to 3.1 (config framework, relative pathname support)
and with more docs.
Closes FS#88.
... | ... |
@@ -52,7 +52,7 @@ |
52 | 52 |
#define TLS_PKEY_FILE "cert.pem" /*!< The certificate private key file */ |
53 | 53 |
#define TLS_CERT_FILE "cert.pem" /*!< The certificate file */ |
54 | 54 |
#define TLS_CA_FILE 0 /*!< no CA list file by default */ |
55 |
- |
|
55 |
+#define TLS_CRL_FILE 0 /*!< no CRL by default */ |
|
56 | 56 |
|
57 | 57 |
#define MAX_LISTEN 16 /*!< maximum number of addresses on which we will listen */ |
58 | 58 |
|
- new makefile option PKG_MEM_SIZE that can be used to specify the size
in MB for PKG memory, e.g., make PKG_MEM_SIZE=8 cfg
- easier way to set the pkg size without messing with c code and defines
in config.h
- pkg size is printed by -V command line option
... | ... |
@@ -140,7 +140,10 @@ |
140 | 140 |
|
141 | 141 |
#define SRV_MAX_PREFIX_LEN SRV_TLS_PREFIX_LEN |
142 | 142 |
|
143 |
-#define PKG_MEM_POOL_SIZE 4*1024*1024 /*!< used only if PKG_MALLOC is defined*/ |
|
143 |
+#ifndef PKG_MEM_SIZE |
|
144 |
+#define PKG_MEM_SIZE 4 |
|
145 |
+#endif |
|
146 |
+#define PKG_MEM_POOL_SIZE PKG_MEM_SIZE*1024*1024 /*!< used only if PKG_MALLOC is defined*/ |
|
144 | 147 |
|
145 | 148 |
#define SHM_MEM_SIZE 32 /*!< used if SH_MEM is defined*/ |
146 | 149 |
|
latest sr_3.0 fixes, after kamailio 3.0 release.
* origin/sr_3.0: (58 commits)
Backport of the changes (see previous commits).
kex: documented missing functions
kex: aliased avp_printf to pv_printf
auth_diameter(k): remove redundant declaration of find_credentials, now in core
- fix bug in encode_contact()
- fix bug when RURI was changed before and newuri will be used
- remove unused code
modules_k/nathelper: removed garbage from documentation (credits to Klaus)
modules_k/nathelper: improved handle_ruri_alias() documentation
modules/lcr and modules_k/nathelper: fixed compiler warnings
modules_k/nathelper: handle_uri_alias() alias handling fix
modules_k/usrloc: changed 'Kamailio' to 'SIP Router' in user agent string.
tm: safer handling for local transactions and drop_replies!=0
sctp: stats: don't increment ASSOC_SHUTDOWN on COMM_LOST
sctp: SCTP_STATS_ASSOC_SHUTDOWN
tm doc: local_ack_mode documentation
tm: new param: local_ack_mode
makefile: fix make bin & basedir
core: fix parsing for avps with the same name as a pv class
tls: name the certificates based on $MAIN_NAME
...
Conflicts:
modules/tm/README
modules_k/nathelper/rtpproxy_stream.c
pkg/debian/rules
... | ... |
@@ -85,12 +85,12 @@ |
85 | 85 |
#define CONTENT_LENGTH "Content-Length: " |
86 | 86 |
#define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) |
87 | 87 |
|
88 |
-#define USER_AGENT "User-Agent: SIP Router "\ |
|
89 |
- "(" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
88 |
+#define USER_AGENT "User-Agent: " NAME \ |
|
89 |
+ " (" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
90 | 90 |
#define USER_AGENT_LEN (sizeof(USER_AGENT)-1) |
91 | 91 |
|
92 |
-#define SERVER_HDR "Server: SIP Router "\ |
|
93 |
- "(" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
92 |
+#define SERVER_HDR "Server: " NAME \ |
|
93 |
+ " (" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
94 | 94 |
#define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) |
95 | 95 |
|
96 | 96 |
#define MAX_WARNING_LEN 256 |
... | ... |
@@ -3,19 +3,14 @@ |
3 | 3 |
* |
4 | 4 |
* Copyright (C) 2001-2003 FhG Fokus |
5 | 5 |
* |
6 |
- * This file is part of ser, a free SIP server. |
|
6 |
+ * This file is part of SIP-router, a free SIP server. |
|
7 | 7 |
* |
8 |
- * ser is free software; you can redistribute it and/or modify |
|
8 |
+ * SIP-router is free software; you can redistribute it and/or modify |
|
9 | 9 |
* it under the terms of the GNU General Public License as published by |
10 | 10 |
* the Free Software Foundation; either version 2 of the License, or |
11 | 11 |
* (at your option) any later version |
12 | 12 |
* |
13 |
- * For a license to use the ser software under conditions |
|
14 |
- * other than those described here, or to purchase support for this |
|
15 |
- * software, please contact iptel.org by e-mail at the following addresses: |
|
16 |
- * info@iptel.org |
|
17 |
- * |
|
18 |
- * ser is distributed in the hope that it will be useful, |
|
13 |
+ * SIP-router is distributed in the hope that it will be useful, |
|
19 | 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | 16 |
* GNU General Public License for more details. |
... | ... |
@@ -32,6 +27,15 @@ |
32 | 27 |
* |
33 | 28 |
*/ |
34 | 29 |
|
30 |
+/*! |
|
31 |
+ * \file |
|
32 |
+ * \brief SIP-router core :: Configuration options |
|
33 |
+ * |
|
34 |
+ * These settings are settable by the user before compilation |
|
35 |
+ * |
|
36 |
+ * \ingroup core |
|
37 |
+ * Module: \ref core |
|
38 |
+ */ |
|
35 | 39 |
|
36 | 40 |
|
37 | 41 |
|
... | ... |
@@ -40,38 +44,34 @@ |
40 | 44 |
|
41 | 45 |
#include "types.h" |
42 | 46 |
|
43 |
-/* default sip port if none specified */ |
|
44 |
-#define SIP_PORT 5060 |
|
45 |
-#define SIPS_PORT 5061 |
|
47 |
+#define SIP_PORT 5060 /*!< default SIP port if none specified */ |
|
48 |
+#define SIPS_PORT 5061 /*!< default SIP port for TLS if none specified */ |
|
46 | 49 |
|
47 | 50 |
#define CFG_FILE CFG_DIR NAME ".cfg" |
48 | 51 |
|
49 |
-#define TLS_PKEY_FILE "cert.pem" |
|
50 |
-#define TLS_CERT_FILE "cert.pem" |
|
51 |
-#define TLS_CA_FILE 0 /* no CA list file by default */ |
|
52 |
+#define TLS_PKEY_FILE "cert.pem" /*!< The certificate private key file */ |
|
53 |
+#define TLS_CERT_FILE "cert.pem" /*!< The certificate file */ |
|
54 |
+#define TLS_CA_FILE 0 /*!< no CA list file by default */ |
|
52 | 55 |
|
53 | 56 |
|
54 |
-/* maximum number of addresses on which we will listen */ |
|
55 |
-#define MAX_LISTEN 16 |
|
57 |
+#define MAX_LISTEN 16 /*!< maximum number of addresses on which we will listen */ |
|
56 | 58 |
|
57 |
-/* default number of child processes started */ |
|
58 |
-#define CHILD_NO 8 |
|
59 |
+#define CHILD_NO 8 /*!< default number of child processes started */ |
|
59 | 60 |
|
60 |
-#define RT_NO 2 /* routing tables number */ |
|
61 |
-#define FAILURE_RT_NO RT_NO /* on_failure routing tables number */ |
|
62 |
-#define ONREPLY_RT_NO RT_NO /* on_reply routing tables number */ |
|
63 |
-#define BRANCH_RT_NO RT_NO /* branch_route routing tables number */ |
|
64 |
-#define ONSEND_RT_NO 1 /* onsend_route routing tables number */ |
|
65 |
-#define EVENT_RT_NO RT_NO /* event_route routing tables number */ |
|
66 |
-#define DEFAULT_RT 0 /* default routing table */ |
|
61 |
+#define RT_NO 2 /*!< routing tables number */ |
|
62 |
+#define FAILURE_RT_NO RT_NO /*!< on_failure routing tables number */ |
|
63 |
+#define ONREPLY_RT_NO RT_NO /*!< on_reply routing tables number */ |
|
64 |
+#define BRANCH_RT_NO RT_NO /*!< branch_route routing tables number */ |
|
65 |
+#define ONSEND_RT_NO 1 /*!< onsend_route routing tables number */ |
|
66 |
+#define EVENT_RT_NO RT_NO /*!< event_route routing tables number */ |
|
67 |
+#define DEFAULT_RT 0 /*!< default routing table */ |
|
67 | 68 |
|
68 |
-#define MAX_REC_LEV 100 /* maximum number of recursive calls */ |
|
69 |
-#define ROUTE_MAX_REC_LEV 100 /* maximum number of recursive calls |
|
70 |
- for route()*/ |
|
69 |
+#define MAX_REC_LEV 100 /*!< maximum number of recursive calls */ |
|
70 |
+#define ROUTE_MAX_REC_LEV 100 /*!< maximum number of recursive calls for route()*/ |
|
71 | 71 |
|
72 |
-#define MAX_URI_SIZE 1024 /* used when rewriting URIs */ |
|
72 |
+#define MAX_URI_SIZE 1024 /*!< Max URI size used when rewriting URIs */ |
|
73 | 73 |
|
74 |
-#define MAX_PATH_SIZE 256 /* Maximum length of path header buffer */ |
|
74 |
+#define MAX_PATH_SIZE 256 /*!< Maximum length of path header buffer */ |
|
75 | 75 |
|
76 | 76 |
#define MY_VIA "Via: SIP/2.0/UDP " |
77 | 77 |
#define MY_VIA_LEN (sizeof(MY_VIA) - 1) |
... | ... |
@@ -140,62 +140,52 @@ |
140 | 140 |
|
141 | 141 |
#define SRV_MAX_PREFIX_LEN SRV_TLS_PREFIX_LEN |
142 | 142 |
|
143 |
-/*used only if PKG_MALLOC is defined*/ |
|
144 |
-#define PKG_MEM_POOL_SIZE 4*1024*1024 |
|
143 |
+#define PKG_MEM_POOL_SIZE 4*1024*1024 /*!< used only if PKG_MALLOC is defined*/ |
|
145 | 144 |
|
146 |
-/*used if SH_MEM is defined*/ |
|
147 |
-#define SHM_MEM_SIZE 32 |
|
145 |
+#define SHM_MEM_SIZE 32 /*!< used if SH_MEM is defined*/ |
|
148 | 146 |
|
149 | 147 |
|
150 | 148 |
/* dimensioning buckets in q_malloc */ |
151 |
-/* size of the size2bucket table; everything beyond that asks for |
|
149 |
+/*! \brief size of the size2bucket table; everything beyond that asks for |
|
152 | 150 |
a variable-size kilo-bucket |
153 | 151 |
*/ |
154 | 152 |
#define MAX_FIXED_BLOCK 3072 |
155 |
-/* distance of kilo-buckets */ |
|
156 |
-#define BLOCK_STEP 512 |
|
157 |
-/* maximum number of possible buckets */ |
|
158 |
-#define MAX_BUCKET 15 |
|
153 |
+#define BLOCK_STEP 512 /*!< distance of kilo-buckets */ |
|
154 |
+#define MAX_BUCKET 15 /*!< maximum number of possible buckets */ |
|
159 | 155 |
|
160 |
-/* receive buffer size -- preferably set low to |
|
156 |
+/*! \brief receive buffer size -- preferably set low to |
|
161 | 157 |
avoid terror of excessively huge messages; they are |
162 | 158 |
useless anyway |
163 | 159 |
*/ |
164 | 160 |
#define BUF_SIZE 65535 |
165 | 161 |
|
166 |
-/* forwarding -- Via buffer dimensioning */ |
|
167 |
-#define MAX_VIA_LINE_SIZE 240 |
|
168 |
-#define MAX_RECEIVED_SIZE 57 |
|
169 |
-#define MAX_RPORT_SIZE 13 |
|
162 |
+#define MAX_VIA_LINE_SIZE 240 /*!< forwarding -- Via buffer dimensioning */ |
|
163 |
+#define MAX_RECEIVED_SIZE 57 /*!< forwarding -- Via buffer dimensioning - Received header */ |
|
164 |
+#define MAX_RPORT_SIZE 13 /*!< forwarding -- Via buffer dimensioning - Rport */ |
|
170 | 165 |
|
171 |
-/* maximum number of branches per transaction */ |
|
172 |
-#define MAX_BRANCHES 12 |
|
166 |
+#define MAX_BRANCHES 12 /*!< maximum number of branches per transaction */ |
|
173 | 167 |
|
174 |
-/* max length of the text of fifo 'print' command */ |
|
175 |
-#define MAX_PRINT_TEXT 256 |
|
168 |
+#define MAX_PRINT_TEXT 256 /*!< max length of the text of fifo 'print' command */ |
|
176 | 169 |
|
177 |
-/* maximum length of Contact header field in redirection replies */ |
|
178 |
-#define MAX_REDIRECTION_LEN 512 |
|
170 |
+#define MAX_REDIRECTION_LEN 512 /*!< maximum length of Contact header field in redirection replies */ |
|
179 | 171 |
|
180 |
-/* used by FIFO statistics in module to terminate line; |
|
172 |
+/*! \brief used by FIFO statistics in module to terminate line; |
|
181 | 173 |
extra whitespaces are used to overwrite remainders of |
182 | 174 |
previous line if longer than current one |
183 | 175 |
*/ |
184 | 176 |
#define CLEANUP_EOL " \n" |
185 | 177 |
|
186 |
-/* magic cookie for transaction matching as defined in RFC3261 */ |
|
187 |
-#define MCOOKIE "z9hG4bK" |
|
178 |
+#define MCOOKIE "z9hG4bK" /*!< magic cookie for transaction matching as defined in RFC3261 */ |
|
188 | 179 |
#define MCOOKIE_LEN (sizeof(MCOOKIE)-1) |
189 |
-/* Maximum length of values appended to Via-branch parameter */ |
|
180 |
+/*! \brief Maximum length of values appended to Via-branch parameter */ |
|
190 | 181 |
#define MAX_BRANCH_PARAM_LEN (MCOOKIE_LEN+8 /*int2hex*/ + 1 /*sep*/ + \ |
191 | 182 |
MD5_LEN /* max(int2hex, MD5_LEN) */ \ |
192 | 183 |
+ 1 /*sep*/ + 8 /*int2hex*/ + \ |
193 | 184 |
1 /*extra space, needed by t_calc_branch*/) |
194 | 185 |
|
195 |
-#define DEFAULT_SER_KILL_TIMEOUT 60 /* seconds */ |
|
186 |
+#define DEFAULT_SER_KILL_TIMEOUT 60 /*!< Kill timeout : seconds */ |
|
196 | 187 |
|
197 |
-/* maximum path length */ |
|
198 |
-#define PATH_MAX_GUESS 1024 |
|
188 |
+#define PATH_MAX_GUESS 1024 /*!< maximum path length */ |
|
199 | 189 |
|
200 | 190 |
#ifdef OPENSER_MOD_INTERFACE |
201 | 191 |
#define DEFAULT_DB_URL "mysql://openser:openserrw@localhost/openser" |
... | ... |
@@ -209,21 +199,18 @@ |
209 | 199 |
#define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
210 | 200 |
#endif |
211 | 201 |
|
212 |
-/* table holding versions of other ser tables */ |
|
213 |
-#define VERSION_TABLE "version" |
|
214 |
-#define VERSION_COLUMN "table_version" |
|
215 |
-#define TABLENAME_COLUMN "table_name" |
|
202 |
+#define VERSION_TABLE "version" /*!< table holding versions of other ser tables */ |
|
203 |
+#define VERSION_COLUMN "table_version" /*!< Column holding version number in version table */ |
|
204 |
+#define TABLENAME_COLUMN "table_name" /*!< Column holding module name in version table */ |
|
216 | 205 |
|
217 |
-/* minimum packet size; smaller packets will be dropped silently */ |
|
218 |
-#define MIN_UDP_PACKET 32 |
|
206 |
+#define MIN_UDP_PACKET 32 /*!< minimum UDP packet size; smaller packets will be dropped silently */ |
|
219 | 207 |
|
220 |
-#define MIN_SCTP_PACKET MIN_UDP_PACKET |
|
208 |
+#define MIN_SCTP_PACKET MIN_UDP_PACKET /*!< minimum size of SCTP packet */ |
|
221 | 209 |
|
222 |
-#define DEFAULT_RADIUS_CONFIG "/usr/local/etc/radiusclient/radiusclient.conf" |
|
210 |
+#define DEFAULT_RADIUS_CONFIG "/usr/local/etc/radiusclient/radiusclient.conf" /*!< Default FreeRadius configuration file */ |
|
223 | 211 |
|
224 | 212 |
#define DEFAULT_DID "_default" |
225 | 213 |
|
226 |
-/* maximum allowed iterations for a while (to catch runaways) */ |
|
227 |
-#define DEFAULT_MAX_WHILE_LOOPS 100 |
|
214 |
+#define DEFAULT_MAX_WHILE_LOOPS 100 /*!< Maximum allowed iterations for a while (to catch runaways) */ |
|
228 | 215 |
|
229 | 216 |
#endif |
The default config name was hard-wired to sip-router.cfg.
Reported-by: Klaus Darilion klaus.mailinglists at pernau at
... | ... |
@@ -197,11 +197,17 @@ |
197 | 197 |
/* maximum path length */ |
198 | 198 |
#define PATH_MAX_GUESS 1024 |
199 | 199 |
|
200 |
-#define DEFAULT_DB_URL "mysql://ser:heslo@localhost/ser" |
|
201 |
-#define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
|
202 |
- |
|
203 |
-#define DEFAULT_RODB_URL "mysql://serro:47serro11@localhost/ser" |
|
204 |
-#define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
|
200 |
+#ifdef OPENSER_MOD_INTERFACE |
|
201 |
+ #define DEFAULT_DB_URL "mysql://openser:openserrw@localhost/openser" |
|
202 |
+ #define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
|
203 |
+ #define DEFAULT_RODB_URL "mysql://openserro:openserro@localhost/openser" |
|
204 |
+ #define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
|
205 |
+#else |
|
206 |
+ #define DEFAULT_DB_URL "mysql://ser:heslo@localhost/ser" |
|
207 |
+ #define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1) |
|
208 |
+ #define DEFAULT_RODB_URL "mysql://serro:47serro11@localhost/ser" |
|
209 |
+ #define DEFAULT_RODB_URL_LEN (sizeof(DEFAULT_RODB_URL) - 1) |
|
210 |
+#endif |
|
205 | 211 |
|
206 | 212 |
/* table holding versions of other ser tables */ |
207 | 213 |
#define VERSION_TABLE "version" |
* Renamed ser to sip-router in Makefile, etc files and some core files.
* Renamed some etc files from ser based name to sip-router based name.
... | ... |
@@ -85,11 +85,11 @@ |
85 | 85 |
#define CONTENT_LENGTH "Content-Length: " |
86 | 86 |
#define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) |
87 | 87 |
|
88 |
-#define USER_AGENT "User-Agent: Sip EXpress router"\ |
|
88 |
+#define USER_AGENT "User-Agent: SIP Router "\ |
|
89 | 89 |
"(" VERSION " (" ARCH "/" OS_QUOTED "))" |
90 | 90 |
#define USER_AGENT_LEN (sizeof(USER_AGENT)-1) |
91 | 91 |
|
92 |
-#define SERVER_HDR "Server: Sip EXpress router "\ |
|
92 |
+#define SERVER_HDR "Server: SIP Router "\ |
|
93 | 93 |
"(" VERSION " (" ARCH "/" OS_QUOTED "))" |
94 | 94 |
#define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) |
95 | 95 |
|
- a new type of route available in config
- prototye: event_route[groupid:eventid]
- groupid should be the name of the module that triggers the event
- eventid some meaningful short text describing the event
- the route is not executed from other routes, but internally when some
events happen
- to be used to get error_route and local_route K functionalities
- ex: event_route[core:request-parse-error]
- ex: event_route[tm:local-request]
- note: those are not implemented yet
- the approach has the benefit of not needing to alter the grammer if
new routes need to be defined
- still to-do:
- module that executes the event should export contraints of what
route type the functions must obey if used inside (for now
REQUEST_ROUTE functions can be used)
- first implementation is in htable module
- event route after all modules are initialized
... | ... |
@@ -62,6 +62,7 @@ |
62 | 62 |
#define ONREPLY_RT_NO RT_NO /* on_reply routing tables number */ |
63 | 63 |
#define BRANCH_RT_NO RT_NO /* branch_route routing tables number */ |
64 | 64 |
#define ONSEND_RT_NO 1 /* onsend_route routing tables number */ |
65 |
+#define EVENT_RT_NO RT_NO /* event_route routing tables number */ |
|
65 | 66 |
#define DEFAULT_RT 0 /* default routing table */ |
66 | 67 |
|
67 | 68 |
#define MAX_REC_LEV 100 /* maximum number of recursive calls */ |
The structure now also contains the buffer and length variable
to store the path header and an unsigned int variable to store
branch flags.
* ser_core_cvs:
tcp: fix compilation problem on solaris (FIONREAD)
core: fix bad level name in new LOG()
t_check_status() checks also the blind UACs if t_pick_branch()
Documenting t_lookup_cancel() script function.
Removing set_t() from t_lookup_cancel() function, and introducing
updated udp_mtu handling code - fixes SER-433
documenting t_is_expired() function
t_is_expired() script function is introduced.
* logging API updated (see doc/logging-api.txt for details)
- AS support disabled by default.
When building the route set of ACKs for local UACs, only the reply is now
In case the AVP is a regexp, an allocation is required to build an AVP
Currently, SER matches E2E ACKs only if there is an equality between From HF
The calculate_routeset_length() produces an invalid result in the case
'memapp' and 'append_mem_block' are now both only used in source
"Route :" prefix (and separator) is used some more time across the
script: udp_mtu fallback script config & commands
core: forward: tcp fallback for big udp packets
Conflicts:
action.c
cfg.y
cfg_core.c
cfg_core.h
dprint.h - updated to the new logging api from ser, while
keeping the kamailio compatibility macros and
CRIT().
usr_avp.h
- support the same while() loops as kamailio (the only difference
being that max_while_loops can be changed at runtime):
while(<int expr>) { .... } with break exiting the while.
... | ... |
@@ -73,6 +73,12 @@ |
73 | 73 |
#define MY_VIA "Via: SIP/2.0/UDP " |
74 | 74 |
#define MY_VIA_LEN (sizeof(MY_VIA) - 1) |
75 | 75 |
|
76 |
+#define ROUTE_PREFIX "Route: " |
|
77 |
+#define ROUTE_PREFIX_LEN (sizeof(ROUTE_PREFIX) - 1) |
|
78 |
+ |
|
79 |
+#define ROUTE_SEPARATOR ", " |
|
80 |
+#define ROUTE_SEPARATOR_LEN (sizeof(ROUTE_SEPARATOR) - 1) |
|
81 |
+ |
|
76 | 82 |
#define CONTENT_LENGTH "Content-Length: " |
77 | 83 |
#define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) |
78 | 84 |
|
- support for sctp SRV queries was missing
... | ... |
@@ -126,6 +126,9 @@ |
126 | 126 |
#define SRV_TLS_PREFIX "_sips._tcp." |
127 | 127 |
#define SRV_TLS_PREFIX_LEN (sizeof(SRV_TLS_PREFIX) - 1) |
128 | 128 |
|
129 |
+#define SRV_SCTP_PREFIX "_sip._sctp." |
|
130 |
+#define SRV_SCTP_PREFIX_LEN (sizeof(SRV_SCTP_PREFIX) - 1) |
|
131 |
+ |
|
129 | 132 |
#define SRV_MAX_PREFIX_LEN SRV_TLS_PREFIX_LEN |
130 | 133 |
|
131 | 134 |
/*used only if PKG_MALLOC is defined*/ |
... | ... |
@@ -199,6 +199,8 @@ |
199 | 199 |
/* minimum packet size; smaller packets will be dropped silently */ |
200 | 200 |
#define MIN_UDP_PACKET 32 |
201 | 201 |
|
202 |
+#define MIN_SCTP_PACKET MIN_UDP_PACKET |
|
203 |
+ |
|
202 | 204 |
#define DEFAULT_RADIUS_CONFIG "/usr/local/etc/radiusclient/radiusclient.conf" |
203 | 205 |
|
204 | 206 |
#define DEFAULT_DID "_default" |
... | ... |
@@ -46,8 +46,8 @@ |
46 | 46 |
|
47 | 47 |
#define CFG_FILE CFG_DIR "ser.cfg" |
48 | 48 |
|
49 |
-#define TLS_PKEY_FILE CFG_DIR "cert.pem" |
|
50 |
-#define TLS_CERT_FILE CFG_DIR "cert.pem" |
|
49 |
+#define TLS_PKEY_FILE "cert.pem" |
|
50 |
+#define TLS_CERT_FILE "cert.pem" |
|
51 | 51 |
#define TLS_CA_FILE 0 /* no CA list file by default */ |
52 | 52 |
|
53 | 53 |
|
- added dont_daemonize feature. When a process manager is responsible for running processes then is not happy when spawned process is terminated almost immediately. Manager will try restart ser in infinite loop.
Cmd line params (ser.cfg) (backward compatible):
-D ... don't fork (dont_fork=1)
-DD ... don't daemonize creator process (dont_fork=2)
-DDD | or no -D param ... normal daemonizetion (dont_fork>2 or 0)
Note there is problem when Ctrl-C in dont_daemonize mode, not all processes are terminated
Creator_pid variable..pid of creator process, may be terminated
... | ... |
@@ -77,11 +77,11 @@ |
77 | 77 |
#define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1) |
78 | 78 |
|
79 | 79 |
#define USER_AGENT "User-Agent: Sip EXpress router"\ |
80 |
- "(" VERSION " (" ARCH "/" OS"))" |
|
80 |
+ "(" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
81 | 81 |
#define USER_AGENT_LEN (sizeof(USER_AGENT)-1) |
82 | 82 |
|
83 | 83 |
#define SERVER_HDR "Server: Sip EXpress router "\ |
84 |
- "(" VERSION " (" ARCH "/" OS"))" |
|
84 |
+ "(" VERSION " (" ARCH "/" OS_QUOTED "))" |
|
85 | 85 |
#define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1) |
86 | 86 |
|
87 | 87 |
#define MAX_WARNING_LEN 256 |
WARNING: lots of changes and very lightly tested