Skip to content
Snippets Groups Projects
  1. Jun 08, 2016
    • Matt Jordan's avatar
      res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loaded · 7f5ca67e
      Matt Jordan authored
      A crash can occur in res_hep_pjsip or res_hep_rtcp if res_hep has not
      loaded and does not have a configuration file. Previously when this
      occurred, checks were put in to see if the configuration was loaded
      successfully. While this is a good idea - and has been added to the
      offending function in res_hep - the reality is res_hep_pjsip and
      res_hep_rtcp have no business running if res_hep isn't also running.
      
      As such, this patch also adds a function to res_hep that returns whether
      or not it successfully loaded. Oddly enough, ast_module_check returns
      "everything is peachy" even if a module declined its load - so it cannot
      be solely relied on. res_hep_pjsip and res_hep_rtcp now also check this
      function to see if they should continue to load; if it fails, they
      decline their load as well.
      
      ASTERISK-26096 #close
      
      Change-Id: I007e535fcc2e51c2ca48534f48c5fc2ac38935ea
      7f5ca67e
  2. May 14, 2016
    • Matt Jordan's avatar
      res_hep: Provide an option to pick the UUID type · e06a2368
      Matt Jordan authored
      At one point in time, it seemed like a good idea to use the Asterisk
      channel name as the HEP correlation UUID. In particular, it felt like
      this would be a useful identifier to tie PJSIP messages and RTCP
      messages together, along with whatever other data we may eventually send
      to Homer. This also had the benefit of keeping the correlation UUID
      channel technology agnostic.
      
      In practice, it isn't as useful as hoped, for two reasons:
      1) The first INVITE request received doesn't have a channel. As a
         result, there is always an 'odd message out', leading it to be
         potentially uncorrelated in Homer.
      2) Other systems sending capture packets (Kamailio) use the SIP Call-ID.
         This causes RTCP information to be uncorrelated to the SIP message
         traffic seen by those capture nodes.
      
      In order to support both (in case someone is trying to use res_hep_rtcp
      with a non-PJSIP channel), this patch adds a new option, uuid_type, with
      two valid values - 'call-id' and 'channel'. The uuid_type option is used
      by a module to determine the preferred UUID type. When available, that
      source of a correlation UUID is used; when not, the more readily available
      source is used.
      
      For res_hep_pjsip:
       - uuid_type = call-id: the module uses the SIP Call-ID header value
       - uuid_type = channel: the module uses the channel name if available,
                              falling back to SIP Call-ID if not
      For res_hep_rtcp:
       - uuid_type = call-id: the module uses the SIP Call-ID header if the
                              channel type is PJSIP and we have a channel,
                              falling back to the Stasis event provided
                              channel name if not
       - uuid_type = channel: the module uses the channel name
      
      ASTERISK-25352 #close
      
      Change-Id: Ide67e59a52d9c806e3cc0a797ea1a4b88a00122c
      e06a2368
  3. Mar 28, 2014
    • Matthew Jordan's avatar
      res_hep/res_hep_pjsip: Add a HEPv3 capture agent module and a logger for PJSIP · ef0c9fe4
      Matthew Jordan authored
      This patch adds the following:
      (1) A new module, res_hep, which implements a generic packet capture agent for
      the Homer Encapsulation Protocol (HEP) version 3. Note that this code is based
      on a patch provided by Alexandr Dubovikov; I basically just wrapped it up,
      added configuration via the configuration framework, and threw in a
      taskprocessor.
      (2) A new module, res_hep_pjsip, which forwards all SIP message traffic that
      passes through the res_pjsip stack over to res_hep for encapsulation and
      transmission to a HEPv3 capture server.
      
      Much thanks to Alexandr for his Asterisk patch for this code and for a *lot*
      of patience waiting for me to port it to 12/trunk. Due to some dithering on
      my part, this has taken the better part of a year to port forward (I still
      blame CDRs for the delay).
      
      ASTERISK-23557 #close
      
      Review: https://reviewboard.asterisk.org/r/3207/
      ........
      
      Merged revisions 411534 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ef0c9fe4
Loading