Browse code

modules/sipcapture: fixed function documentation

root authored on 24/01/2016 23:07:07
Showing 2 changed files
... ...
@@ -47,16 +47,21 @@ Alexandr Dubovikov
47 47
               3.18. insert_retry_timeout (integer)
48 48
               3.19. callid_aleg_header (str)
49 49
 
50
-        4. MI Commands
50
+        4. Functions
51 51
 
52
-              4.1. sip_capture
52
+              4.1. sip_capture([table])
53
+              4.2. report_capture([table],[data])
53 54
 
54
-        5. RPC Commands
55
+        5. MI Commands
55 56
 
56
-              5.1. sipcapture.status param
57
+              5.1. sip_capture
57 58
 
58
-        6. Database setup
59
-        7. Limitations
59
+        6. RPC Commands
60
+
61
+              6.1. sipcapture.status param
62
+
63
+        7. Database setup
64
+        8. Limitations
60 65
 
61 66
    List of Examples
62 67
 
... ...
@@ -79,6 +84,8 @@ Alexandr Dubovikov
79 84
    1.17. Set insert_retries parameter
80 85
    1.18. Set insert_retry_timeout parameter
81 86
    1.19. Set callid_aleg_header parameter
87
+   1.20. sip_capture() usage
88
+   1.21. sip_capture() usage
82 89
 
83 90
 Chapter 1. Admin Guide
84 91
 
... ...
@@ -112,16 +119,21 @@ Chapter 1. Admin Guide
112 119
         3.18. insert_retry_timeout (integer)
113 120
         3.19. callid_aleg_header (str)
114 121
 
115
-   4. MI Commands
122
+   4. Functions
123
+
124
+        4.1. sip_capture([table])
125
+        4.2. report_capture([table],[data])
116 126
 
117
-        4.1. sip_capture
127
+   5. MI Commands
118 128
 
119
-   5. RPC Commands
129
+        5.1. sip_capture
120 130
 
121
-        5.1. sipcapture.status param
131
+   6. RPC Commands
122 132
 
123
-   6. Database setup
124
-   7. Limitations
133
+        6.1. sipcapture.status param
134
+
135
+   7. Database setup
136
+   8. Limitations
125 137
 
126 138
 1. Overview
127 139
 
... ...
@@ -433,11 +445,56 @@ modparam("sipcapture", "insert_retry_timeout", 10)
433 445
 modparam("sipcapture", "callid_aleg_header", "X-CallIDALeg")
434 446
 ...
435 447
 
436
-4. MI Commands
448
+4. Functions
449
+
450
+   4.1. sip_capture([table])
451
+   4.2. report_capture([table],[data])
452
+
453
+4.1.  sip_capture([table])
454
+
455
+   Store the current processed HEP/IPIP SIP message in database. It is
456
+   stored in the form prior applying changes made to it.
457
+
458
+   Meaning of the parameters is as follows:
459
+     * table - The table where HEP SIP message will be stored.
460
+
461
+   This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
462
+   ONREPLY_ROUTE, BRANCH_ROUTE.
463
+   Default value is "NULL".
464
+
465
+   Example 1.20. sip_capture() usage
466
+...
467
+sip_capture();
468
+...
469
+sip_capture("sip_capture_call_20160124");
470
+...
471
+
472
+4.2.  report_capture([table],[data])
473
+
474
+   Store the current processed HEP REPORT message in database.
475
+
476
+   Meaning of the parameters is as follows:
477
+     * table - The table where REPORT message will be stored.
478
+       data - The custom report data.
479
+
480
+   This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
481
+   ONREPLY_ROUTE, BRANCH_ROUTE.
482
+   Default value is "NULL".
483
+
484
+   Example 1.21. sip_capture() usage
485
+...
486
+report_capture();
487
+...
488
+report_capture("report_data");
489
+...
490
+report_capture("report_data", "{\"MOS\":4.1,\"PACKET_LOST\":100"});
491
+...
492
+
493
+5. MI Commands
437 494
 
438
-   4.1. sip_capture
495
+   5.1. sip_capture
439 496
 
440
-4.1. sip_capture
497
+5.1.  sip_capture
441 498
 
442 499
    Name: sip_capture
443 500
 
... ...
@@ -455,11 +512,11 @@ modparam("sipcapture", "callid_aleg_header", "X-CallIDALeg")
455 512
                 capture_mode
456 513
                 _empty_line_
457 514
 
458
-5. RPC Commands
515
+6. RPC Commands
459 516
 
460
-   5.1. sipcapture.status param
517
+   6.1. sipcapture.status param
461 518
 
462
-5.1. sipcapture.status param
519
+6.1.  sipcapture.status param
463 520
 
464 521
    Name: sipcapture.status
465 522
 
... ...
@@ -470,7 +527,7 @@ modparam("sipcapture", "callid_aleg_header", "X-CallIDALeg")
470 527
      * “check” does not change sipcapture status, just reports the current
471 528
        status.
472 529
 
473
-6. Database setup
530
+7. Database setup
474 531
 
475 532
    Before running Kamailio with the sipcapture module, you have to setup
476 533
    the database tables where the module will store the data. For that, if
... ...
@@ -480,10 +537,8 @@ modparam("sipcapture", "callid_aleg_header", "X-CallIDALeg")
480 537
    also find the complete database documentation on the project webpage,
481 538
    http://www.kamailio.org/docs/db-tables/kamailio-db-devel.html.
482 539
 
483
-7. Limitations
540
+8. Limitations
484 541
 
485 542
      * 1. Only one capturing mode on RAW socket is supported: IPIP or
486 543
        monitoring/mirroring port. Don't activate both at the same time.
487
-     * 2. By default MySQL doesn't support INSERT DELAYED for partitioning
488
-       table. You can patch MySQL (http://bugs.mysql.com/bug.php?id=50393)
489
-     * 3. Mirroring port capturing works only on Linux.
544
+     * 2. Mirroring port capturing works only on Linux.
... ...
@@ -476,6 +476,81 @@ modparam("sipcapture", "callid_aleg_header", "X-CallIDALeg")
476 476
 		</example>
477 477
 	</section>
478 478
 </section>	
479
+<section>
480
+	<title>Functions</title>
481
+	<section id="sipcapture.f.sip_capture">
482
+		<title>
483
+		<function moreinfo="none">sip_capture([table])</function>
484
+		</title>
485
+		<para>
486
+		Store the current processed HEP/IPIP SIP message in database. It is stored in the
487
+		form prior applying changes made to it.
488
+		</para>
489
+		<para>Meaning of the parameters is as follows:</para>
490
+		<itemizedlist>
491
+		<listitem>
492
+		<para><emphasis>table</emphasis> - The table where HEP SIP message will be stored.		
493
+		</para>
494
+		</listitem>
495
+		</itemizedlist>
496
+		<para>
497
+		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
498
+		ONREPLY_ROUTE, BRANCH_ROUTE.
499
+		</para>
500
+		<emphasis>
501
+			Default value is "NULL".
502
+		</emphasis>
503
+		<example>
504
+		<title><function>sip_capture()</function> usage</title>
505
+		<programlisting format="linespecific">
506
+...
507
+sip_capture();
508
+...
509
+sip_capture("sip_capture_call_20160124");
510
+...
511
+</programlisting>
512
+		</example>
513
+	</section>
514
+	<section id="sipcapture.f.report_capture">
515
+		<title>
516
+		<function moreinfo="none">report_capture([table],[data])</function>
517
+		</title>
518
+		<para>
519
+		Store the current processed HEP REPORT message in database. 
520
+		</para>
521
+		<para>Meaning of the parameters is as follows:</para>
522
+		<itemizedlist>
523
+		<listitem>
524
+		<para><emphasis>table</emphasis> - The table where REPORT message will be stored.
525
+		</para>
526
+		<para><emphasis>data</emphasis> - The custom report data.
527
+		</para>
528
+		</listitem>
529
+		</itemizedlist>
530
+		<para>
531
+		This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
532
+		ONREPLY_ROUTE, BRANCH_ROUTE.
533
+		</para>
534
+		<emphasis>
535
+			Default value is "NULL".
536
+		</emphasis>
537
+		<example>
538
+		<title><function>sip_capture()</function> usage</title>
539
+		<programlisting format="linespecific">
540
+...
541
+report_capture();
542
+...
543
+report_capture("report_data");
544
+...
545
+report_capture("report_data", "{\"MOS\":4.1,\"PACKET_LOST\":100"});
546
+...
547
+</programlisting>
548
+		</example>
549
+	</section>
550
+	
551
+	</section>
552
+
553
+
479 554
     <section>
480 555
 	<title>MI Commands</title>
481 556
 	<section id="sipcapture.m.sip_capture">
... ...
@@ -559,11 +634,9 @@ modparam("sipcapture", "callid_aleg_header", "X-CallIDALeg")
559 634
 		<listitem>
560 635
 		1. Only one capturing mode on RAW socket is supported: IPIP or monitoring/mirroring port. 
561 636
 		   Don't activate both at the same time.
562
-		</listitem><listitem>
563
-		2. By default MySQL doesn't support INSERT DELAYED for partitioning table. You can patch MySQL 
564
-		  (http://bugs.mysql.com/bug.php?id=50393)
565
-		</listitem><listitem>
566
-		3. Mirroring port capturing works only on Linux.
637
+		</listitem>
638
+		<listitem>
639
+		2. Mirroring port capturing works only on Linux.
567 640
 		</listitem>
568 641
         </itemizedlist>
569 642
         </section>