Skip to content
Snippets Groups Projects
  1. Sep 01, 2021
    • Sebastien Duthil's avatar
      res_rtp_asterisk: Automatically refresh stunaddr from DNS · 6fbf55ac
      Sebastien Duthil authored
      This allows the STUN server to change its IP address without having to
      reload the res_rtp_asterisk module.
      
      The refresh of the name resolution occurs first when the module is
      loaded, then recurringly, slightly after the previous DNS answer TTL
      expires.
      
      ASTERISK-29508 #close
      
      Change-Id: I7955a046293f913ba121bbd82153b04439e3465f
      6fbf55ac
  2. Aug 20, 2021
    • Sarah Autumn's avatar
      sig_analog: Changes to improve electromechanical signalling compatibility · 466eb4a5
      Sarah Autumn authored
      This changeset is intended to address compatibility issues encountered
      when interfacing Asterisk to electromechanical telephone switches that
      implement ANI-B, ANI-C, or ANI-D.
      
      In particular the behaviours that this impacts include:
      
       - FGC-CAMA did not work at all when using MF signaling. Modified the
         switch case block to send calls to the correct part of the
         signaling-handling state machine.
      
       - For FGC-CAMA operation, the delay between called number ST and
         second wink for ANI spill has been made configurable; previously
         all calls were made to wait for one full second.
      
       - After the ANI spill, previous behavior was to require a 'ST' tone
         to advance the call.  This has been changed to allow 'STP' 'ST2P'
         or 'ST3P' as well, for compatibility with ANI-D.
      
       - Store ANI2 (ANI INFO) digits in the CALLERID(ANI2) channel variable.
      
       - For calls with an ANI failure, No. 1 Crossbar switches will send
         forward a single-digit failure code, with no calling number digits
         and no ST pulse to terminate the spill.  I've made the ANI timeout
         configurable so to reduce dead air time on calls with ANI fail.
      
       - ANI info digits configurable.  Modern digital switches will send 2
         digits, but ANI-B sends only a single info digit.  This caused the
         ANI reported by Asterisk to be misaligned.
      
       - Changed a confusing log message to be more informative.
      
      ASTERISK-29518
      
      Change-Id: Ib7e27d987aee4ed9bc3663c57ef413e21b404256
      466eb4a5
  3. Aug 19, 2021
    • George Joseph's avatar
      res_pjproject: Allow mapping to Asterisk TRACE level · 84f2bf43
      George Joseph authored
      Allow mapping pjproject log messages to the Asterisk TRACE
      log level.  The defaults were also changes to log pjproject
      levels 3,4 to DEBUG and 5,6 to TRACE.  Previously 3,4,5,6
      all went to DEBUG.
      
      ASTERISK-29582
      
      Change-Id: I859a37a8dec263ed68099709cfbd3e665324c72d
      84f2bf43
  4. Aug 17, 2021
  5. Aug 03, 2021
    • Rijnhard Hessel's avatar
      res_statsd: handle non-standard meter type safely · 728a52fb
      Rijnhard Hessel authored
      Meter types are not well supported,
      lacking support in telegraf, datadog and the official statsd servers.
      We deprecate meters and provide a compliant fallback for any existing usages.
      
      A flag has been introduced to allow meters to fallback to counters.
      
      
      ASTERISK-29513
      
      Change-Id: I5fcb385983a1b88f03696ff30a26b55c546a1dd7
      728a52fb
  6. Jun 08, 2021
  7. May 21, 2021
  8. May 20, 2021
    • George Joseph's avatar
      res_pjsip_outbound_authenticator_digest: Be tolerant of RFC8760 UASs · 9cc1d6fc
      George Joseph authored
      RFC7616 and RFC8760 allow more than one WWW-Authenticate or
      Proxy-Authenticate header per realm, each with different digest
      algorithms (including new ones like SHA-256 and SHA-512-256).
      Thankfully however a UAS can NOT send back multiple Authenticate
      headers for the same realm with the same digest algorithm.  The
      UAS is also supposed to send the headers in order of preference
      with the first one being the most preferred.  We're supposed to
      send an Authorization header for the first one we encounter for a
      realm that we can support.
      
      The UAS can also send multiple realms, especially when it's a
      proxy that has forked the request in which case the proxy will
      aggregate all of the Authenticate headers and then send them all
      back to the UAC.
      
      It doesn't stop there though... Each realm can require a
      different username from the others.  There's also nothing
      preventing each digest algorithm from having a unique password
      although I'm not sure if that adds any benefit.
      
      So now... For each Authenticate header we encounter, we have to
      determine if we support the digest algorithm and, if not, just
      skip the header.  We then have to find an auth object that
      matches the realm AND the digest algorithm or find a wildcard
      object that matches the digest algorithm. If we find one, we add
      it to the results vector and read the next Authenticate header.
      If the next header is for the same realm AND we already added an
      auth object for that realm, we skip the header. Otherwise we
      repeat the process for the next header.
      
      In the end, we'll have accumulated a list of credentials we can
      pass to pjproject that it can use to add Authentication headers
      to a request.
      
      NOTE: Neither we nor pjproject can currently handle digest
      algorithms other than MD5.  We don't even have a place for it in
      the ast_sip_auth object. For this reason, we just skip processing
      any Authenticate header that's not MD5.  When we support the
      others, we'll move the check into the loop that searches the
      objects.
      
      Changes:
      
       * Added a new API ast_sip_retrieve_auths_vector() that takes in
         a vector of auth ids (usually supplied on a call to
         ast_sip_create_request_with_auth()) and populates another
         vector with the actual objects.
      
       * Refactored res_pjsip_outbound_authenticator_digest to handle
         multiple Authenticate headers and set the stage for handling
         additional digest algorithms.
      
       * Added a pjproject patch that allows them to ignore digest
         algorithms they don't support.  This patch has already been
         merged upstream.
      
       * Updated documentation for auth objects in the XML and
         in pjsip.conf.sample.
      
       * Although res_pjsip_authenticator_digest isn't affected
         by this change, some debugging and a testsuite AMI event
         was added to facilitate testing.
      
      Discovered during OpenSIPit 2021.
      
      ASTERISK-29397
      
      Change-Id: I3aef5ce4fe1d27e48d61268520f284d15d650281
      9cc1d6fc
  9. May 19, 2021
    • Naveen Albert's avatar
      AMI: Add AMI event to expose hook flash events · 04454fc2
      Naveen Albert authored
      Although Asterisk can receive and propogate flash events, it currently
      provides no mechanism for doing anything with them itself.
      
      This AMI event allows flash events to be processed by Asterisk.
      Additionally, AST_CONTROL_FLASH is included in a switch statement
      in channel.c to avoid throwing a warning when we shouldn't.
      
      ASTERISK-29380
      
      Change-Id: Ie17ffe65086e0282c88542e38eed6a461ec79e81
      04454fc2
  10. May 12, 2021
  11. May 11, 2021
    • Ben Ford's avatar
      STIR/SHAKEN: Fix certificate type and storage. · 259ecfa2
      Ben Ford authored
      During OpenSIPit, we found out that the public certificates must be of
      type X.509. When reading in public keys, we use the corresponding X.509
      functions now.
      
      We also discovered that we needed a better naming scheme for the
      certificates since certificates with the same name would cause issues
      (overwriting certs, etc.). Now when we download a public certificate, we
      get the serial number from it and use that as the name of the cached
      certificate.
      
      The configuration option public_key_url in stir_shaken.conf has also
      been renamed to public_cert_url, which better describes what the option
      is for.
      
      https://wiki.asterisk.org/wiki/display/AST/OpenSIPit+2021
      
      Change-Id: Ia00b20835f5f976e3603797f2f2fb19672d8114d
      259ecfa2
  12. Apr 28, 2021
  13. Apr 21, 2021
  14. Apr 19, 2021
    • Ben Ford's avatar
      res_aeap: Add basic config skeleton and CLI commands. · 45a1977d
      Ben Ford authored
      Added support for a basic AEAP configuration read from aeap.conf.
      Also added 2 CLI commands for showing individual configurations as
      well as all of them: aeap show server <id> and aeap show servers.
      
      Only one configuration option is required at the moment, and that one is
      server_url. It must be a websocket URL. The other option, codecs, is
      optional and will be used over the codecs specified on the endpoint if
      provided.
      
      https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=45482453
      
      Change-Id: I567ac5148c92b98d29d2ad83421b416b75ffdaa3
      45a1977d
  15. Mar 28, 2021
  16. Mar 25, 2021
    • Ben Ford's avatar
      logger.conf.sample: Add more debug documentation. · 25758670
      Ben Ford authored
      Change-Id: Iff0e713f2120d8dce8e1e26924b99ed17f9d9dff
      25758670
    • Ben Ford's avatar
      logging: Add .log to samples and update asterisk.logrotate. · 55c53de0
      Ben Ford authored
      Added .log extension to the sample logs in logger.conf.sample so that
      they will be able to be opened in the browser when attached to JIRA
      tickets. Because of this, asterisk.logrotate has also been updated to
      look for .log extensions instead of no extension for log files such as
      full and messages.
      
      Change-Id: I5de743c03f08047d6c6cc80cac5019ae0c4c200f
      55c53de0
    • Sean Bright's avatar
      app_queue.c: Remove dead 'updatecdr' code. · aac442ee
      Sean Bright authored
      Also removed the sample documentation, and some oddly-placed
      documentation about the timeout argument to the Queue() application
      itself. There is a large section on the timeout behavior below.
      
      ASTERISK-26614 #close
      
      Change-Id: I8f84e8304b50305b7c4cba2d9787a5d77c3a6217
      aac442ee
  17. Mar 23, 2021
  18. Mar 10, 2021
  19. Feb 23, 2021
    • Jaco Kroon's avatar
      func_odbc: Introduce minargs config and expose ARGC in addition to ARGn. · b0f349a3
      Jaco Kroon authored
      
      minargs enables enforcing of minimum count of arguments to pass to
      func_odbc, so if you're unconditionally using ARG1 through ARG4 then
      this should be set to 4.  func_odbc will generate an error in this case,
      so for example
      
      [FOO]
      minargs = 4
      
      and ODBC_FOO(a,b,c) in dialplan will now error out instead of using a
      potentially leaked ARG4 from Gosub().
      
      ARGC is needed if you're using optional argument, to verify whether or
      not an argument has been passed, else it's possible to use a leaked ARGn
      from Gosub (app_stack).  So now you can safely do
      ${IF($[${ARGC}>3]?${ARGV}:default value)} kind of thing.
      
      Change-Id: I6ca0b137d90b03f6aa9c496991f6cbf1518f6c24
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      b0f349a3
    • Sebastien Duthil's avatar
      app_mixmonitor: Add AMI events MixMonitorStart, -Stop and -Mute. · 6e695c86
      Sebastien Duthil authored
      ASTERISK-29244
      
      Change-Id: I1862d58264c2c8b5d8983272cb29734b184d67c5
      6e695c86
  20. Feb 18, 2021
    • Alexander Traud's avatar
      rtp: Enable srtp replay protection · 389b8b07
      Alexander Traud authored
      Add option "srtpreplayprotection" rtp.conf to enable srtp
      replay protection.
      
      ASTERISK-29260
      Reported by: Alexander Traud
      
      Change-Id: I5cd346e3c6b6812039d1901aa4b7be688173b458
      389b8b07
  21. Feb 09, 2021
    • George Joseph's avatar
      chan_iax2.c: Require secret and auth method if encryption is enabled · 91b07787
      George Joseph authored
      If there's no secret specified for an iax2 peer and there's no secret
      specified in the dial string, Asterisk will crash if the auth method
      requested by the peer is MD5 or plaintext.  You also couldn't specify
      a default auth method in the [general] section of iax.conf so if you
      don't have static peers defined and just use the dial string, Asterisk
      will still crash even if you have a secret specified in the dial string.
      
      * Added logic to iax2_call() and authenticate_reply() to print
        a warning and hanhup the call if encryption is requested and
        there's no secret or auth method.  This prevents the crash.
      
      * Added the ability to specify a default "auth" in the [general]
        section of iax.conf.
      
      ASTERISK-29624
      Reported by: N A
      
      Change-Id: I5928e16137581f7d383fcc7fa04ad96c919e6254
      91b07787
  22. Dec 09, 2020
    • lvl's avatar
      Introduce astcachedir, to be used for temporary bucket files · b0842713
      lvl authored
      As described in the issue, /tmp is not a suitable location for a
      large amount of cached media files, since most distributions make
      /tmp a RAM-based tmpfs mount with limited capacity.
      
      I opted for a location that can be configured separately, as opposed
      to using a subdirectory of spooldir, given the different storage
      profile (transient files vs files that might stay there indefinitely).
      
      This commit just makes the cache directory configurable, and changes
      the default location from /tmp to /var/cache/asterisk.
      
      ASTERISK-29143
      
      Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
      b0842713
  23. Nov 16, 2020
  24. Nov 06, 2020
    • Dovid Bender's avatar
      func_curl.c: Allow user to set what return codes constitute a failure. · bc58e84f
      Dovid Bender authored
      Currently any response from res_curl where we get an answer from the
      web server, regardless of what the response is (404, 403 etc.) Asterisk
      currently treats it as a success. This patch allows you to set which
      codes should be considered as a failure by Asterisk. If say we set
      failurecodes=404,403 then when using curl in realtime if a server gives
      a 404 error Asterisk will try to failover to the next option set in
      extconfig.conf
      
      ASTERISK-28825
      
      Reported by: Dovid Bender
      Code by: Gobinda Paul
      
      Change-Id: I94443e508343e0a3e535e51ea6e0562767639987
      bc58e84f
  25. Oct 22, 2020
  26. Oct 14, 2020
  27. Oct 13, 2020
    • Joshua C. Colp's avatar
      res_pjsip: Adjust outgoing offer call pref. · dcd2ed69
      Joshua C. Colp authored
      This changes the outgoing offer call preference
      default option to match the behavior of previous
      versions of Asterisk.
      
      The additional advanced codec negotiation options
      have also been removed from the sample configuration
      and marked as reserved for future functionality in
      XML documentation.
      
      The codec preference options have also been fixed to
      enforce local codec configuration.
      
      ASTERISK-29109
      
      Change-Id: Iad19347bd5f3d89900c15ecddfebf5e20950a1c2
      dcd2ed69
  28. Oct 02, 2020
    • George Joseph's avatar
      app_confbridge/bridge_softmix: Add ability to force estimated bitrate · 773f424c
      George Joseph authored
      app_confbridge now has the ability to set the estimated bitrate on an
      SFU bridge.  To use it, set a bridge profile's remb_behavior to "force"
      and set remb_estimated_bitrate to a rate in bits per second.  The
      remb_estimated_bitrate parameter is ignored if remb_behavior is something
      other than "force".
      
      Change-Id: Idce6464ff014a37ea3b82944452e56cc4d75ab0a
      773f424c
  29. Sep 28, 2020
  30. Aug 28, 2020
    • Alexander Traud's avatar
      samples: Fix keep_alive_interval default in pjsip.conf. · 8907a9f0
      Alexander Traud authored
      Since ASTERISK_27978 the default is not off but 90 seconds. That change
      happened because ASTERISK_27347 disabled the keep-alives in the bundled
      PJProject and Asterisk should behave the same as before.
      
      Change-Id: Ie63dc558ade6a5a2b969c30a4bd492d63730dc46
      8907a9f0
    • George Joseph's avatar
      logger.c: Added a new log formatter called "plain" · 54ddf191
      George Joseph authored
      Added a new log formatter called "plain" that always prints
      file, function and line number if available (even for verbose
      messages) and never prints color control characters.  It also
      doesn't apply any special formatting for verbose messages.
      Most suitable for file output but can be used for other channels
      as well.
      
      You use it in logger.conf like so:
      debug => [plain]debug
      console => [plain]error,warning,debug,notice,pjsip_history
      messages => [plain]warning,error,verbose
      
      Change-Id: I4fdfe4089f66ce2f9cb29f3005522090dbb5243d
      54ddf191
Loading