Skip to content

Commit

Permalink
sipcapture: documentation for event routes
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 5, 2017
1 parent 765a4d9 commit 8400eb3
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/modules/sipcapture/doc/sipcapture_admin.xml
Expand Up @@ -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>
Expand Down

0 comments on commit 8400eb3

Please sign in to comment.