From Gentle Mosquito, 7 Years ago, written in Plain Text.
- view diff
Embed
  1. capture[pcap] {
  2.  
  3.         # here we can check source/destination IP/port, message size
  4.         if(msg_check("size", "100")) {
  5.  
  6.             #Do parsing
  7.             if(parse_sip()) {
  8.                 #Can be defined many profiles in transport_hep.xml
  9.  
  10.                 if(!send_hep("hepsocket")) {
  11.                     clog("ERROR", "Error sending HEP!!!!");
  12.                 }
  13.  
  14.                 ## ENABLE RTCP Pairing/Correlation from SDP
  15.                 ##
  16.                  if(sip_has_sdp())
  17.                  {
  18.                         #Activate it for RTCP checks
  19.                         if(!check_rtcp_ipport())
  20.                         {
  21.                                 clog("ERROR", "ALREADY EXIST");
  22.                         }
  23.                  }
  24.  
  25.  
  26.  
  27.                 ## Duplicate all INVITEs to JSON transport
  28.                 ##
  29.                 # if(sip_is_method() && sip_check("method","INVITE")) {
  30.                 #    #Can be defined many profiles in transport_json.xml
  31.                 #    if(!send_json("jsonsocket")) {
  32.                 #       clog("ERROR", "Error sending JSON!!!");
  33.                 #    }
  34.                 # }
  35.             }
  36.         }
  37.         drop;
  38.