Skip to content

Commit

Permalink
Merge pull request #736 from adubovikov/master
Browse files Browse the repository at this point in the history
modules/sipcapture: added nonsip_hook support. Now $hep variable available
  • Loading branch information
adubovikov committed Aug 3, 2016
2 parents e769f2e + 4e78938 commit b99dad6
Show file tree
Hide file tree
Showing 4 changed files with 775 additions and 10 deletions.
24 changes: 24 additions & 0 deletions modules/sipcapture/examples/kamailio.cfg
Expand Up @@ -97,6 +97,8 @@ modparam("sipcapture", "capture_on", 1)
modparam("sipcapture", "hep_capture_on", 1)
modparam("sipcapture", "insert_retries", 5)
modparam("sipcapture", "insert_retry_timeout", 10)
#new event sipcapture socket
modparam("sipcapture", "nonsip_hook", 1)
#modparam("sipcapture", "capture_node", "homer01")

#!ifdef WITH_HOMER_GEO
Expand Down Expand Up @@ -902,3 +904,25 @@ event_route[xhttp:request] {
exit;
}
#!endif


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");
#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\r\n");
return 0;
}
}

0 comments on commit b99dad6

Please sign in to comment.