Skip to content
Snippets Groups Projects
  1. Dec 01, 2017
    • George Joseph's avatar
      AST-2017-013: chan_skinny: Call pthread_detach when sess threads end · 075faac2
      George Joseph authored
      chan_skinny creates a new thread for each new session.  In trying
      to be a good cleanup citizen, the threads are joinable and the
      unload_module function does a pthread_cancel() and a pthread_join()
      on any sessions that are active at that time.  This has an
      unintended side effect though. Since you can call pthread_join on a
      thread that's already terminated, pthreads keeps the thread's
      storage around until you explicitly call pthread_join (or
      pthread_detach()).   Since only the module_unload function was
      calling pthread_join, and even then only on the ones active at the
      tme, the storage for every thread/session ever created sticks
      around until asterisk exits.
      
      * A thread can detach itself so the session_destroy() function
        now calls pthread_detach() just before it frees the session
        memory allocation.  The module_unload function still takes care
        of the ones that are still active should the module be unloaded.
      
      ASTERISK-27452
      Reported by: Juan Sacco
      
      Change-Id: I9af7268eba14bf76960566f891320f97b974e6dd
      (cherry picked from commit 8f5dff54)
      075faac2
  2. Nov 21, 2017
  3. Nov 15, 2017
  4. Nov 11, 2017
    • Richard Mudgett's avatar
      core: Add cache_media_frames debugging option. · 90bb0a3e
      Richard Mudgett authored
      The media frame cache gets in the way of finding use after free errors of
      media frames.  Tools like valgrind and MALLOC_DEBUG don't know when a
      frame is released because it gets put into the cache instead of being
      freed.
      
      * Added the "cache_media_frames" option to asterisk.conf.  Disabling the
      option helps track down media frame mismanagement when using valgrind or
      MALLOC_DEBUG.  The cache gets in the way of determining if the frame is
      used after free and who freed it.  NOTE: This option has no effect when
      Asterisk is compiled with the LOW_MEMORY compile time option enabled
      because the cache code does not exist.
      
      To disable the media frame cache simply disable the cache_media_frames
      option in asterisk.conf and restart Asterisk.
      
      Sample asterisk.conf setting:
      [options]
      cache_media_frames=no
      
      ASTERISK-27413
      
      Change-Id: I0ab2ce0f4547cccf2eb214901835c2d951b78c00
      90bb0a3e
  5. Nov 09, 2017
  6. Nov 06, 2017
    • Sean Bright's avatar
      dtls: Add support for ephemeral DTLS certificates. · 04d3785a
      Sean Bright authored
      This mimics the behavior of Chrome and Firefox and creates an ephemeral
      X.509 certificate for each DTLS session.
      
      Currently, the only supported key type is ECDSA because of its faster
      generation time, but other key types can be added in the future as
      necessary.
      
      ASTERISK-27395
      
      Change-Id: I5122e5f4b83c6320cc17407a187fcf491daf30b4
      04d3785a
  7. Nov 02, 2017
  8. Oct 24, 2017
    • Corey Farrell's avatar
      chan_sip: Fix SUBSCRIBE with missing "Expires" header. · 6474de5f
      Corey Farrell authored
      When chan_sip receives a SUBSCRIBE request with no "Expires" header it
      processes the request as an unsubscribe.  This is incorrect, per RFC3264
      when the "Expires" header is missing a default expiry should be used.
      
      ASTERISK-18140
      
      Change-Id: Ibf6dcd4fdd07a32c2bc38be1dd557981f08188b5
      6474de5f
  9. Oct 21, 2017
  10. Oct 18, 2017
    • Corey Farrell's avatar
      chan_sip: Fix output of 'sip set debug off'. · c9e19b31
      Corey Farrell authored
      When sip.conf contains 'sipdebug=yes' it is impossible to disable it
      using CLI 'sip set debug off'.  This corrects the output of that CLI
      command to instruct the user to turn sipdebug off in the configuration
      file.
      
      ASTERISK-23462 #close
      
      Change-Id: I1cceade9caa9578e1b060feb832e3495ef5ad318
      c9e19b31
  11. Oct 14, 2017
    • Guido Falsi's avatar
      chan_dahdi: wrap include file which is not present on BSD systems in #ifdef · c4f40b77
      Guido Falsi authored
      The sys/sysmacros.h include file does not exist in BSD systems and
      is not required to build this module there.
      Since an "#if defined(__NetBSD__) || defined(__FreeBSD__)" section
      already exist I moved that include line inside it's #else branch.
      
      ASTERISK-27343 #close
      
      Change-Id: Ibfb64f4e9a0ce8b6eda7a7695cfe57916f175dc1
      c4f40b77
  12. Oct 11, 2017
    • George Joseph's avatar
      chan_vpb: Fix a gcc 7 out-of-bounds complaint · ab4d3653
      George Joseph authored
      chan_vpb was trying to use sizeof(*p->play_dtmf), where
      p->play_dtmf is defined as char[16], to get the length of the array
      but since p->play_dtmf is an actual array, sizeof(*p->play_dtmf)
      returns the size of the first array element, which is 1.  gcc7
      validly complains because the context in which it's used could
      cause an out-of-bounds condition.
      
      Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba
      ab4d3653
  13. Oct 05, 2017
    • Daniel Tryba's avatar
      res_pjsip_caller_id chan_sip: Comply to RFC 3323 values for privacy · 59b6e846
      Daniel Tryba authored
      Currently privacy requests are only granted if the Privacy header
      value is exactly "id" (defined in RFC 3325). It ignores any other
      possible value (or a combination there of). This patch reverses the
      logic from testing for "id" to grant privacy, to testing for "none" and
      granting privacy for any other value. "none" must not be used in
      combination with any other value (RFC 3323 section 4.2).
      
      ASTERISK-27284 #close
      
      Change-Id: If438a21f31a962da32d7a33ff33bdeb1e776fe56
      59b6e846
  14. Sep 25, 2017
  15. Sep 21, 2017
    • Joshua Colp's avatar
      bridge: Change participant SFU streams when source streams change. · f2985e31
      Joshua Colp authored
      Some endpoints do not like a stream being reused for a new
      media stream. The frame/jitterbuffer can rely on underlying
      attributes of the media stream in order to order the packets.
      When a new stream takes its place without any notice the
      buffer can get confused and the media ends up getting dropped.
      
      This change uses the SSRC change to determine that a new source
      is reusing an existing stream and then bridge_softmix renegotiates
      each participant such that they see a new media stream. This
      causes the frame/jitterbuffer to start fresh and work as expected.
      
      ASTERISK-27277
      
      Change-Id: I30ccbdba16ca073d7f31e0e59ab778c153afae07
      f2985e31
  16. Sep 20, 2017
    • George Joseph's avatar
      chan_pjsip: Ignore AST_CONTROL_STREAM_TOPOLOGY_CHANGED for now · b6aa728a
      George Joseph authored
      chan_pjsip_indicate was missing a case for the recently added
      AST_CONTROL_STREAM_TOPOLOGY_CHANGED condition and was returning an
      error and causing the call to be hung up instead of just ignoring
      it.
      
      ASTERISK-27260
      Reported by: Daniel Heckl
      
      Change-Id: I4fecbb00a0b8a853da85155065c1a6bddf235e80
      b6aa728a
  17. Sep 19, 2017
  18. Sep 13, 2017
    • Sean Bright's avatar
      chan_rtp: Use μ-law by default instead of signed linear · eec03963
      Sean Bright authored
      Multicast/Unicast RTP do not use SDP so we need to use a format that
      cleanly maps to one of the static RTP payload types. Without this
      change, an Originate to a Multicast or Unicast channel without a format
      specified would produce no audio on the receiving device.
      
      ASTERISK-21399 #close
      Reported by: Tzafrir Cohen
      
      Change-Id: I97e332b566e85da04b0004b9b0daae746cfca0e3
      eec03963
  19. Sep 06, 2017
    • Scott Griepentrog's avatar
      chan_sip: when getting sip pvt return failure if not found · 55536442
      Scott Griepentrog authored
      In handle_request_invite, when processing a pickup, a call
      is made to get_sip_pvt_from_replaces to locate the pvt for
      the subscription. The pvt is assumed to be valid when zero
      is returned indicating no error, and is dereferenced which
      can cause a crash if it was not found.
      
      This change checks the not found case and returns -1 which
      allows the calling code to fail appropriately.
      
      ASTERISK-27217 #close
      Reported-by: Bryan Walters
      
      Change-Id: I6bee92b8b8b85fcac3fd66f8c00ab18bc1765612
      55536442
    • Vitezslav Novy's avatar
      chan_sip: Do not change IP address in SDP origin line (o=) in SIP reINVITE · 67a2ca31
      Vitezslav Novy authored
      If directmedia=yes is configured, when call is answered, Asterisk sends reINVITE
      to both parties to set up media path directly between the endpoints.
      In this reINVITE msg SDP origin line (o=) contains IP address of endpoint
      instead of IP of asterisk. This behavior violates RFC3264, sec 8:
      "When issuing an offer that modifies the session,
      the "o=" line of the new SDP MUST be identical to that in the
      previous SDP, except that the version in the origin field MUST
      increment by one from the previous SDP."
      This patch assures IP address of Asterisk is always sent in
      SDP origin line.
      
      ASTERISK-17540
      Reported by:  saghul
      
      Change-Id: I533a047490c43dcff32eeca8378b2ba02345b64e
      67a2ca31
  20. Sep 05, 2017
    • Ben Ford's avatar
      chan_pjsip: Suppress frame warnings. · bfc29de3
      Ben Ford authored
      When rtp_keepalive is on for a PJSIP endpoint dialing to another
      Asterisk instance also using PJSIP, Asterisk will continue to print
      warning messages about not being able to send frames of a certain
      type. This suppresses that warning message.
      
      Change-Id: I0332a05519d7bda9cacfa26d433909ff1909be67
      bfc29de3
  21. Aug 30, 2017
  22. Aug 25, 2017
    • Torrey Searle's avatar
      res/res_pjsip_session: allow SDP answer to be regenerated · 33a648d4
      Torrey Searle authored
      If an SDP answer hasn't been sent yet, it's legal to change it.
      This is required for PJSIP_DTMF_MODE to work correctly, and can
      also have use in the future for updating codecs too.
      
      ASTERISK-27209 #close
      
      Change-Id: Idbbfb7cb3f72fbd96c94d10d93540f69bd51e7a1
      33a648d4
  23. Aug 22, 2017
  24. Aug 09, 2017
    • Torrey Searle's avatar
      res_rtp_asterisk: Make P2P bridge Asymmetric codec aware · a2dde591
      Torrey Searle authored
      Introduce a new property to rtp-engine to make it aware of
      the desire for assymetric codecs or not.  If asymmetric codecs
      is not allowed, the bridge will compare read/write formats
      and shut down the p2p bridge if needed
      
      ASTERISK-26745 #close
      
      Change-Id: I0d9c83e5356df81661e58d40a8db565833501a6f
      a2dde591
  25. Aug 07, 2017
    • kkm's avatar
      chan_sip: Access incoming REFER headers in dialplan · 4b58609c
      kkm authored
      This adds a way to access information passed along with SIP headers in
      a REFER message that initiates a transfer. Headers matching a dialplan
      variable GET_TRANSFERRER_DATA in the transferrer channel are added to
      a HASH object TRANSFER_DATA to be accessed with functions HASHKEY and HASH.
      
      The variable GET_TRANSFERRER_DATA is interpreted to be a prefix for
      headers that should be put into the hash. If not set, no headers are
      included. If set to a string (perhaps 'X-' in a typical case), all headers
      starting this string are added. Empty string matches all headers.
      
      If there are multiple of the same header, only the latest occurrence in
      the REFER message is available in the hash.
      
      Obviously, the variable GET_TRANSFERRER_DATA must be inherited by the
      referrer channel, and should be set with the '_' or '__' prefix.
      
      I avoided a specific reference to SIP or REFER, as in my mind the mechanism
      can be generalized to other channel techs.
      
      ASTERISK-27162
      
      Change-Id: I73d7a1e95981693bc59aa0d5093c074b555f708e
      4b58609c
  26. Aug 04, 2017
    • Corey Farrell's avatar
      Correct some leaks in unit tests. · 7f8f3ca4
      Corey Farrell authored
      * chan_sip: channel in test_sip_rtpqos_1.
      * test_config: config hook, config info and global config holder.
      * test_core_format: format in format_attribute_set_without_interface.
      * test_stream: unneeded frame duplication.
      * test_taskprocessor: task_data.
      
      Change-Id: I94d364d195cf3b3b5de2bf3ad565343275c7ad31
      7f8f3ca4
  27. Aug 03, 2017
    • kkm's avatar
      chan_sip: Add dialplan function SIP_HEADERS · 4c0798e9
      kkm authored
      Syntax: SIP_HEADERS([prefix])
      
      If the argument is specified, only the headers matching the given prefix
      are returned.
      
      The function returns a comma-separated list of SIP header names from an
      incoming INVITE message. Multiple headers with the same name are included
      in the list only once. The returned list can be iterated over using the
      functions POP() and SIP_HEADER().
      
      For example, '${SIP_HEADERS(Co)}' might return the string
      'Contact,Content-Length,Content-Type'.
      
      Practical use is rather '${SIP_HEADERS(X-)}' to enumerate optional
      extended headers sent by a peer.
      
      ASTERISK-27163
      
      Change-Id: I2076d3893d03a2f82429f393b5b46db6cf68a267
      4c0798e9
  28. Aug 02, 2017
  29. Aug 01, 2017
    • Corey Farrell's avatar
      Fix compiler warnings on Fedora 26 / GCC 7. · 58d03211
      Corey Farrell authored
      GCC 7 has added capability to produce warnings, this fixes most of those
      warnings.  The specific warnings are disabled in a few places:
      
      * app_voicemail.c: truncation of paths more than 4096 chars in many places.
      * chan_mgcp.c: callid truncated to 80 chars.
      * cdr.c: two userfields are combined to cdr copy, fix would break ABI.
      * tcptls.c: ignore use of deprecated method SSLv3_client_method().
      
      ASTERISK-27156 #close
      
      Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
      58d03211
    • Torrey Searle's avatar
      chan_pjsip: add a new function PJSIP_DTMF_MODE · 65c56089
      Torrey Searle authored
      This function is a replica of SIPDtmfMode, allowing the DTMF mode of a
      PJSIP call to be modified on a per-call basis
      
      ASTERISK-27085 #close
      
      Change-Id: I20eef5da3e5d1d3e58b304416bc79683f87e7612
      65c56089
  30. Jul 24, 2017
    • Joshua Colp's avatar
      core: Add VP9 passthrough support. · a6eb9ee7
      Joshua Colp authored
      This change adds VP9 as a known codec and creates a cached
      "vp9" media format for use.
      
      Change-Id: I025a93ed05cf96153d66f36db1839109cc24c5cc
      a6eb9ee7
  31. Jul 14, 2017
    • Sergej Kasumovic's avatar
      chan_iax2: On reload make sure to check for existing MWI subscription · d3f5b265
      Sergej Kasumovic authored
      On every reload of chan_iax2 module, MWI subscription was added, which
      results in additional taskprocessors being accumulated over time.
      
      This commit fixes it by making sure we check for existing subscription
      first.
      
      This was verified with 'core show taskprocessors' CLI command.
      
      ASTERISK-27122 #close
      
      Change-Id: Ie2ef528fd5ca01b933eeb88188cc10967899cfb9
      d3f5b265
  32. Jul 13, 2017
    • Kevin Harwell's avatar
      res_pjsip: Add "webrtc" configuration option · 7da6ddda
      Kevin Harwell authored
      This patch creates a new configuration option called "webrtc". When enabled it
      defaults and enables the following options that are needed in order for webrtc
      to work in Asterisk:
      
        rtcp-mux, use_avpf, ice_support, and use_received_transport=enabled
        media_encryption=dtls
        dtls_verify=fingerprint
        dtls_setup=actpass
      
      When "webrtc" is enabled, this patch also parses the "msid" media level
      attribute from an SDP. It will also appropriately add it onto the outgoing
      session when applicable.
      
      Lastly, when "webrtc" is enabled h264 RTCP FIR feedback frames are now sent.
      
      ASTERISK-27119 #close
      
      Change-Id: I5ec02e07c5d5b9ad86a34fdf31bf2f9da9aac6fd
      7da6ddda
    • Joshua Colp's avatar
      res_rtp_asterisk / res_pjsip: Add support for BUNDLE. · 065c3005
      Joshua Colp authored
      BUNDLE is a specification used in WebRTC to allow multiple
      streams to use the same underlying transport. This reduces
      the number of ICE and DTLS negotiations that has to occur
      to 1 normally.
      
      This change implements this by adding support for it to
      the RTP SDP module in PJSIP. BUNDLE can be turned on using
      the "bundle" option and on an offer we will offer to
      bundle streams together. On an answer we will accept any
      bundle groups provided. Once accepted each stream is bundled
      to another RTP instance for transport.
      
      For the res_rtp_asterisk changes the ability to bundle
      an RTP instance to another based on the SSRC received
      from the remote side has been added. For outgoing traffic
      if an RTP instance is bundled to another we will use the
      other RTP instance for any transport related things. For
      incoming traffic received from the transport instance we
      look up the correct instance based on the SSRC and use it
      for any non-transport related data.
      
      ASTERISK-27118
      
      Change-Id: I96c0920b9f9aca7382256484765a239017973c11
      065c3005
  33. Jul 05, 2017
    • Sean Bright's avatar
      core: Remove 'Data Retrieval API' · 325eeced
      Sean Bright authored
      This API was not actively maintained, was not added to new modules
      (such as res_pjsip), and there exist better alternatives to acquire the
      same information, such as the ARI.
      
      Change-Id: I4b2185a83aeb74798b4ad43ff8f89f971096aa83
      325eeced
  34. Jul 03, 2017
    • Alexander Traud's avatar
      chan_sip: Only when different, add TCP|TLS in autodomain (SIP Domain Support). · 910c0545
      Alexander Traud authored
      When sip.conf contained tcpenable=yes and autodomain=yes, the TCP domain was
      added in any case, because of a local Boolean-negation error of the return value
      of ast_sockaddr_cmp. After fixing this error for TCP and TLS, the TLS domain was
      still always added with tlsenable=yes, because the domains were not compared
      just on the address but also on the port – and TLS is always on a different port
      than UDP/TCP.
      
      ASTERISK-27106
      
      Change-Id: I14fe9e319e238320b094016980445ef3a5b3337c
      910c0545
    • Alexander Traud's avatar
      chan_sip: Fix a typo for tlsbindaddr in autodomain (SIP Domain Support). · 4398aa8f
      Alexander Traud authored
      Because of a copy-and-paste error when the struct ast_sockaddr changed,
      tlsbindaddr was not added, when sip.conf contained autodomain=yes; see
      "show sip domains" on the command-line interface (CLI) of Asterisk.
      
      ASTERISK-27106
      
      Change-Id: I3d0957150017c223136968ef1266f275d0d6695e
      4398aa8f
  35. Jun 29, 2017
    • George Joseph's avatar
      chan_pjsip: Fix ability to send UPDATE on COLP · c0c99c76
      George Joseph authored
      When connected_line_method is "invite", we're supposed to determine
      if the client can support UPDATE and if it can, send UPDATE instead
      of INVITE to avoid the SDP renegotiation.  Not only was pjproject
      not setting the PJSIP_INV_SUPPORT_UPDATE flag, we were testing
      that invite_tsx wasn't NULL which isn't always the case.
      
      * Updated chan_pjsip/update_connected_line_information to drop the
        requirement that invite_tsx isn't NULL.
      * Submitted patch to pjproject sip_inv.c that sets the
        PJSIP_INV_SUPPORT_UPDATE flag correctly.
      * Updated pjsip.conf.sample to clarify what happens when "invite"
        is specified.
      
      ASTERISK-27095
      
      Change-Id: Ic2381b3567b8052c616d96fbe79564c530e81560
      c0c99c76
    • Torrey Searle's avatar
      res_pjsip: Add DTMF INFO Failback mode · fb7247c5
      Torrey Searle authored
      The existing auto dtmf mode reverts to inband if 4733 fails to be
      negotiated.  This patch adds a new mode auto_info which will
      switch to INFO instead of inband if 4733 is not available.
      
      ASTERISK-27066 #close
      
      Change-Id: Id185b11e84afd9191a2f269e8443019047765e91
      fb7247c5
Loading