modules/sipcapture: improve nonsip_hook documentation
authorMikko Lehto <mslehto@iki.fi>
Tue, 25 Jul 2017 12:53:52 +0000 (15:53 +0300)
committerMikko Lehto <mslehto@iki.fi>
Tue, 25 Jul 2017 12:54:57 +0000 (15:54 +0300)
src/modules/sipcapture/doc/sipcapture_admin.xml
src/modules/sipcapture/examples/kamailio.cfg

index 8916317..d9d47cc 100644 (file)
@@ -493,6 +493,26 @@ modparam("sipcapture", "topoh_unmask", 1)
                        </programlisting>
                </example>
        </section>
+
+       <section id="sipcapture.p.nonsip_hook">
+               <title><varname>nonsip_hook</varname> (int)</title>
+               <para>
+               If set to 1, event route <emphasis>sipcapture:siprequest</emphasis> is
+               run when HEP message is received.
+               </para>
+               <para>
+                       Default value is <emphasis>0</emphasis>.
+               </para>
+               <example>
+                       <title>Set <varname>nonsip_hook</varname> parameter</title>
+                       <programlisting format="linespecific">
+...
+modparam("sipcapture", "nonsip_hook", 1)
+...
+                       </programlisting>
+               </example>
+       </section>
+
 </section>     
 <section>
        <title>Functions</title>
index 3d42a78..14a5641 100644 (file)
@@ -861,10 +861,6 @@ route[STORE] {
        sip_capture("$var(a)");
 }
 
-event_route[sipcapture:request] {
-       xlog("received sipcapture request from $si:$sp\r\n");
-}
-
 #!ifdef WITH_HOMER_CUSTOM_STATS
 event_route[xhttp:request] {
         set_reply_close();
@@ -908,12 +904,14 @@ event_route[xhttp:request] {
 
 event_route[sipcapture:request] {
 
-        xlog("HEP Request!\n");
-        xlog("received sipcapture request from $si:$sp\r\n");
-        xlog("HEP VERSION $hep(version) request from $si:$sp\r\n");
-        xlog("HEP CHUNK Source IP $hep(0x002) request from $si:$sp\r\n");
+       xlog("HEP Request!\n");
+       xlog("received sipcapture request from $si:$sp\n");
+       xlog("HEP VERSION $hep(version) request from $si:$sp\n");
+       xlog("HEP CHUNK Source IP $hep(0x002) request from $si:$sp\n");
+
        #Is it SIP ?
-       if($hep(0x00b) == 1){
+       if($hep(0x00b) == 1)
+       {
 
                #Do parsing internal
                return 1;
@@ -921,8 +919,8 @@ event_route[sipcapture:request] {
        else 
        {
                #If report lets proceed here with payload
-               xlog("HEP CHUNK PAYLOAD $hep(0x00f) request from $si:$sp\r\n");
-               return 0;   
+               xlog("HEP CHUNK PAYLOAD $hep(0x00f) request from $si:$sp\n");
+               return 0;
        }
 }