Browse code

modules: readme files regenerated - dispatcher ... [skip ci]

Kamailio Dev authored on 10/01/2019 22:16:36
Showing 2 changed files
... ...
@@ -1407,7 +1407,7 @@ DEST: {
1407 1407
    destination is active and it is tested by SIP options continuously. X
1408 1408
    means that there are no probing or sip pinging. So AX means that
1409 1409
    destination is assumed as active and it is not tested by SIP options.
1410
-   DX respectively is disabled destination what is not tested and etc.
1410
+   DX respectively is disabled destination that is not tested, etc.
1411 1411
 
1412 1412
 5.3.  dispatcher.reload
1413 1413
 
... ...
@@ -1,517 +1,2 @@
1
-SDPOPS Module
2 1
 
3
-Daniel-Constantin Mierla
4 2
 
5
-   <miconda@gmail.com>
6
-
7
-Edited by
8
-
9
-Daniel-Constantin Mierla
10
-
11
-   <miconda@gmail.com>
12
-
13
-   Copyright © 2011 asipto.com
14
-     __________________________________________________________________
15
-
16
-   Table of Contents
17
-
18
-   1. Admin Guide
19
-
20
-        1. Overview
21
-        2. Dependencies
22
-
23
-              2.1. Kamailio Modules
24
-              2.2. External Libraries or Applications
25
-
26
-        3. Parameters
27
-        4. Functions
28
-
29
-              4.1. sdp_remove_codecs_by_id(list [, mtype])
30
-              4.2. sdp_remove_codecs_by_name(list [, mtype])
31
-              4.3. sdp_remove_line_by_prefix(string [, mtype])
32
-              4.4. sdp_keep_codecs_by_id(list [, mtype])
33
-              4.5. sdp_keep_codecs_by_name(list [, mtype])
34
-              4.6. sdp_with_media(type)
35
-              4.7. sdp_with_active_media(type)
36
-              4.8. sdp_remove_media(type)
37
-              4.9. sdp_with_transport(type)
38
-              4.10. sdp_with_transport_like(type)
39
-              4.11. sdp_transport(pv)
40
-              4.12. sdp_remove_transport(type)
41
-              4.13. sdp_with_codecs_by_id(list)
42
-              4.14. sdp_with_codecs_by_name(list)
43
-              4.15. sdp_print(level)
44
-              4.16. sdp_get(avpvar)
45
-              4.17. sdp_content([sloppy])
46
-              4.18. sdp_with_ice()
47
-              4.19. sdp_get_line_startswith(avpvar, string)
48
-
49
-        5. Exported Variables
50
-
51
-              5.1. $sdp( )
52
-
53
-   List of Examples
54
-
55
-   1.1. sdp_remove_codecs_by_id usage
56
-   1.2. sdp_remove_codecs_by_name usage
57
-   1.3. sdp_remove_line_by_prefix usage
58
-   1.4. sdp_keep_codecs_by_id usage
59
-   1.5. sdp_keep_codecs_by_name usage
60
-   1.6. sdp_with_media usage
61
-   1.7. sdp_with_active_media usage
62
-   1.8. sdp_remove_media usage
63
-   1.9. sdp_with_transport usage
64
-   1.10. sdp_with_transport_like usage
65
-   1.11. sdp_transport usage
66
-   1.12. sdp_remove_transport usage
67
-   1.13. sdp_with_codecs_by_id usage
68
-   1.14. sdp_with_codecs_by_name usage
69
-   1.15. sdp_print usage
70
-   1.16. sdp_get usage
71
-   1.17. sdp_content usage
72
-   1.18. sdp_with_ice usage
73
-   1.19. sdp_get_line_startswith usage
74
-
75
-Chapter 1. Admin Guide
76
-
77
-   Table of Contents
78
-
79
-   1. Overview
80
-   2. Dependencies
81
-
82
-        2.1. Kamailio Modules
83
-        2.2. External Libraries or Applications
84
-
85
-   3. Parameters
86
-   4. Functions
87
-
88
-        4.1. sdp_remove_codecs_by_id(list [, mtype])
89
-        4.2. sdp_remove_codecs_by_name(list [, mtype])
90
-        4.3. sdp_remove_line_by_prefix(string [, mtype])
91
-        4.4. sdp_keep_codecs_by_id(list [, mtype])
92
-        4.5. sdp_keep_codecs_by_name(list [, mtype])
93
-        4.6. sdp_with_media(type)
94
-        4.7. sdp_with_active_media(type)
95
-        4.8. sdp_remove_media(type)
96
-        4.9. sdp_with_transport(type)
97
-        4.10. sdp_with_transport_like(type)
98
-        4.11. sdp_transport(pv)
99
-        4.12. sdp_remove_transport(type)
100
-        4.13. sdp_with_codecs_by_id(list)
101
-        4.14. sdp_with_codecs_by_name(list)
102
-        4.15. sdp_print(level)
103
-        4.16. sdp_get(avpvar)
104
-        4.17. sdp_content([sloppy])
105
-        4.18. sdp_with_ice()
106
-        4.19. sdp_get_line_startswith(avpvar, string)
107
-
108
-   5. Exported Variables
109
-
110
-        5.1. $sdp( )
111
-
112
-1. Overview
113
-
114
-   This module provides functions for checking and managing the SDP
115
-   payloads of SIP messages.
116
-
117
-   Examples of functions this module offers: remove codecs from SDP, check
118
-   the media stream types and return attributes of SDP document. For the
119
-   full list of the features provided by this module and the
120
-   implementation state, please read the list of exported functions.
121
-
122
-2. Dependencies
123
-
124
-   2.1. Kamailio Modules
125
-   2.2. External Libraries or Applications
126
-
127
-2.1. Kamailio Modules
128
-
129
-   The following modules must be loaded before this module:
130
-     * none.
131
-
132
-2.2. External Libraries or Applications
133
-
134
-   The following libraries or applications must be installed before
135
-   running Kamailio with this module loaded:
136
-     * None
137
-
138
-3. Parameters
139
-
140
-   The module does not export any config parameters yet.
141
-
142
-4. Functions
143
-
144
-   4.1. sdp_remove_codecs_by_id(list [, mtype])
145
-   4.2. sdp_remove_codecs_by_name(list [, mtype])
146
-   4.3. sdp_remove_line_by_prefix(string [, mtype])
147
-   4.4. sdp_keep_codecs_by_id(list [, mtype])
148
-   4.5. sdp_keep_codecs_by_name(list [, mtype])
149
-   4.6. sdp_with_media(type)
150
-   4.7. sdp_with_active_media(type)
151
-   4.8. sdp_remove_media(type)
152
-   4.9. sdp_with_transport(type)
153
-   4.10. sdp_with_transport_like(type)
154
-   4.11. sdp_transport(pv)
155
-   4.12. sdp_remove_transport(type)
156
-   4.13. sdp_with_codecs_by_id(list)
157
-   4.14. sdp_with_codecs_by_name(list)
158
-   4.15. sdp_print(level)
159
-   4.16. sdp_get(avpvar)
160
-   4.17. sdp_content([sloppy])
161
-   4.18. sdp_with_ice()
162
-   4.19. sdp_get_line_startswith(avpvar, string)
163
-
164
-4.1.  sdp_remove_codecs_by_id(list [, mtype])
165
-
166
-   Remove the codecs provided in the parameter 'list' from all media
167
-   streams found in SDP payload. The parameter 'list' must be one item or
168
-   a comma separated list of numeric codec IDs. The parameter can be a
169
-   static string or a variable holding the list of numeric codec IDs.
170
-
171
-   This function can be used from ANY_ROUTE.
172
-
173
-   Example 1.1. sdp_remove_codecs_by_id usage
174
-...
175
-# remove PCMU
176
-sdp_remove_codecs_by_id("0");
177
-# remove PCMU, PCMA and GSM
178
-sdp_remove_codecs_by_id("0,8,3");
179
-sdp_remove_codecs_by_id("17", "audio");
180
-sdp_remove_codecs_by_id("23", "video");
181
-...
182
-
183
-4.2.  sdp_remove_codecs_by_name(list [, mtype])
184
-
185
-   Remove the codecs provided in the parameter 'list' from all media
186
-   streams found in SDP payload. The parameter 'list' must be one item or
187
-   a comma separated list of codec names. The parameter can be a static
188
-   string or a variable holding the list of codec names.
189
-
190
-   Optional parameter mtype can be provided to apply the operations only
191
-   to the streams matching m=mtype.
192
-
193
-   This function can be used from ANY_ROUTE.
194
-
195
-   Example 1.2. sdp_remove_codecs_by_name usage
196
-...
197
-# remove PCMU
198
-sdp_remove_codecs_by_name("PCMU");
199
-# remove PCMU, PCMA and GSM
200
-sdp_remove_codecs_by_name("PCMU,PCMA,GSM");
201
-...
202
-
203
-4.3.  sdp_remove_line_by_prefix(string [, mtype])
204
-
205
-   Remove all SDP attribute lines beginning with 'string' in all media
206
-   streams.
207
-
208
-   Optional parameter mtype can be provided to apply the operations only
209
-   to the streams matching m=mtype.
210
-
211
-   This function can be used from ANY_ROUTE.
212
-
213
-   Example 1.3. sdp_remove_line_by_prefix usage
214
-...
215
-if ($si == "2001:DB8::8:800:200C:417A"
216
-        and ( has_body("application/sdp") or has_body("multipart/mixed")))
217
-{
218
-    xlog("L_INFO", "Cleaning ugly SDP from $si\n");
219
-    sdp_remove_codecs_by_name("X-NSE");
220
-    sdp_remove_line_by_prefix("a=X-");
221
-}
222
-
223
-...
224
-
225
-4.4.  sdp_keep_codecs_by_id(list [, mtype])
226
-
227
-   Keep only the codecs provided in the parameter 'list' from all media
228
-   streams found in SDP payload. The parameter 'list' must be one item or
229
-   a comma separated list of numeric codec IDs. The parameter can be a
230
-   static string or a variable holding the list of numeric codec IDs.
231
-
232
-   Optional parameter mtype can be provided to apply the operations only
233
-   to the streams matching m=mtype.
234
-
235
-   This function can be used from ANY_ROUTE.
236
-
237
-   Example 1.4. sdp_keep_codecs_by_id usage
238
-...
239
-# keep only PCMU
240
-sdp_keep_codecs_by_id("0");
241
-# keep PCMU, PCMA and GSM in audio stream
242
-sdp_keep_codecs_by_id("0,8,3", "audio");
243
-...
244
-
245
-4.5.  sdp_keep_codecs_by_name(list [, mtype])
246
-
247
-   Keep only the codecs provided in the parameter 'list' from all media
248
-   streams found in SDP payload. The parameter 'list' must be one or a
249
-   comma separated list of codec names. The parameter can be a static
250
-   string or a variable holding the list of codec names.
251
-
252
-   Note that you have to explicitly keep 'telephone-event' in the list of
253
-   names if you want to keep DTMF attributes.
254
-
255
-   Optional parameter mtype can be provided to apply the operations only
256
-   to the streams matching m=mtype.
257
-
258
-   This function can be used from ANY_ROUTE.
259
-
260
-   Example 1.5. sdp_keep_codecs_by_name usage
261
-...
262
-# keep only PCMU
263
-sdp_keep_codecs_by_name("PCMU");
264
-# keep PCMU, PCMA and GSM
265
-sdp_keep_codecs_by_name("PCMU,PCMA,GSM");
266
-...
267
-
268
-4.6.  sdp_with_media(type)
269
-
270
-   Return true of the SDP has 'media=type ...' line. Useful to check the
271
-   content of the RTP sessions, such as 'audio' or 'video'. The parameter
272
-   can be static string or variable holding the media type.
273
-
274
-   This function can be used from ANY_ROUTE.
275
-
276
-   Example 1.6. sdp_with_media usage
277
-...
278
-# check for video stream
279
-if(sdp_with_media("video"))
280
-{
281
-    # the session has a video stream
282
-}
283
-...
284
-
285
-4.7.  sdp_with_active_media(type)
286
-
287
-   Return true of the SDP has 'media=type ...' line and the media is
288
-   active. Useful to check the content of the RTP sessions, such as
289
-   'audio' or 'video'. Active media means the port is non-zero and the
290
-   direction is not "inactive" The parameter can be static string or
291
-   variable holding the media type.
292
-
293
-   This function can be used from ANY_ROUTE.
294
-
295
-   Example 1.7. sdp_with_active_media usage
296
-...
297
-# check for active video stream
298
-if(sdp_with_active_media("video"))
299
-{
300
-    # the session has an active video stream
301
-}
302
-...
303
-
304
-4.8.  sdp_remove_media(type)
305
-
306
-   Remove the streams that match on 'm=type ...' line. The parameter can
307
-   be static string or variable holding the media type.
308
-
309
-   Note: If this is executed on a request, the callee should reply without
310
-   the Media too. However, RFC 3264 mandates, that the reply should
311
-   contain the exact same number of "m=" lines as the request.
312
-
313
-
314
-     6 Generating the Answer
315
-
316
-     [...]
317
-
318
-     For each "m=" line in the offer, there MUST be a corresponding "m="
319
-     line in the answer. The answer MUST contain exactly the same number of
320
-     "m=" lines as the offer. This allows for streams to be matched up based
321
-     on their order. This implies that if the offer contained zero "m="
322
-     lines, the answer MUST contain zero "m=" lines.
323
-
324
-                                                                  --RFC 3264
325
-
326
-   So this may not work with all Endpoints, especially if they follow RFC
327
-   3264 precisely (e.g. JSSIP).
328
-
329
-   This function can be used from ANY_ROUTE.
330
-
331
-   Example 1.8. sdp_remove_media usage
332
-...
333
-# remove video stream
334
-sdp_remove_media("video");
335
-...
336
-
337
-4.9.  sdp_with_transport(type)
338
-
339
-   Return true of the SDP has 'media=media port type ...' line. Useful to
340
-   check the transport of the RTP sessions, such as 'RTP/AVP', 'RTP/SAVP',
341
-   'RTP/SAVPF' or 'UDP/TLS/RTP/SAVPF'. The parameter can be static string
342
-   or variable holding the transport type. The function does an exact
343
-   match of the strings.
344
-
345
-   This function can be used from ANY_ROUTE.
346
-
347
-   Example 1.9. sdp_with_transport usage
348
-...
349
-# check for RTP/SAVP stream
350
-if(sdp_with_transport("UDP/TLS/RTP/SAVPF"))
351
-{
352
-    # the session has a UDP/TLS/RTP/SAVPF stream
353
-}
354
-...
355
-
356
-4.10.  sdp_with_transport_like(type)
357
-
358
-   Returns true if the SDP has 'media=media port type ...' line, where
359
-   type contains the string in the parameter. The parameter can be static
360
-   string or variable holding a string.
361
-
362
-   This function can be used from ANY_ROUTE.
363
-
364
-   Example 1.10. sdp_with_transport_like usage
365
-...
366
-# check for SAVPF stream
367
-if(sdp_with_transport_like("SAVPF"))
368
-{
369
-    # the session has a SAVPF stream, e.g., RTP/SAVPF or UDP/TLS/RTP/SAVPF
370
-}
371
-...
372
-
373
-4.11.  sdp_transport(pv)
374
-
375
-   Assigns common media transport (if any) of 'm' lines to pv argument.
376
-   Returns 1 if common media transport was found, -2 if there was no
377
-   common media transport, and -1 in case of error.
378
-
379
-   This function can be used from ANY_ROUTE.
380
-
381
-   Example 1.11. sdp_transport usage
382
-...
383
-sdp_transport("$avp(caller_rtp_transport)");
384
-...
385
-
386
-4.12.  sdp_remove_transport(type)
387
-
388
-   Remove the streams that match on 'm=media port type ...' line. The
389
-   parameter can be static string or variable holding the transport type.
390
-
391
-   This function can be used from ANY_ROUTE.
392
-
393
-   Example 1.12. sdp_remove_transport usage
394
-...
395
-# remove stream with transport RTP/AVP
396
-sdp_remove_transport("RTP/AVP");
397
-...
398
-
399
-4.13.  sdp_with_codecs_by_id(list)
400
-
401
-   Returns true if any of the codecs provided in the parameter 'list' from
402
-   all media streams is found in SDP payload. The parameter 'list' must be
403
-   one or a comma separated list of numeric codec IDs. The parameter can
404
-   be a static string or a variable holding the list of numeric codec IDs.
405
-
406
-   This function can be used from ANY_ROUTE.
407
-
408
-   Example 1.13. sdp_with_codecs_by_id usage
409
-...
410
-# test for PCMU
411
-if(sdp_with_codecs_by_id("0")) { ... }
412
-# test for PCMU, PCMA or GSM
413
-if(sdp_with_codecs_by_id("0,8,3")) { ... }
414
-...
415
-
416
-4.14.  sdp_with_codecs_by_name(list)
417
-
418
-   Returns true if any of the codecs provided in the parameter 'list' from
419
-   all media streams is found in SDP payload. The parameter 'list' must be
420
-   one item or a comma separated list of codec names. The parameter can be
421
-   a static string or a variable holding the list of codec names.
422
-
423
-   This function can be used from ANY_ROUTE.
424
-
425
-   Example 1.14. sdp_with_codecs_by_name usage
426
-...
427
-# test for PCMU
428
-if(sdp_with_codecs_by_name("PCMU")) { ... }
429
-# test for PCMU, PCMA or GSM
430
-if(sdp_with_codecs_by_name("PCMU,PCMA,GSM")) { ... }
431
-...
432
-
433
-4.15.  sdp_print(level)
434
-
435
-   Print the SDP internal structure to log 'level'. The parameter can be
436
-   static integer or variable holding the integer value of the log level.
437
-
438
-   This function can be used from ANY_ROUTE.
439
-
440
-   Example 1.15. sdp_print usage
441
-...
442
-# print the SDP
443
-sdp_print("1");
444
-...
445
-
446
-4.16.  sdp_get(avpvar)
447
-
448
-   Store the SDP part of message body in an AVP. Return 1 if SDP is found,
449
-   -1 on error and -2 if there is no SDP part in the message body.
450
-
451
-   This function can be used from ANY_ROUTE.
452
-
453
-   Example 1.16. sdp_get usage
454
-...
455
-sdp_get("$avp(sdp)");
456
-...
457
-
458
-4.17.  sdp_content([sloppy])
459
-
460
-   Return true if the SIP message has SDP body or a SDP part in body. If
461
-   an argument is given, the function does not parse message body, but
462
-   returns true if Content-Type is "application/sdp" or if that string
463
-   exists in "multipart/mixed" body.
464
-
465
-   This function can be used from ANY_ROUTE.
466
-
467
-   Example 1.17. sdp_content usage
468
-...
469
-if(sdp_content()) {
470
-    ...
471
-}
472
-...
473
-
474
-4.18.  sdp_with_ice()
475
-
476
-   Return true if the SIP message has SDP body that contains ICE candidate
477
-   attribute(s).
478
-
479
-   This function can be used from ANY_ROUTE.
480
-
481
-   Example 1.18. sdp_with_ice usage
482
-...
483
-if(sdp_with_ice()) {
484
-    ...
485
-}
486
-...
487
-
488
-4.19.  sdp_get_line_startswith(avpvar, string)
489
-
490
-   Store the search part of SDP body message with line beginning with
491
-   'string' in an AVP. Return 1 if 'string' is found in SDP, -1 on error
492
-   and -2 if there is no SDP part in the message body. The second
493
-   parameter can contain pseudo-variables.
494
-
495
-   This function can be used from ANY_ROUTE.
496
-
497
-   Example 1.19. sdp_get_line_startswith usage
498
-...
499
-if(sdp_get_line_startswith("$avp(mline)", "m=")) {
500
-        xlog("m-line: $avp(mline)\n");
501
-}
502
-...
503
-
504
-5. Exported Variables
505
-
506
-   5.1. $sdp( )
507
-
508
-5.1. $sdp( )
509
-
510
-   Access to SDP attributes
511
-     * $sdp(body) - full SDP body (read only)
512
-     * $sdp(sess_version) - sess-version -attribute from SDP o= -line.
513
-       When set to special value -1, current value is incremented. (read +
514
-       write)
515
-
516
-   Exported pseudo-variables are also documented at
517
-   https://www.kamailio.org/wiki/