|
@@ -615,6 +615,46 @@ report_capture("report_data", "$ci", "{\"MOS\":4.1,\"PACKET_LOST\":100"});
|
|
|
...
|
|
|
$var(res) = float2int("10.5", "1");
|
|
|
...
|
|
|
+</programlisting>
|
|
|
+ </example>
|
|
|
+ </section>
|
|
|
+ </section>
|
|
|
+
|
|
|
+ <section>
|
|
|
+ <title>Event Routes</title>
|
|
|
+ <section id="sipcapture.ev.request">
|
|
|
+ <title>event_route[sipcapture:request]</title>
|
|
|
+ <para>
|
|
|
+ Event route block to be executed when HEP packet is received. It
|
|
|
+ requires module parameter 'nonsip_hook' to be set to 1.
|
|
|
+ </para>
|
|
|
+ <example>
|
|
|
+ <title>event_route[sipcapture:request] usage</title>
|
|
|
+ <programlisting format="linespecific">
|
|
|
+...
|
|
|
+# new event sipcapture socket
|
|
|
+modparam("sipcapture", "nonsip_hook", 1)
|
|
|
+...
|
|
|
+
|
|
|
+event_route[sipcapture:request] {
|
|
|
+
|
|
|
+ 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) {
|
|
|
+
|
|
|
+ # do parsing internal
|
|
|
+ return 1;
|
|
|
+ } else {
|
|
|
+ # if report lets proceed here with payload
|
|
|
+ xlog("HEP CHUNK PAYLOAD $hep(0x00f) request from $si:$sp\n");
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+...
|
|
|
</programlisting>
|
|
|
</example>
|
|
|
</section>
|