Skip to content
Snippets Groups Projects
  1. Jan 23, 2017
    • George Joseph's avatar
      ari: Implement 'debug all' and request/response logging · 1d890874
      George Joseph authored
      The 'ari set debug' command has been enhanced to accept 'all' as an
      application name.  This allows dumping of all apps even if an app
      hasn't registered yet.  To accomplish this, a new global_debug global
      variable was added to res/stasis/app.c and new APIs were added to
      set and query the value.
      
      'ari set debug' now displays requests and responses as well as events.
      This required refactoring the existing debug code.
      
      * The implementation for 'ari set debug' was moved from stasis/cli.{c,h}
        to ari/cli.{c,h}, and stasis/cli.{c,h} were deleted.
      * In order to print the body of incoming requests even if a request
        failed, the consumption of the body was moved from the ari stubs
        to ast_ari_callback in res_ari.c and the moustache templates were
        then regenerated.  The body is now passed to ast_ari_invoke and then
        on to the handlers.  This results in code savings since that template
        was inserted multiple times into all the stubs.
      
      An additional change was made to the ao2_str_container implementation
      to add partial key searching and a sort function.  The existing cli
      code assumed it was already there when it wasn't so the tab completion
      was never working.
      
      Change-Id: Ief936f747ce47f1fb14035fbe61152cf766406bf
      1d890874
  2. Jan 14, 2017
    • Richard Mudgett's avatar
      taskprocessor.c: Change when high water warning logged. · 75c8536d
      Richard Mudgett authored
      The task processor queue reached X scheduled tasks message was originally
      intended to get logged only once per task processor to prevent spamming
      the log.  This is no longer necessary since high and low water thresholds
      can better control when the message is logged.
      
      It is beneficial to generate the warning each time a task processor
      reaches the high water level because PJSIP stops processing new requests
      while any high water alert is active.  Without this change you would have
      to enable at least debug level 3 logging to know about a repeated alert
      trigger.
      
      * Made generate the warning message whenever a task is pushed into the
      task processor that triggers the high water alert.
      
      * Appended 'again' to the warning for a repeated high water alert trigger.
      
      Change-Id: Iabf75a004f7edaf1e5e8c323099418e667cac999
      75c8536d
  3. Jan 13, 2017
  4. Jan 12, 2017
    • Aaron An's avatar
      res_rtp_asterisk: Fix bug in function CHANNEL(rtcp, all_rtt) · 6877e626
      Aaron An authored
      Function CHANNEL(rtcp,all_rtt) CHANNEL(rtcp,all_loss) CHANNEL(rtcp,all_jitter)
      always return 0.0 due to wrong define of macro "AST_RTP_SATA_SET" and
      "AST_RTP_STAT_STRCPY".
      It should compare "combined" with "stat" not "current_stat".
      
      ASTERISK-26710 #close
      Reported-by: Aaron An
      Tested-by: AaronAn
      
      Change-Id: Id4140fafbf92e2db689dac5b17d9caa009028a15
      6877e626
  5. Jan 11, 2017
    • George Joseph's avatar
      debug_utilities: Create the ast_coredumper utility · 676865c2
      George Joseph authored
      This utility allows easy manipulation of asterisk coredumps.
      
      * Configurable search paths and patterns for existing coredumps
      * Can generate a consistent coredump from the running instance
      * Can dump the lock_infos table from a coredump
      * Dumps backtraces to separate files...
        - thread apply 1 bt full -> <coredump>.thread1.txt
        - thread apply all bt -> <coredump>.brief.txt
        - thread apply all bt full -> <coredump>.full.txt
        - lock_infos table -> <coredump>.locks.txt
      * Can tarball corefiles and optionally delete them after processing
      * Can tarball results files and optionally delete them after processing
      * Converts ':' in coredump and results file names '-' to facilitate
        uploading.  Jira for instance, won't accept file names with colons
        in them.
      
      Tested on Fedora24+, Ubuntu14+, Debian6+, CentOS6+ and FreeBSD9+[1].
      
      [1] For *BSDs, the "devel/gdb" package might have to be installed to
      get a recent gdb.  The utility will check all instances of gdb
      it finds in $PATH and if one isn't found that can run python, it
      prints a friendly error.
      
      Change-Id: I935d37ab9db85ef923f32b05579897f0893d33cd
      (cherry picked from commit cb47b4556053cd50d9102eef913671ad0306062d)
      676865c2
  6. Jan 09, 2017
  7. Jan 08, 2017
  8. Jan 06, 2017
  9. Jan 05, 2017
  10. Jan 04, 2017
  11. Jan 03, 2017
    • George Joseph's avatar
      pjproject_bundled: Compile pjsua with max log level = 2 · cac644cf
      George Joseph authored
      A while back, we changed config_site.h to set PJ_LOG_MAX_LEVEL = 6.
      This allowed us to control the log level better from inside Asterisk.
      An unfortunate side effect of this was that the pjsua binary and
      python bindings were also compiled with log level set to 6 so whenever
      a testsuite test that uses pjsua runs, it spits out 6795 lines of
      debug in an instant even before the test starts.  I believe this
      overruns the Jenkins capture buffer and prevents the test from
      properly terminating.  In turn, this results in the testsuite just
      hanging until the job is killed.  It's more frequent on the higher
      end agents because they can spit out the messages faster.
      
      Unfortunately, the messages are all spit out before we have control
      of the python pj.Lib instance where we can set logging levels so the
      only alternative was to actually compile pjsua and _pjsua.so with an
      overridden PJ_LOG_MAX_LEVEL.  Although defining a lower max level was
      done in the Makefile, the define in config_site.h had to be wrapped
      with "#ifndef" so the change would take effect.
      
      Change-Id: I2af9e7d48dde1927279c586c9c725d868fe6f3ff
      cac644cf
    • Joshua Colp's avatar
      chan_pjsip: Use session for retrieving CHANNEL() information. · e40016e3
      Joshua Colp authored
      The CHANNEL() dialplan function implementation for PJSIP allows
      querying of PJSIP specific information. This used the channel
      passed in to get the PJSIP session and associated information.
      It is possible for this channel to be masqueraded and end
      up as a different channel type by the time the information
      request is actually acted upon.
      
      This change retrieves the PJSIP session safely and accesses
      data from it (including channel). This provides a guarantee
      that the session and channel will not be altered when the
      request is being acted upon.
      
      ASTERISK-26673
      
      Change-Id: I335e12b89e1820cafdd92b3e7526b8ba649eb7e6
      e40016e3
  12. Jan 01, 2017
  13. Dec 30, 2016
    • George Joseph's avatar
      res_pjsip_refer: Handle compact Refer-To header. · d534dc9d
      George Joseph authored
      refer_incoming_refer_request needed to look for the "r" header as well
      as the "Refer-To" header.
      
      ASTERISK-26655 #close
      patches:
      	refer_compact_fix.diff	submitted by JoshE (license 6075)
      
      Change-Id: I610410a99b02427ea5db887aeb454d5f12c2259f
      d534dc9d
  14. Dec 23, 2016
    • Richard Mudgett's avatar
      bridge_native_rtp.c: Minor code cleanups. · 25f2e8b8
      Richard Mudgett authored
      In native_rtp_bridge_compatible_check()
      
      * Made one variable declaration per line.
      
      * Extracted if test assignment to make the test easier to see.
      
      * Made long if tests easier to see the combinatorial logic.
      
      * Added bridge id to a couple debug messages.
      
      Change-Id: I65bc5732aa7c9a2537f062f106fbea711cf2daad
      25f2e8b8
    • Richard Mudgett's avatar
      bridge_native_rtp.c: Fix native rtp bridge data race. · bf23a46c
      Richard Mudgett authored
      native_rtp_bridge_compatible() didn't lock the bridge channels before
      checking the channels for native bridging ability.  As a result, one of
      the channel's native format capabilities structure got replaced out from
      under the native bridge check.  Use of a stale pointer to freed memory
      causes bad things to happen.
      
      MALLOC_DEBUG, DO_CRASH, and the
      tests/channels/pjsip/transfers/blind_transfer/caller_direct_media
      testsuite test caught this.
      
      * Add missing channel locking in native_rtp_bridge_compatible().
      
      Change-Id: If25fdb3ac8e85563c4857fb8216b3d9dc3d0fa53
      bf23a46c
  15. Dec 22, 2016
    • Richard Mudgett's avatar
      res_rtp_asterisk.c: Fix uninitialized memory crash. · 64edb4e0
      Richard Mudgett authored
      ast_rtp_remote_address_set() could pass an uninitialized 'us' parameter to
      ast_ouraddrfor().  If ast_ouraddrfor() returns an error then the 'us'
      parameter may not get initialized.  Thus when the code tries to save the
      'us' parameter to the local address we could try to copy a ridiculous
      sized memory buffer and segfault.
      
      * Made pass an initialized 'us' parameter to ast_ouraddrfor().
      
      * Optimized out the 'us' struct variable.
      
      ASTERISK-26672 #close
      
      Change-Id: I4acea5dcdf0813da2c7d3e11c2d6067d160d17dc
      64edb4e0
    • Richard Mudgett's avatar
      chan_rtp.c: Fix uninitialized memory crash. · e4d4d9b4
      Richard Mudgett authored
      unicast_rtp_request() could pass an uninitialized 'us' parameter to
      ast_ouraddrfor().  If ast_ouraddrfor() returns an error then the 'us'
      parameter may not get initialized.  Thus when the code tries to save the
      'us' parameter to the local address we could try to copy a ridiculous
      sized memory buffer and segfault.
      
      * Made pass an initialized 'us' parameter to ast_ouraddrfor() and abort
      the UnicastRTP channel request if it fails.
      
      ASTERISK-26672
      
      Change-Id: I1ef7a7c09f4da4f15dcb6de660d2bcac5f2a95c0
      e4d4d9b4
    • Richard Mudgett's avatar
      res_rtp_asterisk.c: Initialize ourip passed to ast_find_ourip(). · aa5be984
      Richard Mudgett authored
      We access uninitialized memory when the 'ourip' parameter does not
      have an initial guess to our IP address.
      
      ASTERISK-26672
      
      Change-Id: I35507ea1ad7455d2be188f6ccdd4add7bd150e15
      aa5be984
    • Richard Mudgett's avatar
      acl.c: Improve ast_ouraddrfor() diagnostic messages. · c70d908d
      Richard Mudgett authored
      * Made not generate strings unless they will actually be used.
      
      ASTERISK-26672
      
      Change-Id: I155fbe7fdff5ce47dfe5326f3baf5446849702c3
      c70d908d
  16. Dec 21, 2016
  17. Dec 20, 2016
  18. Dec 19, 2016
  19. Dec 18, 2016
    • George Joseph's avatar
      pjproject_bundled: Make build single threaded · c89ce118
      George Joseph authored
      There were just too many issues in various environments with
      multi threaded building of pjproject.  It doesn't really speed
      things up anyway since asterisk is already being compiled in
      parallel.
      
      Change-Id: Ie5648fb91bb89b4224b6bf43a0daa1af793c4ce1
      c89ce118
Loading