Skip to content
Snippets Groups Projects
  1. Sep 21, 2021
    • Naveen Albert's avatar
      logger: Add custom logging capabilities · 148f8355
      Naveen Albert authored
      Adds the ability for users to log to custom log levels
      by providing custom log level names in logger.conf. Also
      adds a logger show levels CLI command.
      
      ASTERISK-29529
      
      Change-Id: If082703cf81a436ae5a565c75225fa8c0554b702
      148f8355
  2. Sep 10, 2021
    • Naveen Albert's avatar
      func_sayfiles: Retrieve say file names · ddf6299b
      Naveen Albert authored
      Up until now, all of the logic used to translate
      arguments to the Say applications has been
      directly coupled to playback, preventing other
      modules from using this logic.
      
      This refactors code in say.c and adds a SAYFILES
      function that can be used to retrieve the file
      names that would be played. These can then be
      used in other applications or for other purposes.
      
      Additionally, a SayMoney application and a SayOrdinal
      application are added. Both SayOrdinal and SayNumber
      are also expanded to support integers greater than
      one billion.
      
      ASTERISK-29531
      
      Change-Id: If9718c89353b8e153d84add3cc4637b79585db19
      ddf6299b
    • Naveen Albert's avatar
      res_tonedetect: Tone detection module · 7df69633
      Naveen Albert authored
      dsp.c contains arbitrary tone detection functionality
      which is currently only used for fax tone recognition.
      This change makes this functionality publicly
      accessible so that other modules can take advantage
      of this.
      
      Additionally, a WaitForTone and TONE_DETECT app and
      function are included to allow users to do their
      own tone detection operations in the dialplan.
      
      ASTERISK-29546
      
      Change-Id: Ie38c395000f4fd4d04e942e8658e177f8f499b26
      7df69633
  3. Sep 09, 2021
    • Sean Bright's avatar
      term.c: Add support for extended number format terminfo files. · 605dd03b
      Sean Bright authored
      ncurses 6.1 introduced an extended number format for terminfo files
      which the terminfo parsing in Asterisk is not able to parse. This
      results in some TERM values that do support color (screen-256color on
      Ubuntu 20.04 for example) to not get a color console.
      
      ASTERISK-29630 #close
      
      Change-Id: I27a4fcfab502219924af2d6b1c46feba92903cb3
      605dd03b
  4. Sep 08, 2021
    • Sean Bright's avatar
      dns.c: Load IPv6 DNS resolvers if configured. · 695fc3db
      Sean Bright authored
      IPv6 nameserver addresses are stored in different part of the
      __res_state structure, so look there if we appear to have support for
      it.
      
      ASTERISK-28004 #close
      
      Change-Id: I67067077d8a406ee996664518d9c8fbf11f6977d
      695fc3db
  5. Sep 02, 2021
    • Sean Bright's avatar
      config_options: Handle ACO arrays correctly in generated XML docs. · 5029e78f
      Sean Bright authored
      There are 3 separate changes here but they are all closely related:
      
      * Only try to set matchfield attributes on 'field' nodes
      
      * We need to adjust how we treat the category pointer based on the
        value of the category_match, to avoid memory corruption. We now
        generate a regex-like string when match types other than
        ACO_WHITELIST and ACO_BLACKLIST are used.
      
      * Switch app_agent_pool from ACO_BLACKLIST_ARRAY to
        ACO_BLACKLIST_EXACT since we only have one category we need to
        ignore, not two.
      
      ASTERISK-29614 #close
      
      Change-Id: I7be7bdb1bb9814f942bc6bb4fdd0a55a7b7efe1e
      5029e78f
  6. Sep 01, 2021
    • Naveen Albert's avatar
      app_read: Allow reading # as a digit · 6cc004dc
      Naveen Albert authored
      Allows for the digit # to be read as a digit,
      just like any other DTMF digit, as opposed to
      forcing it to be used as an end of input
      indicator. The default behavior remains
      unchanged.
      
      ASTERISK-18454 #close
      
      Change-Id: I3033432adb9d296ad227e76b540b8b4a2417665b
      6cc004dc
    • 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
  7. Aug 26, 2021
    • Naveen Albert's avatar
      bridge_basic: Change warning to verbose if transfer cancelled · f01a0398
      Naveen Albert authored
      The attended transfer feature will emit a warning if the user
      cancels the transfer or the attended transfer doesn't complete
      for any reason. Changes the warning to a verbose message,
      since nothing is actually wrong here.
      
      ASTERISK-29612 #close
      
      Change-Id: I64c93cdb21360a0a8d45e9cb6db3af8168f66e6d
      f01a0398
  8. Aug 20, 2021
    • Andre Barbosa's avatar
      media_cache: Don't lock when curl the remote file · c4839c04
      Andre Barbosa authored
      When playing a remote sound file, which is not in cache, first we need
      to download it with ast_bucket_file_retrieve.
      
      This can take a while if the remote host is slow. The current CURL
      timeout is 180secs, so in extreme situations, it can take 3 minutes to
      return.
      
      Because ast_media_cache_retrieve has a lock on all function, while we
      are waiting for the delayed download, Asterisk is not able to play any
      more files, even the files already cached locally.
      
      ASTERISK-29544 #close
      
      Change-Id: I8d4142b463ae4a1d4c41bff2bf63324821567408
      c4839c04
  9. Aug 06, 2021
    • Alexander Traud's avatar
      aelparse: Accept an included context with timings. · 8a6c9c3a
      Alexander Traud authored
      With Asterisk 1.6.0, in the main parser for the configuration file
      extensions.conf, the separator was changed from vertical bar to comma.
      However, the first separator was not changed in aelparse; it still had
      to be a vertical bar, and no comma was allowed.
      
      Additionally, this change allows the vertical bar for the first and
      last parameter again, even in the main parser, because the vertical bar
      was still accepted for the other parameters.
      
      ASTERISK-29540
      
      Change-Id: I882e17c73adf4bf2f20f9046390860d04a9f8d81
      8a6c9c3a
  10. Aug 02, 2021
    • under's avatar
      codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother · de3f5350
      under authored
      If Asterisk gets G.729 6-byte VAD frames inbound, then at outbound Asterisk sends this G.729 stream with non-continuous timestamps.
      This makes the audio stream not-playable at the receiver side.
      Linphone isn't able to play such an audio - lots of disruptions are heard.
      Also I had complains of bad audio from users which use other types of phones.
      
      After debugging, I found this is a regression connected with RTP Smoother (main/smoother.c).
      
      Smoother has a special code to handle G.729 VAD frames (search for AST_SMOOTHER_FLAG_G729 in smoother.c).
      
      However, this flag is never set in Asterisk-12 and newer.
      Previously it has been set (see Asterisk-11).
      
      ASTERISK-29526 #close
      
      Change-Id: I6f51ecb1a3ecd9c6d59ec5a6811a27446e17065d
      de3f5350
  11. Jul 19, 2021
    • Sean Bright's avatar
      res_http_media_cache.c: Parse media URLs to find extensions. · d5683268
      Sean Bright authored
      Use cURL's URL parsing API, falling back to the urlparser library, to
      parse playback URLs in order to find their file extensions.
      
      For backwards compatibility, we first look at the full URL, then at
      any Content-Type header, and finally at just the path portion of the
      URL.
      
      ASTERISK-27871 #close
      
      Change-Id: I16d0682f6d794be96539261b3e48f237909139cb
      d5683268
  12. Jul 16, 2021
  13. Jun 24, 2021
    • George Joseph's avatar
      jitterbuffer: Correct signed/unsigned mismatch causing assert · bc973bd7
      George Joseph authored
      If the system time has stepped backwards because of a time
      adjustment between the time a frame is timestamped and the
      time we check the timestamps in abstract_jb:hook_event_cb(),
      we get a negative interval, but we don't check for that there.
      abstract_jb:hook_event_cb() then calls
      fixedjitterbuffer:fixed_jb_get() (via abstract_jb:jb_get_fixed)
      and the first thing that does is assert(interval >= 0).
      
      There are several issues with this...
      
       * abstract_jb:hook_event_cb() saves the interval in a variable
         named "now" which is confusing in itself.
      
       * "now" is defined as an unsigned int which converts the negative
         value returned from ast_tvdiff_ms() to a large positive value.
      
       * fixed_jb_get()'s parameter is defined as a signed int so the
         interval gets converted back to a negative value.
      
       * fixed_jb_get()'s assert is NOT an ast_assert but a direct define
         that points to the system assert() so it triggers even in
         production mode.
      
      So...
      
       * hook_event_cb()'s "now" was renamed to "relative_frame_start" and
         changed to an int64_t.
       * hook_event_cb() now checks for a negative value right after
         retrieving both the current and framedata timestamps and just
         returns the frame if the difference is negative.
       * fixed_jb_get()'s local define of ASSERT() was changed to call
         ast_assert() instead of the system assert().
      
      ASTERISK-29480
      Reported by: Dan Cropp
      
      Change-Id: Ic469dec73c2edc3ba134cda6721a999a9714f3c9
      bc973bd7
  14. Jun 22, 2021
    • Joshua C. Colp's avatar
      core: Don't play silence for Busy() and Congestion() applications. · 5382b9db
      Joshua C. Colp authored
      When using the Busy() and Congestion() applications the
      function ast_safe_sleep is used by wait_for_hangup to safely
      wait on the channel. This function may send silence if Asterisk
      is configured to do so using the transmit_silence option.
      
      In a scenario where an answered channel dials a Local channel
      either directly or through call forwarding and the Busy()
      or Congestion() dialplan applications were executed with the
      transmit_silence option enabled the busy or congestion
      tone would not be heard.
      
      This is because inband generation of tones (such as busy
      and congestion) is stopped when other audio is sent to
      the channel they are being played to. In the given
      scenario the transmit_silence option would result in
      silence being sent to the channel, thus stopping the
      inband generation.
      
      This change adds a variant of ast_safe_sleep which can be
      used when silence should not be played to the channel. The
      wait_for_hangup function has been updated to use this
      resulting in the tones being generated as expected.
      
      ASTERISK-29485
      
      Change-Id: I066bfc987a3ad6f0ccc88e0af4cd63f6a4729133
      5382b9db
  15. Jun 15, 2021
    • Naveen Albert's avatar
      pbx_builtins: Corrects SayNumber warning · f812c574
      Naveen Albert authored
      Previously, SayNumber always emitted a warning if the caller hung up
      during execution. Usually this isn't correct, so check if the channel
      hung up and, if so, don't emit a warning.
      
      ASTERISK-29475
      
      Change-Id: Ieea4a67301c6ea83bbc7690c1d4808d79a704594
      f812c574
  16. May 25, 2021
  17. 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
  18. May 17, 2021
    • Naveen Albert's avatar
      main/file.c: Don't throw error on flash event. · 0026aead
      Naveen Albert authored
      AST_CONTROL_FLASH isn't accounted for in a switch statement in file.c
      where it should be ignored. Adding this to the switch ensures a
      warning isn't thrown on RFC2833 flash events, since nothing's amiss.
      
      ASTERISK-29372
      
      Change-Id: I4fa549bfb7ba1894a4044de999ea124877422fbc
      0026aead
  19. May 12, 2021
  20. May 06, 2021
    • George Joseph's avatar
      Updates for the MessageSend Dialplan App · 09303e8e
      George Joseph authored
      Enhancements:
      
       * The MessageSend dialplan application now takes an optional
         third argument that can set the message's "To" field on
         outgoing messages.  It's an alternative to using the
         MESSAGE(to) dialplan function.
      
         NOTE: No channel driver currently implements this field.  A
         follow-on commit for res_pjsip_messaging will implement it for
         the chan_pjsip channel driver.
      
       * To prevent confusion with the first argument, currently named
         "to", it's been renamed to "destination". Its function,
         creating the request URI, hasn't changed.
      
       * The documentation for MessageSend was updated to be
         more clear about the parameters and how they interact
         the MESSAGE() dialplan function.
      
       * With the rename of MessageSend's first parameter, and the fact
         that message.c references <info> elements in chan_sip.c,
         res_pjsip_messaging.c and res_xmpp, they each needed
         documentation updates to use MessageDestinationInfo instead of
         MessageToInfo.
      
       * appdocsxml.dtd was updated to include a missing element
         declaration for "dataType".  This was showing up as an error
         in Eclipse's dtd editor.
      
       * Despite the changes in this commit, there should be
         no impact to current users of MessageSend.
      
      Change-Id: I6fb5b569657a02866a66ea352fd53d30d8ac965a
      09303e8e
  21. Apr 30, 2021
  22. Apr 29, 2021
    • Joshua C. Colp's avatar
      chan_local: Skip filtering audio formats on removed streams. · f142ca25
      Joshua C. Colp authored
      When a stream topology is provided to chan_local when dialing
      it filters the audio formats down. This operation did not skip
      streams which were removed (that have no formats) resulting in
      calling being aborted.
      
      This change causes such streams to be skipped.
      
      ASTERISK-29407
      
      Change-Id: I1de8b98727cb2d10f4bc287da0b5fdcb381addd6
      f142ca25
  23. Apr 28, 2021
  24. Apr 05, 2021
    • George Joseph's avatar
      bridge_channel_write_frame: Check for NULL channel · 44aef044
      George Joseph authored
      There is a possibility, when bridge_channel_write_frame() is
      called, that the bridge_channel->chan will be NULL.  The first
      thing bridge_channel_write_frame() does though is call
      ast_channel_is_multistream() which had no check for a NULL
      channel and therefore caused a segfault. Since it's still
      possible for bridge_channel_write_frame() to write the frame to
      the other channels in the bridge, we don't want to bail before we
      call ast_channel_is_multistream() but we can just skip the
      multi-channel stuff.  So...
      
      bridge_channel_write_frame() only calls ast_channel_is_multistream()
      if bridge_channel->chan is not NULL.
      
      As a safety measure, ast_channel_is_multistream() now returns
      false if the supplied channel is NULL.
      
      ASTERISK-29379
      Reported-by: Vyrva Igor
      Reported-by: Ross Beer
      
      Change-Id: Idfe62dbea8c69813ecfd58e113a6620dc42352ce
      44aef044
  25. Apr 02, 2021
  26. Apr 01, 2021
    • Joshua C. Colp's avatar
      loader: Output warnings for deprecated modules. · 46ed6af9
      Joshua C. Colp authored
      Using the information from the MODULEINFO XML we can
      now output useful information at the end of module
      loading for deprecated modules. This includes the
      version it was deprecated in, the version it will be
      removed in, and the replacement if available.
      
      ASTERISK-29339
      
      Change-Id: I2080dab97d2186be94c421b41dabf6d79a11611a
      46ed6af9
  27. Mar 31, 2021
    • Kevin Harwell's avatar
      time: Add timeval create and unit conversion functions · eb92fb72
      Kevin Harwell authored
      Added a TIME_UNIT enumeration, and a function that converts a
      string to one of the enumerated values. Also, added functions
      that create and initialize a timeval object using a specified
      value, and unit type.
      
      Change-Id: Ic31a1c3262a44f77a5ef78bfc85dcf69a8d47392
      eb92fb72
  28. Mar 22, 2021
    • Mark Murawski's avatar
      logger: Console sessions will now respect logger.conf dateformat= option · b4347c48
      Mark Murawski authored
      The 'core' console (ie: asterisk -c) does read logger.conf and does
      use the dateformat= option.
      
      Whereas 'remote' consoles (ie: asterisk -r -T) does not read logger.conf
      and uses a hard coded dateformat option for printing received verbose messages:
        main/logger.c: static char dateformat[256] = "%b %e %T"
      
      This change will load logger.conf for each remote console session and
      use the dateformat= option to set the per-line timestamp for verbose messages
      
      Change-Id: I3ea10990dbd920e9f7ce8ff771bc65aa7f4ea8c1
      ASTERISK-25358: #close
      Reported-by: Igor Liferenko
      b4347c48
    • Joshua C. Colp's avatar
      core_unreal: Fix deadlock with T.38 control frames. · 970b8494
      Joshua C. Colp authored
      When using the ast_unreal_lock_all function no channel
      locks can be held before calling it.
      
      This change unlocks the channel that indicate was
      called on before doing so and then relocks it afterwards.
      
      ASTERISK-29035
      
      Change-Id: Id65016201b5f9c9519a216e250f9101c629e19e9
      970b8494
  29. Mar 10, 2021
    • Joshua C. Colp's avatar
      channel: Fix crash in suppress API. · cc127a99
      Joshua C. Colp authored
      There exists an inconsistency with framehook usage
      such that it is only on reads that the frame should
      be freed, not on writes as well.
      
      ASTERISK-29071
      
      Change-Id: I5ef918ebe4debac8a469e8d43bf9d6b673e8e472
      cc127a99
  30. Mar 05, 2021
    • Joshua C. Colp's avatar
      sorcery: Add support for more intelligent reloading. · 304f8ddf
      Joshua C. Colp authored
      Some sorcery objects actually contain dynamic content
      that can change despite the underlying configuration
      itself not changing. A good example of this is the
      res_pjsip_endpoint_identifier_ip module which allows
      specifying hostnames. While the configuration may not
      change between reloads the DNS information of the
      hostnames can.
      
      This change adds the ability for a sorcery object to be
      marked as having dynamic contents which is then taken
      into account when reloading by the sorcery file based
      config module. If there is an object with dynamic content
      then a reload will be forced while if there are none
      then the existing behavior of not reloading occurs.
      
      ASTERISK-29321
      
      Change-Id: I9342dc55be46cc00204533c266a68d972760a0b1
      304f8ddf
  31. Mar 04, 2021
  32. Mar 03, 2021
    • Joshua C. Colp's avatar
      channel: Fix memory leak in suppress API. · 3e5b9e39
      Joshua C. Colp authored
      A frame suppression API exists as part of channels
      which allows audio frames to or from a channel to
      be dropped. The MuteAudio AMI action uses this
      API to perform its job.
      
      This API uses a framehook to intercept flowing
      audio and drop it when appropriate. It is the
      responsibility of the framehook to free the
      frame it is given if it changes the frame. The
      suppression API failed to do this resulting in
      a leak of audio frames.
      
      This change adds the freeing of these frames.
      
      ASTERISK-29071
      
      Change-Id: Ie50acd454d672d36af914050c327d2e120d8ba7b
      3e5b9e39
  33. Mar 02, 2021
    • Nico Kooijman's avatar
      main: With Dutch language year after 2020 is not spoken in say.c · 2ea75ed3
      Nico Kooijman authored
      Implemented the english way of saying the year in ast_say_date_with_format_nl.
      Currently the numbers are spoken correctly until 2020 and stopped working
      this year.
      
      ASTERISK-29297 #close
      Reported-by: Jacek Konieczny
      
      Change-Id: If5918eed5ab05df31df4dd23f08a909a60f6aba4
      2ea75ed3
  34. Feb 23, 2021
    • Alexander Traud's avatar
      chan_sip: Filter pass-through audio/video formats away, again. · 5894535f
      Alexander Traud authored
      Instead of looking for pass-through formats in the list of transcodable
      formats (which is going to find nothing), go through the result which
      is going to be the jointcaps of the tech_pvt of the channel. Finally,
      only with that list, ast_format_cap_remove(.) is going to succeed.
      
      This restores the behaviour of Asterisk 1.8. However, it does not fix
      ASTERISK_29282 because that issue report is about chan_sip and PJSIP.
      Here, only chan_sip is fixed because PJSIP does not even call
      ast_rtp_instance_available_formats -> ast_translate_available_format.
      
      Change-Id: Icade2366ac2b82935b95a9981678c987da2e8c34
      5894535f
    • Sebastien Duthil's avatar
      app_mixmonitor: Add AMI events MixMonitorStart, -Stop and -Mute. · 6e695c86
      Sebastien Duthil authored
      ASTERISK-29244
      
      Change-Id: I1862d58264c2c8b5d8983272cb29734b184d67c5
      6e695c86
  35. Feb 16, 2021
    • Ben Ford's avatar
      core_unreal: Fix T.38 faxing when using local channels. · 00b229c6
      Ben Ford authored
      After some changes to streams and topologies, receiving fax through
      local channels stopped working. This change adds a stream topology with
      a stream of type IMAGE to the local channel pair and allows fax to be
      received.
      
      ASTERISK-29035 #close
      
      Change-Id: Id103cc5c9295295d8e68d5628e76220f8f17e9fb
      00b229c6
Loading