Browse code

Merge branch 'master' into outbound

* master:
pkg/kamailio/(centos|fedora): Updated ver and rel in .spec
sl: fix compilation warnings in sl_forward_reply()
dialog: fixed ka_timer linking
core: command line option -v replaced with -K
msrp: new parameter use_path_addr
msrp: added rpc command to list active connections
msrp: added internal map table to track msrp connections
pipelimit: implemented support for RPC commands
Makefile.defs: major version base updated to 4.0.0
sl: new function sl_forward_reply(...)
core: added function to remove an exiting lump structure from internal list
dialog2: generate and add missing README for dialog2 module
Do not bind with libser_cmd, this is not required.
Added Debian-Packaging for IMS modules
- Add group for IMS modules - Added convenience rule to build packages for current debian-stable
ims modules: don't link with -lrt on macosx
auth_ims: don't link with -lrt on darwin os
kamailio.cfg: xhttp left only in kamailio-oob.cfg
modules/rtpproxy: rtpproxy_manage can now add ice relay candidates
parser/sdp: fixed freeing of ice attributes

Peter Dunkley authored on 06/01/2013 19:37:22
Showing 50 changed files
... ...
@@ -297,6 +297,11 @@ module_group_kredis=ndb_redis
297 297
 # K mono module
298 298
 module_group_kmono=app_mono
299 299
 
300
+# For IMS
301
+# kamailio modules
302
+module_group_kims=auth_ims cdp cdp_avp dialog2 ims_qos isc icscf ipsec\
303
+                        registrar_pcscf registrar_scscf usrloc_pcscf usrloc_scscf
304
+
300 305
 # if not set on the cmd. line, env or in the modules.lst (cfg_group_include)
301 306
 # exclude the below modules.
302 307
 ifneq ($(group_include)$(cfg_group_include),)
... ...
@@ -871,6 +876,17 @@ deb:
871 876
 		rm debian; \
872 877
 	fi
873 878
 
879
+.PHONY: deb-stable
880
+deb-stable:
881
+	-@if [ -d debian ]; then \
882
+		dpkg-buildpackage -rfakeroot -tc; \
883
+		rm debian; \
884
+	else \
885
+		ln -s pkg/$(MAIN_NAME)/deb/squeeze debian; \
886
+		dpkg-buildpackage -rfakeroot -tc; \
887
+		rm debian; \
888
+	fi
889
+
874 890
 .PHONY: sunpkg
875 891
 sunpkg:
876 892
 	mkdir -p tmp/$(MAIN_NAME)
... ...
@@ -159,10 +159,10 @@ endif
159 159
 INSTALL_FLAVOUR=$(FLAVOUR)
160 160
 
161 161
 #version number
162
-VERSION = 3
163
-PATCHLEVEL = 4
162
+VERSION = 4
163
+PATCHLEVEL = 0
164 164
 SUBLEVEL =  0
165
-EXTRAVERSION = -dev7
165
+EXTRAVERSION = -dev8
166 166
 
167 167
 # memory manager switcher
168 168
 # 0 - f_malloc (fast malloc)
... ...
@@ -712,3 +712,32 @@ unsigned int count_applied_lumps(struct lump *ll, int type)
712 712
 	return n;
713 713
 }
714 714
 
715
+int remove_lump(sip_msg_t *msg, struct lump *l)
716
+{
717
+	struct lump *t = NULL;
718
+	struct lump *prev = NULL;
719
+	struct lump **list = NULL;
720
+
721
+	list=&msg->add_rm;	
722
+	for (t=*list; t; prev=t, t=t->next) {
723
+		if(t==l)
724
+			break;
725
+	}
726
+	if(t==NULL) {
727
+		list=&msg->body_lumps;
728
+		for (t=*list; t; prev=t, t=t->next) {
729
+			if(t==l)
730
+				break;
731
+		}
732
+	}
733
+	if(t!=NULL) {
734
+		if(prev==NULL) {
735
+			*list = t->next;
736
+		} else {
737
+			prev->next = t->next;
738
+		}
739
+		free_lump(t);
740
+		return 1;
741
+	}
742
+	return 0;
743
+}
... ...
@@ -95,4 +95,6 @@ void free_duped_lump_list(struct lump* l);
95 95
 /*! \brief remove all non-SHMEM lumps from the list */
96 96
 void del_nonshm_lump( struct lump** lump_list );
97 97
 
98
+/*! \brief remove the lump from the internal lists */
99
+int remove_lump(sip_msg_t *msg, struct lump *l);
98 100
 #endif
... ...
@@ -67,18 +67,6 @@
67 67
 #     - define WITH_XMLRPC
68 68
 #     - adjust route[XMLRPC] for access policy
69 69
 #
70
-# *** To enable the embedded http server:
71
-#     - define WITH_XHTTP
72
-#
73
-# *** To enable the RPC web interface execute:
74
-#     - enable xhttp
75
-#     - define WITH_XHTTP_RPC
76
-#
77
-# *** To enable the provisioning web interface execute:
78
-#     - enable mysql
79
-#     - enable xhttp
80
-#     - define WITH_XHTTP_PI
81
-#
82 70
 # *** To enable anti-flood detection execute:
83 71
 #     - adjust pike and htable=>ipban settings as needed (default is
84 72
 #       block if more than 16 requests in 2 seconds and ban for 300 seconds)
... ...
@@ -186,10 +174,6 @@ enable_tls=yes
186 174
 # - a bit higher than registration expires to cope with UA behind NAT
187 175
 tcp_connection_lifetime=3605
188 176
 
189
-#!ifdef WITH_XHTTP
190
-tcp_accept_no_cl=yes
191
-#!endif
192
-
193 177
 ####### Custom Parameters #########
194 178
 
195 179
 # These parameters can be modified runtime via RPC interface
... ...
@@ -298,18 +282,6 @@ loadmodule "xmlrpc.so"
298 282
 loadmodule "debugger.so"
299 283
 #!endif
300 284
 
301
-#!ifdef WITH_XHTTP
302
-loadmodule "xhttp.so"
303
-#!endif
304
-
305
-#!ifdef WITH_XHTTP_RPC
306
-loadmodule "xhttp_rpc.so"
307
-#!endif
308
-
309
-#!ifdef WITH_XHTTP_PI
310
-loadmodule "xhttp_pi.so"
311
-#!endif
312
-
313 285
 # ----------------- setting module-specific parameters ---------------
314 286
 
315 287
 
... ...
@@ -473,15 +445,6 @@ modparam("xmlrpc", "url_match", "^/RPC")
473 445
 modparam("debugger", "cfgtrace", 1)
474 446
 #!endif
475 447
 
476
-#!ifdef WITH_XHTTP_RPC
477
-modparam("xhttp_rpc", "xhttp_rpc_root", "http_rpc")
478
-#!endif
479
-
480
-#!ifdef WITH_XHTTP_PI
481
-modparam("xhttp_pi", "xhttp_pi_root", "http_pi")
482
-modparam("xhttp_pi", "framework", "/usr/local/etc/kamailio/pi_framework.xml")
483
-#!endif
484
-
485 448
 ####### Routing Logic ########
486 449
 
487 450
 
... ...
@@ -958,23 +921,3 @@ failure_route[MANAGE_FAILURE] {
958 921
 	}
959 922
 #!endif
960 923
 }
961
-
962
-#!ifdef WITH_XHTTP
963
-event_route[xhttp:request] {
964
-#!ifdef WITH_XHTTP_RPC
965
-	$var(xhttp_rpc_root) = $(hu{s.substr,0,9});
966
-	if ($var(xhttp_rpc_root) == "/http_rpc") {
967
-		dispatch_xhttp_rpc();
968
-	}
969
-#!endif
970
-#!ifdef WITH_XHTTP_PI
971
-	$var(xhttp_rpc_root) = $(hu{s.substr,0,8});
972
-	if ($var(xhttp_rpc_root) == "/http_pi") {
973
-		dispatch_xhttp_pi();
974
-	}
975
-#!endif
976
-	xhttp_reply("200", "OK", "text/html",
977
-		"<html><body>Wrong URL $hu</body></html>");
978
-}
979
-#!endif
980
-
... ...
@@ -14,8 +14,8 @@ libxml2_includes=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
14 14
 libxml2_libs=-L$(LOCALBASE)/lib -lxml2
15 15
 INCLUDES= -I$(CURDIR)/.. -I$(CURDIR)/../.. $(libxml2_includes) 
16 16
 LIBS=$(libxml2_libs)
17
-SERLIBPATH=..
18
-SER_LIBS=$(SERLIBPATH)/cds/ser_cds
17
+#SERLIBPATH=..
18
+#SER_LIBS=$(SERLIBPATH)/cds/ser_cds
19 19
 
20 20
 include ../../Makefile.libs
21 21
 
... ...
@@ -225,7 +225,7 @@ Options:\n\
225 225
                   field to a via\n\
226 226
     -R           Same as `-r` but use reverse dns;\n\
227 227
                   (to use both use `-rR`)\n\
228
-    -v           Turn on \"via:\" host checking when forwarding replies\n\
228
+    -K           Turn on \"via:\" host checking when forwarding replies\n\
229 229
     -d           Debugging mode (multiple -d increase the level)\n\
230 230
     -D no        1..do not fork (almost) anyway, 2..do not daemonize creator\n\
231 231
                   3..daemonize (default)\n\
... ...
@@ -1860,7 +1860,7 @@ int main(int argc, char** argv)
1860 1860
 	dprint_init_colors();
1861 1861
 
1862 1862
 	/* command line options */
1863
-	options=  ":f:cm:M:dVIhEeb:l:L:n:vrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
1863
+	options=  ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
1864 1864
 #ifdef STATS
1865 1865
 		"s:"
1866 1866
 #endif
... ...
@@ -1957,6 +1957,7 @@ int main(int argc, char** argv)
1957 1957
 			case 'd':
1958 1958
 					/* ignore it, was parsed immediately after startup */
1959 1959
 					break;
1960
+			case 'v':
1960 1961
 			case 'V':
1961 1962
 					printf("version: %s\n", full_version);
1962 1963
 					printf("flags: %s\n", ver_flags );
... ...
@@ -2019,7 +2020,7 @@ int main(int argc, char** argv)
2019 2020
 			case 'b':
2020 2021
 			case 'l':
2021 2022
 			case 'n':
2022
-			case 'v':
2023
+			case 'K':
2023 2024
 			case 'r':
2024 2025
 			case 'R':
2025 2026
 			case 'D':
... ...
@@ -2129,6 +2130,7 @@ try_again:
2129 2130
 			case 'm':
2130 2131
 			case 'M':
2131 2132
 			case 'd':
2133
+			case 'v':
2132 2134
 			case 'V':
2133 2135
 			case 'I':
2134 2136
 			case 'h':
... ...
@@ -2175,7 +2177,7 @@ try_again:
2175 2177
 						goto error;
2176 2178
 					}
2177 2179
 					break;
2178
-			case 'v':
2180
+			case 'K':
2179 2181
 					check_via=1;
2180 2182
 					break;
2181 2183
 			case 'r':
... ...
@@ -13,7 +13,11 @@ LIBS=
13 13
 DEFS+=-DOPENSER_MOD_INTERFACE
14 14
 
15 15
 DEFS += -I/usr/include/libxml2
16
-LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
16
+LIBS += -L$(LOCALBASE)/lib -lxml2
17
+
18
+ifneq ($(OS),darwin)
19
+	LIBS += -lrt
20
+endif
17 21
 
18 22
 SERLIBPATH=../../lib
19 23
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore
20 24
new file mode 100644
... ...
@@ -0,0 +1,1061 @@
1
+dialog2 Module
2
+
3
+Bogdan-Andrei Iancu
4
+
5
+   Voice Sistem SRL
6
+
7
+Carsten Bock
8
+
9
+   ng-voice.com
10
+
11
+Jason Penton
12
+
13
+   Smile Communications
14
+
15
+Richard Good
16
+
17
+   Smile Communications
18
+
19
+Edited by
20
+
21
+Bogdan-Andrei Iancu
22
+
23
+Edited by
24
+
25
+Carsten Bock
26
+
27
+Edited by
28
+
29
+Jason Penton
30
+
31
+Edited by
32
+
33
+Richard Good
34
+
35
+   Copyright © 2006 Voice Sistem SRL
36
+
37
+   Copyright © 2011 Carsten Bock, http://www.ng-voice.com
38
+     __________________________________________________________________
39
+
40
+   Table of Contents
41
+
42
+   1. Admin Guide
43
+
44
+        1. Overview
45
+        2. How it works
46
+        3. Dialog profiling
47
+        4. Dependencies
48
+
49
+              4.1. Kamailio Modules
50
+              4.2. External Libraries or Applications
51
+
52
+        5. Parameters
53
+
54
+              5.1. enable_stats (integer)
55
+              5.2. hash_size (integer)
56
+              5.3. rr_param (string)
57
+              5.4. dlg_flag (integer)
58
+              5.5. timeout_avp (string)
59
+              5.6. default_timeout (integer)
60
+              5.7. dlg_extra_hdrs (string)
61
+              5.8. dlg_match_mode (integer)
62
+              5.9. detect_spirals (integer)
63
+              5.10. db_url (string)
64
+              5.11. db_mode (integer)
65
+              5.12. db_update_period (integer)
66
+              5.13. db_fetch_rows (integer)
67
+              5.14. table_name (string)
68
+              5.15. profiles_with_value (string)
69
+              5.16. profiles_no_value (string)
70
+              5.17. bridge_controller (string)
71
+              5.18. initial_cbs_inscript (string)
72
+
73
+        6. Functions
74
+
75
+              6.1. set_dlg_profile(profile,[value])
76
+              6.2. unset_dlg_profile(profile,[value])
77
+              6.3. is_in_profile(profile,[value])
78
+              6.4. get_profile_size(profile,[value],size)
79
+              6.5. dlg_isflagset(flag)
80
+              6.6. dlg_setflag(flag)
81
+              6.7. dlg_resetflag(flag)
82
+              6.8. dlg_terminate
83
+              6.9. dlg_refer(side, address)
84
+              6.10. dlg_manage()
85
+              6.11. dlg_bridge(from, to, op)
86
+              6.12. dlg_get(callid, ftag, ttag)
87
+              6.13. is_known_dlg()
88
+
89
+        7. Exported statistics
90
+
91
+              7.1. active_dialogs
92
+              7.2. early_dialogs
93
+              7.3. processed_dialogs
94
+              7.4. expired_dialogs
95
+              7.5. failed_dialogs
96
+
97
+        8. MI Commands
98
+
99
+              8.1. dlg_list
100
+              8.2. dlg_list_ctx
101
+              8.3. dlg_end_dlg
102
+              8.4. dlg_terminate_dlg
103
+              8.5. profile_get_size
104
+              8.6. profile_list_dlgs
105
+              8.7. dlg_bridge
106
+
107
+        9. Exported RPC Functions
108
+
109
+              9.1. dlg.list
110
+              9.2. dlg.list_ctx
111
+              9.3. dlg.dlg_list
112
+              9.4. dlg.dlg_list_ctx
113
+              9.5. dlg.end_dlg
114
+              9.6. dlg.profile_get_size
115
+              9.7. dlg.profile_list
116
+              9.8. dlg.bridge_dlg
117
+
118
+        10. Exported pseudo-variables
119
+
120
+              10.1. $DLG_count
121
+              10.2. $DLG_status
122
+              10.3. $DLG_lifetime
123
+              10.4. $dlg(...)
124
+              10.5. $dlg_ctx(...)
125
+              10.6. $dlg_var(key)
126
+
127
+   2. Developer Guide
128
+
129
+        1. Available Functions
130
+
131
+              1.1. register_dlgcb (dialog, type, cb, param, free_param_cb)
132
+
133
+              1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs)
134
+              1.3. set_dlg_var (dlg, key, val)
135
+              1.4. get_dlg_var (dlg, key)
136
+              1.5. get_current_dialog ()
137
+
138
+   3. Frequently Asked Questions
139
+
140
+   List of Examples
141
+
142
+   1.1. Set hash_size parameter
143
+   1.2. Set rr_param parameter
144
+   1.3. Set dlg_flag parameter
145
+   1.4. Set timeout_avp parameter
146
+   1.5. Set default_timeout parameter
147
+   1.6. Set dlf_extra_hdrs parameter
148
+   1.7. Set detect_spirals parameter
149
+   1.8. Set profiles_with_value parameter
150
+   1.9. Set profiles_no_value parameter
151
+   1.10. Set bridge_controller parameter
152
+   1.11. set_dlg_profile usage
153
+   1.12. unset_dlg_profile usage
154
+   1.13. is_in_profile usage
155
+   1.14. get_profile_size usage
156
+   1.15. dlg_isflagset usage
157
+   1.16. dlg_setflag usage
158
+   1.17. dlg_resetflag usage
159
+   1.18. dlg_terminate usage
160
+
161
+Chapter 1. Admin Guide
162
+
163
+   Table of Contents
164
+
165
+   1. Overview
166
+   2. How it works
167
+   3. Dialog profiling
168
+   4. Dependencies
169
+
170
+        4.1. Kamailio Modules
171
+        4.2. External Libraries or Applications
172
+
173
+   5. Parameters
174
+
175
+        5.1. enable_stats (integer)
176
+        5.2. hash_size (integer)
177
+        5.3. rr_param (string)
178
+        5.4. dlg_flag (integer)
179
+        5.5. timeout_avp (string)
180
+        5.6. default_timeout (integer)
181
+        5.7. dlg_extra_hdrs (string)
182
+        5.8. dlg_match_mode (integer)
183
+        5.9. detect_spirals (integer)
184
+        5.10. db_url (string)
185
+        5.11. db_mode (integer)
186
+        5.12. db_update_period (integer)
187
+        5.13. db_fetch_rows (integer)
188
+        5.14. table_name (string)
189
+        5.15. profiles_with_value (string)
190
+        5.16. profiles_no_value (string)
191
+        5.17. bridge_controller (string)
192
+        5.18. initial_cbs_inscript (string)
193
+
194
+   6. Functions
195
+
196
+        6.1. set_dlg_profile(profile,[value])
197
+        6.2. unset_dlg_profile(profile,[value])
198
+        6.3. is_in_profile(profile,[value])
199
+        6.4. get_profile_size(profile,[value],size)
200
+        6.5. dlg_isflagset(flag)
201
+        6.6. dlg_setflag(flag)
202
+        6.7. dlg_resetflag(flag)
203
+        6.8. dlg_terminate
204
+        6.9. dlg_refer(side, address)
205
+        6.10. dlg_manage()
206
+        6.11. dlg_bridge(from, to, op)
207
+        6.12. dlg_get(callid, ftag, ttag)
208
+        6.13. is_known_dlg()
209
+
210
+   7. Exported statistics
211
+
212
+        7.1. active_dialogs
213
+        7.2. early_dialogs
214
+        7.3. processed_dialogs
215
+        7.4. expired_dialogs
216
+        7.5. failed_dialogs
217
+
218
+   8. MI Commands
219
+
220
+        8.1. dlg_list
221
+        8.2. dlg_list_ctx
222
+        8.3. dlg_end_dlg
223
+        8.4. dlg_terminate_dlg
224
+        8.5. profile_get_size
225
+        8.6. profile_list_dlgs
226
+        8.7. dlg_bridge
227
+
228
+   9. Exported RPC Functions
229
+
230
+        9.1. dlg.list
231
+        9.2. dlg.list_ctx
232
+        9.3. dlg.dlg_list
233
+        9.4. dlg.dlg_list_ctx
234
+        9.5. dlg.end_dlg
235
+        9.6. dlg.profile_get_size
236
+        9.7. dlg.profile_list
237
+        9.8. dlg.bridge_dlg
238
+
239
+   10. Exported pseudo-variables
240
+
241
+        10.1. $DLG_count
242
+        10.2. $DLG_status
243
+        10.3. $DLG_lifetime
244
+        10.4. $dlg(...)
245
+        10.5. $dlg_ctx(...)
246
+        10.6. $dlg_var(key)
247
+
248
+1. Overview
249
+
250
+   The dialog2 module provides dialog awareness to the Kamailio proxy. Its
251
+   functionality is to keep track of the current dialogs, to offer
252
+   information about them (like how many dialogs are active) or to manage
253
+   them. The module exports several functions that could be used directly
254
+   from scripts. The dialog2 module extends the original dialog module by
255
+   providing support for forked calling and early dialog termination. It
256
+   is the intention that the dialog2 module will eventually replace the
257
+   dialog module.
258
+
259
+   The module, via an internal API, also provide the foundation to build
260
+   on top of it more complex dialog-based functionalities via other
261
+   Kamailio modules.
262
+
263
+2. How it works
264
+
265
+   To create the dialog associated to an initial request, the flag
266
+   “dlg_flag” ( Section 5.4, “ dlg_flag (integer) ”) must be set before
267
+   creating the corresponding transaction.
268
+
269
+   The dialog is automatically destroyed when a “BYE” is received. In case
270
+   of no “BYE”, the dialog lifetime is controlled via the default timeout
271
+   (see “default_timeout” - Section 5.6, “ default_timeout (integer) ”)
272
+   and custom timeout (see “timeout_avp” - Section 5.5, “ timeout_avp
273
+   (string) ”). The dialog timeout is reset each time a sequential request
274
+   passes.
275
+
276
+3. Dialog profiling
277
+
278
+   Dialog profiling is a mechanism that helps in classifying, sorting and
279
+   keeping trace of certain types of dialogs, using whatever properties of
280
+   the dialog (like caller, destination, type of calls, etc). Dialogs can
281
+   be dynamically added in different (and several) profile tables -
282
+   logically, each profile table can have a special meaning (like dialogs
283
+   outside the domain, dialogs terminated to PSTN, etc).
284
+
285
+   There are two types of profiles:
286
+     * with no value - a dialog simply belongs to a profile. (like
287
+       outbound calls profile). There is no other additional information
288
+       to describe the dialog's belonging to the profile;
289
+     * with value - a dialog belongs to a profile having a certain value
290
+       (like in caller profile, where the value is the caller ID). The
291
+       belonging of the dialog to the profile is strictly related to the
292
+       value.
293
+
294
+   A dialog can be added to multiple profiles in the same time.
295
+
296
+   Profiles are visible (at the moment) in the request route (for initial
297
+   and sequential requests) and in the branch, failure and reply routes of
298
+   the original request.
299
+
300
+4. Dependencies
301
+
302
+   4.1. Kamailio Modules
303
+   4.2. External Libraries or Applications
304
+
305
+4.1. Kamailio Modules
306
+
307
+   The following modules must be loaded before this module:
308
+     * TM - Transaction module
309
+     * RR - Record-Route module
310
+
311
+4.2. External Libraries or Applications
312
+
313
+   The following libraries or applications must be installed before
314
+   running Kamailio with this module loaded:
315
+     * None.
316
+
317
+5. Parameters
318
+
319
+   5.1. enable_stats (integer)
320
+   5.2. hash_size (integer)
321
+   5.3. rr_param (string)
322
+   5.4. dlg_flag (integer)
323
+   5.5. timeout_avp (string)
324
+   5.6. default_timeout (integer)
325
+   5.7. dlg_extra_hdrs (string)
326
+   5.8. dlg_match_mode (integer)
327
+   5.9. detect_spirals (integer)
328
+   5.10. db_url (string)
329
+   5.11. db_mode (integer)
330
+   5.12. db_update_period (integer)
331
+   5.13. db_fetch_rows (integer)
332
+   5.14. table_name (string)
333
+   5.15. profiles_with_value (string)
334
+   5.16. profiles_no_value (string)
335
+   5.17. bridge_controller (string)
336
+   5.18. initial_cbs_inscript (string)
337
+
338
+5.1.  enable_stats (integer)
339
+
340
+   This function is currently not supported by the dialog2 module. To be
341
+   incorporated in the future.
342
+
343
+5.2.  hash_size (integer)
344
+
345
+   The size of the hash table internally used to keep the dialogs. A
346
+   larger table is much faster but consumes more memory. The hash size
347
+   must be a power of two number.
348
+
349
+   IMPORTANT: If dialogs' information should be stored in a database, a
350
+   constant hash_size should be used, otherwise the restoring process will
351
+   not take place. If you really want to modify the hash_size you must
352
+   delete all table's rows before restarting the server.
353
+
354
+   Default value is “4096”.
355
+
356
+   Example 1.1. Set hash_size parameter
357
+...
358
+modparam("dialog2", "hash_size", 1024)
359
+...
360
+
361
+5.3.  rr_param (string)
362
+
363
+   Name of the Record-Route parameter to be added with the dialog cookie.
364
+   It is used for the fast dialog matching of sequential requests.
365
+
366
+   Default value is “did”.
367
+
368
+   Example 1.2. Set rr_param parameter
369
+...
370
+modparam("dialog2", "rr_param", "xyz")
371
+...
372
+
373
+5.4.  dlg_flag (integer)
374
+
375
+   Flag to be used for marking if a dialog should be constructed for the
376
+   current request (this make sense only for initial requests).
377
+
378
+   Default value is “none”.
379
+
380
+   Example 1.3. Set dlg_flag parameter
381
+...
382
+modparam("dialog2", "dlg_flag", 4)
383
+...
384
+
385
+5.5.  timeout_avp (string)
386
+
387
+   The specification of an AVP that contain a custom timeout (in seconds)
388
+   for the dialog. It may be used only in a request (initial or
389
+   sequential) context
390
+
391
+   Default value is “none”.
392
+
393
+   Example 1.4. Set timeout_avp parameter
394
+...
395
+modparam("dialog2", "timeout_avp", "$avp(i:10)")
396
+...
397
+
398
+5.6.  default_timeout (integer)
399
+
400
+   The default dialog timeout (in seconds) if no custom one is set.
401
+
402
+   Default value is “43200 (12 hours)”.
403
+
404
+   Example 1.5. Set default_timeout parameter
405
+...
406
+modparam("dialog2", "default_timeout", 21600)
407
+...
408
+
409
+5.7.  dlg_extra_hdrs (string)
410
+
411
+   A string containing the extra headers (full format, with EOH) to be
412
+   added in the requests generated by the module (like BYEs).
413
+
414
+   Default value is “NULL”.
415
+
416
+   Example 1.6. Set dlf_extra_hdrs parameter
417
+...
418
+modparam("dialog2", "dlg_extra_hdrs", "Hint: credit expired\r\n")
419
+...
420
+
421
+5.8.  dlg_match_mode (integer)
422
+
423
+   Deprecated - in the new dialog module we always match using DID ONLY
424
+
425
+5.9.  detect_spirals (integer)
426
+
427
+   Whether spirals (i.e., messages routed through the proxy multiple
428
+   times) should be detected or not.
429
+
430
+   If set to 0, spirals will not be detected and result in the generation
431
+   of a new, possibly dangling dialog structure per occurring spiral. If
432
+   set to 1, spirals are detected and internally mapped to existing dialog
433
+   structures.
434
+
435
+   Default value is 1.
436
+
437
+   Example 1.7. Set detect_spirals parameter
438
+...
439
+modparam("dialog2", "detect_spirals", 1)
440
+...
441
+
442
+5.10.  db_url (string)
443
+
444
+   Db storage not yet supported by dialog2 - this to be done in future.
445
+
446
+5.11.  db_mode (integer)
447
+
448
+   Db storage not yet supported by dialog2 - this to be done in future.
449
+
450
+5.12.  db_update_period (integer)
451
+
452
+   Db storage not yet supported by dialog2 - this to be done in future.
453
+
454
+5.13.  db_fetch_rows (integer)
455
+
456
+   Db storage not yet supported by dialog2 - this to be done in future.
457
+
458
+5.14.  table_name (string)
459
+
460
+   Db storage not yet supported by dialog2 - this to be done in future.
461
+
462
+5.15.  profiles_with_value (string)
463
+
464
+   List of names for profiles with values.
465
+
466
+   Default value is “empty”.
467
+
468
+   Example 1.8. Set profiles_with_value parameter
469
+...
470
+modparam("dialog", "profiles_with_value", "caller ; my_profile")
471
+...
472
+
473
+5.16.  profiles_no_value (string)
474
+
475
+   List of names for profiles without values.
476
+
477
+   Default value is “empty”.
478
+
479
+   Example 1.9. Set profiles_no_value parameter
480
+...
481
+modparam("dialog", "profiles_no_value", "inbound ; outbound")
482
+...
483
+
484
+5.17.  bridge_controller (string)
485
+
486
+   SIP address to be used in From header when initiating a call bridge.
487
+
488
+   Default value is “sip:controller@kamailio.org”.
489
+
490
+   Example 1.10. Set bridge_controller parameter
491
+...
492
+modparam("dialog", "bridge_controller", "sip:ctd@kamailio.org")
493
+...
494
+
495
+5.18.  initial_cbs_inscript (string)
496
+
497
+   This has been deprecated since dlg_manage has been removed.
498
+
499
+6. Functions
500
+
501
+   6.1. set_dlg_profile(profile,[value])
502
+   6.2. unset_dlg_profile(profile,[value])
503
+   6.3. is_in_profile(profile,[value])
504
+   6.4. get_profile_size(profile,[value],size)
505
+   6.5. dlg_isflagset(flag)
506
+   6.6. dlg_setflag(flag)
507
+   6.7. dlg_resetflag(flag)
508
+   6.8. dlg_terminate
509
+   6.9. dlg_refer(side, address)
510
+   6.10. dlg_manage()
511
+   6.11. dlg_bridge(from, to, op)
512
+   6.12. dlg_get(callid, ftag, ttag)
513
+   6.13. is_known_dlg()
514
+
515
+6.1.  set_dlg_profile(profile,[value])
516
+
517
+   Inserts the current dialog into a profile. Note that if the profile
518
+   does not supports values, this will be silently discarded. Also, there
519
+   is no check for inserting the same dialog in the same profile for
520
+   multiple times.
521
+
522
+   Meaning of the parameters is as follows:
523
+     * profile - name of the profile to be added to;
524
+     * value (optional) - string value to define the belonging of the
525
+       dialog to the profile - note that the profile must support values.
526
+       Pseudo-variables are supported.
527
+
528
+   This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE
529
+   and FAILURE_ROUTE.
530
+
531
+   Example 1.11.  set_dlg_profile usage
532
+...
533
+set_dlg_profile("inbound_call");
534
+set_dlg_profile("caller","$fu");
535
+...
536
+
537
+6.2.  unset_dlg_profile(profile,[value])
538
+
539
+   Removes the current dialog from a profile.
540
+
541
+   Meaning of the parameters is as follows:
542
+     * profile - name of the profile to be removed from;
543
+     * value (optional) - string value to define the belonging of the
544
+       dialog to the profile - note that the profile must support values.
545
+       Pseudo-variables are supported.
546
+
547
+   This function can be used from BRANCH_ROUTE, REPLY_ROUTE and
548
+   FAILURE_ROUTE.
549
+
550
+   Example 1.12.  unset_dlg_profile usage
551
+...
552
+unset_dlg_profile("inbound_call");
553
+unset_dlg_profile("caller","$fu");
554
+...
555
+
556
+6.3.  is_in_profile(profile,[value])
557
+
558
+   Checks if the current dialog belongs to a profile. If the profile
559
+   supports values, the check can be reinforced to take into account a
560
+   specific value - if the dialog was inserted into the profile for a
561
+   specific value. If no value is passed, only the simply belonging of the
562
+   dialog to the profile is checked. Note that if the profile does not
563
+   supports values, this will be silently discarded.
564
+
565
+   Meaning of the parameters is as follows:
566
+     * profile - name of the profile to be checked against;
567
+     * value (optional) - string value to further restrict the check.
568
+       Pseudo-variables are supported.
569
+
570
+   This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE
571
+   and FAILURE_ROUTE.
572
+
573
+   Example 1.13.  is_in_profile usage
574
+...
575
+if (is_in_profile("inbound_call")) {
576
+        log("this request belongs to a inbound call\n");
577
+}
578
+...
579
+if (is_in_profile("caller","XX")) {
580
+        log("this request belongs to a call of user XX\n");
581
+}
582
+...
583
+
584
+6.4.  get_profile_size(profile,[value],size)
585
+
586
+   Returns the number of dialogs belonging to a profile. If the profile
587
+   supports values, the check can be reinforced to take into account a
588
+   specific value - how many dialogs were inserted into the profile with a
589
+   specific value. If no value is passed, only simply belonging of the
590
+   dialog to the profile is checked. Note that if the profile does not
591
+   supports values, this will be silently discarded.
592
+
593
+   Meaning of the parameters is as follows:
594
+     * profile - name of the profile to get the size for;
595
+     * value (optional) - string value to further restrict the check.
596
+       Pseudo-variables are supported;
597
+     * size - an AVP or script variable to return the profile size in.
598
+
599
+   This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE
600
+   and FAILURE_ROUTE.
601
+
602
+   Example 1.14.  get_profile_size usage
603
+...
604
+if(get_profile_size("inbound_call","$avp(size)"))
605
+    xlog("currently there are $avp(size) inbound calls\n");
606
+...
607
+if(get_profile_size("caller","$fu","$avp(size)"))
608
+    xlog("currently, the user $fu has $avp(size) active outgoing calls\n");
609
+...
610
+
611
+6.5.  dlg_isflagset(flag)
612
+
613
+   Check if the dialog flag is set or not.
614
+
615
+   Meaning of the parameters is as follows:
616
+     * flag - index of the flag - can be pseudo-variable.
617
+
618
+   This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
619
+   ONREPLY_ROUTE and FAILURE_ROUTE.
620
+
621
+   Example 1.15.  dlg_isflagset usage
622
+...
623
+if(dlg_isflagset("1"))
624
+{
625
+    ...
626
+}
627
+...
628
+
629
+6.6.  dlg_setflag(flag)
630
+
631
+   Set the dialog flag.
632
+
633
+   Meaning of the parameters is as follows:
634
+     * flag - index of the flag - can be pseudo-variable.
635
+
636
+   This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
637
+   ONREPLY_ROUTE and FAILURE_ROUTE.
638
+
639
+   Example 1.16.  dlg_setflag usage
640
+...
641
+dlg_setflag("1");
642
+...
643
+
644
+6.7.  dlg_resetflag(flag)
645
+
646
+   Reset the dialog flag.
647
+
648
+   Meaning of the parameters is as follows:
649
+     * flag - index of the flag - can be pseudo-variable.
650
+
651
+   This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
652
+   ONREPLY_ROUTE and FAILURE_ROUTE.
653
+
654
+   Example 1.17.  dlg_resetflag usage
655
+...
656
+redlg_setflag("1");
657
+...
658
+
659
+6.8.  dlg_terminate
660
+
661
+   Terminates a dialog. In dialog2 module this function now includes
662
+   support for early as well as confirmed dialogs.
663
+
664
+   Meaning of the parameters is as follows:
665
+     * side - which side to terminate. It can be: caller, callee or both
666
+       of them.
667
+     * reason - reason for termination.
668
+
669
+   This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
670
+   ONREPLY_ROUTE and FAILURE_ROUTE.
671
+
672
+   Example 1.18.  dlg_terminate usage
673
+...
674
+dlg_terminate("all", "Insufficient QoS");
675
+...
676
+
677
+6.9.  dlg_refer(side, address)
678
+
679
+   This function is currently not supported by the dialog2 module. To be
680
+   incorporated in the future.
681
+
682
+6.10.  dlg_manage()
683
+
684
+   This has been deprecated in dialog2. Instead set dialog flag for
685
+   initial INVITE and Route-parameter-callback execution for within-dialog
686
+   requests.
687
+
688
+6.11.  dlg_bridge(from, to, op)
689
+
690
+   This function is currently not supported by the dialog2 module. To be
691
+   incorporated in the future.
692
+
693
+6.12.  dlg_get(callid, ftag, ttag)
694
+
695
+   This function is currently not supported by the dialog2 module. To be
696
+   incorporated in the future.
697
+
698
+6.13.  is_known_dlg()
699
+
700
+   This function is currently not supported by the dialog2 module. To be
701
+   incorporated in the future.
702
+
703
+7. Exported statistics
704
+
705
+   7.1. active_dialogs
706
+   7.2. early_dialogs
707
+   7.3. processed_dialogs
708
+   7.4. expired_dialogs
709
+   7.5. failed_dialogs
710
+
711
+7.1.  active_dialogs
712
+
713
+   This function is currently not supported by the dialog2 module. To be
714
+   incorporated in the future.
715
+
716
+7.2.  early_dialogs
717
+
718
+   This function is currently not supported by the dialog2 module. To be
719
+   incorporated in the future.
720
+
721
+7.3.  processed_dialogs
722
+
723
+   This function is currently not supported by the dialog2 module. To be
724
+   incorporated in the future.
725
+
726
+7.4.  expired_dialogs
727
+
728
+   This function is currently not supported by the dialog2 module. To be
729
+   incorporated in the future.
730
+
731
+7.5.  failed_dialogs
732
+
733
+   This function is currently not supported by the dialog2 module. To be
734
+   incorporated in the future.
735
+
736
+8. MI Commands
737
+
738
+   8.1. dlg_list
739
+   8.2. dlg_list_ctx
740
+   8.3. dlg_end_dlg
741
+   8.4. dlg_terminate_dlg
742
+   8.5. profile_get_size
743
+   8.6. profile_list_dlgs
744
+   8.7. dlg_bridge
745
+
746
+8.1.  dlg_list
747
+
748
+   Lists the description of a dialog or of all dialogs (calls). If only
749
+   one dialogs is to be listed, the dialog identifiers are to be passed as
750
+   parameter (callid and fromtag). In dialog2 module this also now also
751
+   lists all dlg_out entries for early dialogs.
752
+
753
+   Name: dlg_list
754
+
755
+   Parameters:
756
+     * callid (optional) - callid if a single dialog to be listed.
757
+     * from_tag (optional, but cannot be present without the callid
758
+       parameter) - from tag (as per initial request) of the dialog to be
759
+       listed. Note that if the from_tag is not specified, only dialogs
760
+       created by a request without a from tag are matched, which will
761
+       only occur with broken clients and is thus a very rare situation.
762
+
763
+   MI FIFO Command Format:
764
+                :dlg_list:_reply_fifo_file_
765
+                _empty_line_
766
+                :dlg_list:_reply_fifo_file_
767
+                abcdrssfrs122444@192.168.1.1
768
+                AAdfeEFF33
769
+
770
+8.2.  dlg_list_ctx
771
+
772
+   This function is currently not supported by the dialog2 module. To be
773
+   incorporated in the future.
774
+
775
+8.3.  dlg_end_dlg
776
+
777
+   This function is currently not supported by the dialog2 module. To be
778
+   incorporated in the future.
779
+
780
+8.4.  dlg_terminate_dlg
781
+
782
+   Terminates a singe dialog, identified by the call_id, ftag, ttag. In
783
+   dialog2 module this dialog can be terminated in the early or confirmed
784
+   states.
785
+
786
+   Name: dlg_terminate_dlg
787
+
788
+   Parameters:
789
+     * callid - callid of the dialog to be terminated.
790
+     * ftag fromtag of dialog to be terminated.
791
+     * ttag totag of dialog to be terminated.
792
+
793
+   Note: Works for confirmed and early dialogs.
794
+
795
+   MI FIFO Command Format:
796
+                :dlg_terminate_dlg:_reply_fifo_file_
797
+                abcdrssfrs122444@192.168.1.1
798
+                AAdfeEFF33 ftag-1234 t-tag1234
799
+
800
+8.5.  profile_get_size
801
+
802
+   This function is currently not supported by the dialog2 module. To be
803
+   incorporated in the future.
804
+
805
+8.6.  profile_list_dlgs
806
+
807
+   This function is currently not supported by the dialog2 module. To be
808
+   incorporated in the future.
809
+
810
+8.7.  dlg_bridge
811
+
812
+   This function is currently not supported by the dialog2 module. To be
813
+   incorporated in the future.
814
+
815
+9. Exported RPC Functions
816
+
817
+   9.1. dlg.list
818
+   9.2. dlg.list_ctx
819
+   9.3. dlg.dlg_list
820
+   9.4. dlg.dlg_list_ctx
821
+   9.5. dlg.end_dlg
822
+   9.6. dlg.profile_get_size
823
+   9.7. dlg.profile_list
824
+   9.8. dlg.bridge_dlg
825
+
826
+9.1.  dlg.list
827
+
828
+   This function is currently not supported by the dialog2 module. To be
829
+   incorporated in the future.
830
+
831
+9.2.  dlg.list_ctx
832
+
833
+   This function is currently not supported by the dialog2 module. To be
834
+   incorporated in the future.
835
+
836
+9.3.  dlg.dlg_list
837
+
838
+   This function is currently not supported by the dialog2 module. To be
839
+   incorporated in the future.
840
+
841
+9.4.  dlg.dlg_list_ctx
842
+
843
+   This function is currently not supported by the dialog2 module. To be
844
+   incorporated in the future.
845
+
846
+9.5.  dlg.end_dlg
847
+
848
+   This function is currently not supported by the dialog2 module. To be
849
+   incorporated in the future.
850
+
851
+9.6.  dlg.profile_get_size
852
+
853
+   This function is currently not supported by the dialog2 module. To be
854
+   incorporated in the future.
855
+
856
+9.7.  dlg.profile_list
857
+
858
+   This function is currently not supported by the dialog2 module. To be
859
+   incorporated in the future.
860
+
861
+9.8.  dlg.bridge_dlg
862
+
863
+   This function is currently not supported by the dialog2 module. To be
864
+   incorporated in the future.
865
+
866
+10. Exported pseudo-variables
867
+
868
+   10.1. $DLG_count
869
+   10.2. $DLG_status
870
+   10.3. $DLG_lifetime
871
+   10.4. $dlg(...)
872
+   10.5. $dlg_ctx(...)
873
+   10.6. $dlg_var(key)
874
+
875
+10.1.  $DLG_count
876
+
877
+   This function is currently not supported by the dialog2 module. To be
878
+   incorporated in the future.
879
+
880
+10.2.  $DLG_status
881
+
882
+   This function is currently not supported by the dialog2 module. To be
883
+   incorporated in the future.
884
+
885
+10.3.  $DLG_lifetime
886
+
887
+   This function is currently not supported by the dialog2 module. To be
888
+   incorporated in the future.
889
+
890
+10.4.  $dlg(...)
891
+
892
+   This function is currently not supported by the dialog2 module. To be
893
+   incorporated in the future.
894
+
895
+10.5.  $dlg_ctx(...)
896
+
897
+   This function is currently not supported by the dialog2 module. To be
898
+   incorporated in the future.
899
+
900
+10.6.  $dlg_var(key)
901
+
902
+   This function is currently not supported by the dialog2 module. To be
903
+   incorporated in the future.
904
+
905
+Chapter 2. Developer Guide
906
+
907
+   Table of Contents
908
+
909
+   1. Available Functions
910
+
911
+        1.1. register_dlgcb (dialog, type, cb, param, free_param_cb)
912
+        1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs)
913
+        1.3. set_dlg_var (dlg, key, val)
914
+        1.4. get_dlg_var (dlg, key)
915
+        1.5. get_current_dialog ()
916
+
917
+1. Available Functions
918
+
919
+   1.1. register_dlgcb (dialog, type, cb, param, free_param_cb)
920
+   1.2. terminate_dlg (str callid, str ftag, str ttag, hdrs)
921
+   1.3. set_dlg_var (dlg, key, val)
922
+   1.4. get_dlg_var (dlg, key)
923
+   1.5. get_current_dialog ()
924
+
925
+1.1.  register_dlgcb (dialog, type, cb, param, free_param_cb)
926
+
927
+   Register a new callback to the dialog.
928
+
929
+   Meaning of the parameters is as follows:
930
+     * struct dlg_cell* dlg - dialog to register callback to. If maybe
931
+       NULL only for DLGCB_CREATED callback type, which is not a per
932
+       dialog type.
933
+     * int type - types of callbacks; more types may be register for the
934
+       same callback function; only DLGCB_CREATED must be register alone.
935
+       Possible types:
936
+          + DLGCB_LOADED
937
+          + DLGCB_CREATED - called when a new dialog is created - it's a
938
+            global type (not associated to any dialog)
939
+          + DLGCB_FAILED - called when the dialog was negatively replied
940
+            (non-2xx) - it's a per dialog type.
941
+          + DLGCB_CONFIRMED_NA - called when the dialog is confirmed (2xx
942
+            replied) but the setup-concluding ACK message from the caller
943
+            is yet pending - it's a per dialog type.
944
+          + DLGCB_CONFIRMED - called when the dialog is confirmed (2xx
945
+            replied) and the setup-concluding ACK message from the caller
946
+            has been seen - it's a per dialog type.
947
+          + DLGCB_REQ_WITHIN - called when the dialog matches a sequential
948
+            request (excluding setup-concluding ACK messages which are
949
+            handled in DLGCB_CONFIRMED) - it's a per dialog type.
950
+          + DLGCB_TERMINATED - called when the dialog is terminated via
951
+            BYE - it's a per dialog type.
952
+          + DLGCB_TERMINATED_CONFIRMED - called when response to a BYE
953
+            request is received - it's a per dialog type.
954
+          + DLGCB_EXPIRED - called when the dialog expires without
955
+            receiving a BYE - it's a per dialog type.
956
+          + DLGCB_EARLY - called when the dialog is created in an early
957
+            state (18x replied) - it's a per dialog type.
958
+          + DLGCB_RESPONSE_FWDED - called when the dialog matches a reply
959
+            to the initial INVITE request - it's a per dialog type.
960
+          + DLGCB_RESPONSE_WITHIN - called when the dialog matches a reply
961
+            to a subsequent in dialog request - it's a per dialog type.
962
+          + DLGCB_MI_CONTEXT - called when the mi dlg_list_ctx command is
963
+            invoked - it's a per dialog type.
964
+          + DLGCB_SPIRALED - called when the dialog matches a spiraling
965
+            request - it's a per dialog type.
966
+          + DLGCB_DESTROY
967
+     * dialog_cb cb - callback function to be called. Prototype is: “void
968
+       (dialog_cb) (struct dlg_cell* dlg, int type, struct dlg_cb_params *
969
+       params); ”
970
+     * void *param - parameter to be passed to the callback function.
971
+     * param_free callback_param_free - callback function to be called to
972
+       free the param. Prototype is: “void (param_free_cb) (void *param);”
973
+
974
+1.2.  terminate_dlg (str callid, str ftag, str ttag, hdrs)
975
+
976
+   Terminate a Dialog identified by callid, ftag and ttag in early or
977
+   confirmed state.
978
+
979
+   Meaning of parameters is as follows:
980
+     * str* callid - callid of dialog to terminate.
981
+     * str* ftag - from_tag of dialog to terminate.
982
+     * str* ttag - to tag of dialog to terminate.
983
+     * str* hdrs - string containg extra headers (full format) to be added
984
+       to the BYE requests of the dialog.
985
+
986
+1.3.  set_dlg_var (dlg, key, val)
987
+
988
+   Add a variable to the dialog structure
989
+
990
+   Meaning of parameters is as follows:
991
+     * struct dlg_cell* dlg - dialog to add to.
992
+     * str* key - Name of the variable.
993
+     * str* val - Value of the variable.
994
+
995
+1.4.  get_dlg_var (dlg, key)
996
+
997
+   Retrieves a variable attached to the dialog structure
998
+
999
+   Meaning of parameters is as follows:
1000
+     * struct dlg_cell* dlg - dialog to get the variable from.
1001
+     * str* key - Name of the variable.
1002
+
1003
+1.5.  get_current_dialog ()
1004
+
1005
+   Get the current dialog for a message, if exists
1006
+
1007
+Chapter 3. Frequently Asked Questions
1008
+
1009
+   3.1. What happend with “use_tight_match” parameter?
1010
+   3.2. Why is there a dialog2 module and a dialog module?
1011
+   3.3. Where can I find more about Kamailio?
1012
+   3.4. Where can I post a question about this module?
1013
+   3.5. How can I report a bug?
1014
+
1015
+   3.1.
1016
+
1017
+       What happend with “use_tight_match” parameter?
1018
+
1019
+       The parameter was removed with version 1.3 as the option of tight
1020
+       matching became mandatory and not configurable. Now, the tight matching
1021
+       is done all the time (when using DID matching).
1022
+
1023
+   3.2.
1024
+
1025
+       Why is there a dialog2 module and a dialog module?
1026
+
1027
+       The dialog2 module addresses shortcomings in the intial dialog module
1028
+       design. It makes some large changes to the API and therefore must be
1029
+       introduced slowly. It is currently in the early development stages.
1030
+       Eventually the dialog2 module should replace the dialog module.
1031
+
1032
+   3.3.
1033
+
1034
+       Where can I find more about Kamailio?
1035
+
1036
+       Take a look at http://www.kamailio.org/.
1037
+
1038
+   3.4.
1039
+
1040
+       Where can I post a question about this module?
1041
+
1042
+       First at all check if your question was already answered on one of our
1043
+       mailing lists:
1044
+         * User Mailing List -
1045
+           http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
1046
+         * Developer Mailing List -
1047
+           http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
1048
+
1049
+       E-mails regarding any stable Kamailio release should be sent to
1050
+       <sr-users@lists.sip-router.org> and e-mails regarding development
1051
+       versions should be sent to <sr-dev@lists.sip-router.org>.
1052
+
1053
+       If you want to keep the mail private, send it to
1054
+       <sr-users@lists.sip-router.org>.
1055
+
1056
+   3.5.
1057
+
1058
+       How can I report a bug?
1059
+
1060
+       Please follow the guidelines provided at:
1061
+       http://sip-router.org/tracker.
... ...
@@ -13,7 +13,11 @@ LIBS=
13 13
 DEFS += -DOPENSER_MOD_INTERFACE
14 14
 
15 15
 DEFS += -I/usr/include/libxml2
16
-LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
16
+LIBS += -L$(LOCALBASE)/lib -lxml2
17
+
18
+ifneq ($(OS),darwin)
19
+	LIBS += -lrt
20
+endif
17 21
 
18 22
 
19 23
 SERLIBPATH=../../lib
... ...
@@ -49,14 +49,21 @@
49 49
 #include "../../sr_module.h"
50 50
 #include "../../modules/tm/tm_load.h"
51 51
 #include "mod.h"
52
+#ifndef __OS_darwin
52 53
 #include <values.h>
53
-
54
+#endif
54 55
 #include "../../mem/shm_mem.h"
55 56
 
56 57
 #include "../../dset.h"
57 58
 
58 59
 #include "../../timer.h"
59 60
 
61
+#ifdef __OS_darwin
62
+#ifndef MAXINT
63
+#define MAXINT INT_MAX
64
+#endif
65
+#endif
66
+
60 67
 
61 68
 /** S-CSCF list element */ 
62 69
 typedef struct _scscf_entry {
... ...
@@ -12,7 +12,11 @@ LIBS=
12 12
 DEFS += -DOPENSER_MOD_INTERFACE
13 13
 
14 14
 DEFS += -I/usr/include/libxml2
15
-LIBS += -L$(LOCALBASE)/lib -lxml2 -lrt
15
+LIBS += -L$(LOCALBASE)/lib -lxml2
16
+
17
+ifneq ($(OS),darwin)
18
+	LIBS += -lrt
19
+endif
16 20
 
17 21
 SERLIBPATH=../../lib
18 22
 SER_LIBS+=$(SERLIBPATH)/ims/kamailio_ims
... ...
@@ -9,4 +9,7 @@ LIBS=
9 9
 
10 10
 DEFS+=-DKAMAILIO_MOD_INTERFACE
11 11
 
12
+SERLIBPATH=../../lib
13
+SER_LIBS+=$(SERLIBPATH)/srutils/srutils
14
+
12 15
 include ../../Makefile.modules
... ...
@@ -16,7 +16,7 @@ Alex Balashov
16 16
 
17 17
    <abalashov@evaristesys.com>
18 18
 
19
-   Copyright © 2012 asipto.com
19
+   Copyright � 2012 asipto.com
20 20
      __________________________________________________________________
21 21
 
22 22
    Table of Contents
... ...
@@ -32,6 +32,11 @@ Alex Balashov
32 32
         3. Parameters
33 33
 
34 34
               3.1. sipmsg (int)
35
+              3.2. cmap_size (int)
36
+              3.3. timer_interval (int)
37
+              3.4. auth_min_expires (int)
38
+              3.5. auth_max_expires (int)
39
+              3.6. use_path_addr (str)
35 40
 
36 41
         4. Functions
37 42
 
... ...
@@ -42,22 +47,35 @@ Alex Balashov
42 47
               4.5. msrp_set_dst(addr, sock)
43 48
               4.6. msrp_relay_flags(flags)
44 49
               4.7. msrp_reply_flags(flags)
50
+              4.8. msrp_cmap_save()
51
+              4.9. msrp_cmap_lookup()
45 52
 
46 53
         5. Pseudo Variables
47
-        6. Event Routes
48
-        7. Usage
54
+        6. RPC Commands
55
+
56
+              6.1. msrp.cmaplist
57
+