- 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,51 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2008 iptelorg GmbH |
|
3 |
- * |
|
4 |
- * Permission to use, copy, modify, and distribute this software for any |
|
5 |
- * purpose with or without fee is hereby granted, provided that the above |
|
6 |
- * copyright notice and this permission notice appear in all copies. |
|
7 |
- * |
|
8 |
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|
9 |
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|
10 |
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|
11 |
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|
12 |
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|
13 |
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|
14 |
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
15 |
- */ |
|
16 |
- |
|
17 |
-/*! |
|
18 |
- * \file |
|
19 |
- * \brief Kamailio core :: ser/kamailio/openser compatibility macros & vars. |
|
20 |
- * \ingroup core |
|
21 |
- * Module: \ref core |
|
22 |
- */ |
|
23 |
- |
|
24 |
-/* |
|
25 |
- * History: |
|
26 |
- * -------- |
|
27 |
- * 2008-11-29 initial version (andrei) |
|
28 |
- */ |
|
29 |
- |
|
30 |
- |
|
31 |
-#include "sr_compat.h" |
|
32 |
- |
|
33 |
-/** |
|
34 |
- * compatibility modes: |
|
35 |
- * - SR_COMPAT_SER - strict compatibiliy with ser ($xy is avp) |
|
36 |
- * - SR_COMPAT_KAMAILIO - strict compatibiliy with kamailio ($xy is pv) |
|
37 |
- * - SR_COMPAT_MAX - max compatibiliy ($xy tried as pv, if not found, is avp) |
|
38 |
- */ |
|
39 |
-#ifdef SR_SER |
|
40 |
-#define SR_DEFAULT_COMPAT SR_COMPAT_SER |
|
41 |
-#elif defined SR_KAMAILIO || defined SR_OPENSER |
|
42 |
-#define SR_DEFAULT_COMPAT SR_COMPAT_MAX |
|
43 |
-#elif defined SR_ALL || defined SR_MAX_COMPAT |
|
44 |
-#define SR_DEFAULT_COMPAT SR_COMPAT_MAX |
|
45 |
-#else |
|
46 |
-/* default */ |
|
47 |
-#define SR_DEFAULT_COMPAT SR_COMPAT_MAX |
|
48 |
-#endif |
|
49 |
- |
|
50 |
-int sr_compat=SR_DEFAULT_COMPAT; |
|
51 |
-int sr_cfg_compat=SR_DEFAULT_COMPAT; |
... | ... |
@@ -1,6 +1,4 @@ |
1 | 1 |
/* |
2 |
- * $Id$ |
|
3 |
- * |
|
4 | 2 |
* Copyright (C) 2008 iptelorg GmbH |
5 | 3 |
* |
6 | 4 |
* Permission to use, copy, modify, and distribute this software for any |
... | ... |
@@ -15,9 +13,10 @@ |
15 | 13 |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
16 | 14 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
17 | 15 |
*/ |
16 |
+ |
|
18 | 17 |
/*! |
19 | 18 |
* \file |
20 |
- * \brief SIP-router core :: ser/kamailio/openser compatibility macros & vars. |
|
19 |
+ * \brief Kamailio core :: ser/kamailio/openser compatibility macros & vars. |
|
21 | 20 |
* \ingroup core |
22 | 21 |
* Module: \ref core |
23 | 22 |
*/ |
- means that $xy is tried first as pv and if not, then is considered avp
(was default compat mode for default flavour in the past)
- you can still use:
- #!KAMAILIO in config to force SR_COMPAT_KAMAILIO (i.e., $xy must
be a pv, otherwise is error)
- #!SER is config to force SR_COMPAT_SER (i.e., $xy is avp/attr)
... | ... |
@@ -31,10 +31,16 @@ |
31 | 31 |
|
32 | 32 |
#include "sr_compat.h" |
33 | 33 |
|
34 |
+/** |
|
35 |
+ * compatibility modes: |
|
36 |
+ * - SR_COMPAT_SER - strict compatibiliy with ser ($xy is avp) |
|
37 |
+ * - SR_COMPAT_KAMAILIO - strict compatibiliy with kamailio ($xy is pv) |
|
38 |
+ * - SR_COMPAT_MAX - max compatibiliy ($xy tried as pv, if not found, is avp) |
|
39 |
+ */ |
|
34 | 40 |
#ifdef SR_SER |
35 | 41 |
#define SR_DEFAULT_COMPAT SR_COMPAT_SER |
36 | 42 |
#elif defined SR_KAMAILIO || defined SR_OPENSER |
37 |
-#define SR_DEFAULT_COMPAT SR_COMPAT_KAMAILIO |
|
43 |
+#define SR_DEFAULT_COMPAT SR_COMPAT_MAX |
|
38 | 44 |
#elif defined SR_ALL || defined SR_MAX_COMPAT |
39 | 45 |
#define SR_DEFAULT_COMPAT SR_COMPAT_MAX |
40 | 46 |
#else |
Please fill in after the :: to explain the function of this file.
... | ... |
@@ -15,10 +15,13 @@ |
15 | 15 |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
16 | 16 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
17 | 17 |
*/ |
18 |
-/** |
|
19 |
- * @file |
|
20 |
- * @brief ser/kamailio/openser compatibility macros & vars. |
|
18 |
+/*! |
|
19 |
+ * \file |
|
20 |
+ * \brief SIP-router core :: ser/kamailio/openser compatibility macros & vars. |
|
21 |
+ * \ingroup core |
|
22 |
+ * Module: \ref core |
|
21 | 23 |
*/ |
24 |
+ |
|
22 | 25 |
/* |
23 | 26 |
* History: |
24 | 27 |
* -------- |
- script mode can be switched between ser compatible, kamailio
compatible and max compatibility (compatible with both as much as
possible), using #!SER, #!KAMAILIO or #!ALL on the first line
(#!OPENSER and #!MAXCOMPAT are also allowed)
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,43 @@ |
1 |
+/* |
|
2 |
+ * $Id$ |
|
3 |
+ * |
|
4 |
+ * Copyright (C) 2008 iptelorg GmbH |
|
5 |
+ * |
|
6 |
+ * Permission to use, copy, modify, and distribute this software for any |
|
7 |
+ * purpose with or without fee is hereby granted, provided that the above |
|
8 |
+ * copyright notice and this permission notice appear in all copies. |
|
9 |
+ * |
|
10 |
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|
11 |
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|
12 |
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|
13 |
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|
14 |
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|
15 |
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|
16 |
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
17 |
+ */ |
|
18 |
+/** |
|
19 |
+ * @file |
|
20 |
+ * @brief ser/kamailio/openser compatibility macros & vars. |
|
21 |
+ */ |
|
22 |
+/* |
|
23 |
+ * History: |
|
24 |
+ * -------- |
|
25 |
+ * 2008-11-29 initial version (andrei) |
|
26 |
+ */ |
|
27 |
+ |
|
28 |
+ |
|
29 |
+#include "sr_compat.h" |
|
30 |
+ |
|
31 |
+#ifdef SR_SER |
|
32 |
+#define SR_DEFAULT_COMPAT SR_COMPAT_SER |
|
33 |
+#elif defined SR_KAMAILIO || defined SR_OPENSER |
|
34 |
+#define SR_DEFAULT_COMPAT SR_COMPAT_KAMAILIO |
|
35 |
+#elif defined SR_ALL || defined SR_MAX_COMPAT |
|
36 |
+#define SR_DEFAULT_COMPAT SR_COMPAT_MAX |
|
37 |
+#else |
|
38 |
+/* default */ |
|
39 |
+#define SR_DEFAULT_COMPAT SR_COMPAT_MAX |
|
40 |
+#endif |
|
41 |
+ |
|
42 |
+int sr_compat=SR_DEFAULT_COMPAT; |
|
43 |
+int sr_cfg_compat=SR_DEFAULT_COMPAT; |