Skip to content
Snippets Groups Projects
  1. Jan 17, 2017
  2. Jan 09, 2017
  3. Jan 08, 2017
  4. Jan 06, 2017
    • Joshua Colp's avatar
      res_pjsip_endpoint_identifier_ip: Add support for SRV lookups. · a7d856cd
      Joshua Colp authored
      This change implements SRV support for the IP based endpoint
      identifier module. All possible addresses through SRV are looked
      up and added as matches. If no SRV records are available a
      fallback to normal host resolution is done. If an IP address
      is provided then no SRV lookup occurs.
      
      This is configured using the "srv_lookups" option on the
      identify section and defaults to "yes".
      
      ASTERISK-26693
      
      Change-Id: I6b641e275bf96629320efa8b479737062aed82ac
      a7d856cd
  5. Jan 05, 2017
  6. Jan 04, 2017
    • George Joseph's avatar
    • Jonathan R. Rose's avatar
      core/pbx: dialplan show - display filename/line# · d96e3502
      Jonathan R. Rose authored
      Adds the ability for extensions to be registered to include filename and
      line number so that dialplan show output can show the filename and line
      number of a config file responsible for generating a given extension.
      
      This only affects config modules that are written to use the new extension
      registering functions. In this patch, that only includes pbx_config, so
      extensions registered in extensions.conf and any included extension will
      be shown in this manner. Extensions registered in this manner will show
      the filename and line number *instead* of the registrar.
      
      ASTERISK-26658 #close
      Reported by: Jonathan R. Rose
      
      Change-Id: Ieccc6abccdff34ed5c7da3511fd24972b8f2dd30
      d96e3502
    • Alexander Traud's avatar
      res_pjsip_session: Access SIPDOMAIN via Dialplan. · aea22858
      Alexander Traud authored
      This feature was available in the SIP channel driver chan_sip. For example,
      Asterisk is the outbound proxy and has to handle all SIP-URIs, even domains not
      local to Asterisk. In that case, SIPDOMAIN is used in the Dialplan, to detect
      and dial remote SIP-URIs. This change here sets the SIP destination domain of
      an inbound call (SIPDOMAIN) in the SIP channel driver res_pjsip as well.
      
      ASTERISK-26670 #close
      
      Change-Id: I27c880dc404a3c1c6792e1ba3545475339577243
      aea22858
    • Alexander Traud's avatar
      chan_sip: Remember SDP negotiation on SIP_CODEC_INBOUND. · e220c11b
      Alexander Traud authored
      After a SIP_CODEC_INBOUND in the dialplan, do not continue with cached formats
      but remember the joint format. Cached formats contain default parameters,
      often create an empty fmtp line. However, a joint format might have passed
      format_get_joint(.) in a res_format_attr_* module (like Opus Codec) and
      contain the resulting format parameters from a SDP negotiation.
      
      ASTERISK-26691 #close
      
      Change-Id: I35712d98a793d4c3efdd156cec57deab9014b1dc
      e220c11b
  7. Jan 03, 2017
    • George Joseph's avatar
      pjproject_bundled: Compile pjsua with max log level = 2 · ceb9dae5
      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
      ceb9dae5
    • Joshua Colp's avatar
      ad8ada00
    • Joshua Colp's avatar
    • Joshua Colp's avatar
      chan_pjsip: Use session for retrieving CHANNEL() information. · ae576529
      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
      ae576529
  8. Jan 01, 2017
  9. Dec 30, 2016
    • George Joseph's avatar
      res_pjsip_refer: Handle compact Refer-To header. · 5a5953f9
      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
      5a5953f9
  10. Dec 23, 2016
    • Richard Mudgett's avatar
      bridge_native_rtp.c: Minor code cleanups. · ac04e63a
      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
      ac04e63a
    • Richard Mudgett's avatar
      bridge_native_rtp.c: Fix native rtp bridge data race. · da6f40c9
      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
      da6f40c9
  11. Dec 22, 2016
    • Richard Mudgett's avatar
      res_rtp_asterisk.c: Fix uninitialized memory crash. · b576b58d
      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
      b576b58d
    • Richard Mudgett's avatar
      acl.c: Improve ast_ouraddrfor() diagnostic messages. · 67cc8499
      Richard Mudgett authored
      * Made not generate strings unless they will actually be used.
      
      ASTERISK-26672
      
      Change-Id: I155fbe7fdff5ce47dfe5326f3baf5446849702c3
      67cc8499
    • Richard Mudgett's avatar
      chan_rtp.c: Fix uninitialized memory crash. · 67b47191
      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
      67b47191
    • Richard Mudgett's avatar
      res_rtp_asterisk.c: Initialize ourip passed to ast_find_ourip(). · 2fc65173
      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
      2fc65173
    • Joshua Colp's avatar
      059a5420
  12. Dec 21, 2016
  13. Dec 20, 2016
  14. Dec 19, 2016
  15. Dec 18, 2016
    • George Joseph's avatar
      pjproject_bundled: Make build single threaded · d29eb3b9
      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
      d29eb3b9
  16. Dec 17, 2016
    • Corey Farrell's avatar
      chan_sip: Reorder unload_module to deal with stuck TCP threads. · 8fbb384e
      Corey Farrell authored
      In some situations TCP threads may become frozen.  This creates the
      possibility that Asterisk could segfault if they become unfrozen after
      chan_sip has been dlclose'd.  This reorders the unload_module process to
      allow abort if threads do not exit within 5 seconds.
      
      High level order as follows:
      1) Unregister from the core to stop new requests.
      2) Signal threads to stop
      3) Clear config based tables (but do not free the table itself).
      4) Verify that threads have shutdown, cancel unload if not.
      5) Clean all remaining resources.
      
      ASTERISK-26586
      
      Change-Id: Ie23692041d838fbd35ece61868f4c640960ff882
      8fbb384e
  17. Dec 16, 2016
    • David M. Lee's avatar
      configure: fix with-pjproject-bundled · 147b8e63
      David M. Lee authored
      The AC_ARG_WITH macro's shell variable is withval; not enableval. Purely
      coincidentally, the option would work when --enable-dev-mode is given.
      
      Also fixed a portability problem with bootstrap.sh, since -printf is not
      a portable option for find.
      
      Change-Id: I0f0e5b1a934b5af5737713834361e9c95b96b376
      147b8e63
  18. Dec 15, 2016
Loading