Skip to content
Snippets Groups Projects
  1. Aug 16, 2021
    • Sean Bright's avatar
      mgcp: Remove dead debug code · 121860e3
      Sean Bright authored
      ASTERISK-20339 #close
      
      Change-Id: I36f364aaa1971241d8f3ea1a5909b463d185a2d5
      121860e3
    • Joshua C. Colp's avatar
      policy: Add deprecation and removal versions to modules. · 13fd0789
      Joshua C. Colp authored
      app_meetme is deprecated in 19, to be removed in 21.
      app_osplookup is deprecated in 19, to be removed in 21.
      chan_alsa is deprecated in 19, to be removed in 21.
      chan_mgcp is deprecated in 19, to be removed in 21.
      chan_skinny is deprecated in 19, to be removed in 21.
      res_pktccops is deprecated in 19, to be removed in 21.
      cdr_mysql was deprecated in 1.8, to be removed in 19.
      app_mysql was deprecated in 1.8, to be removed in 19.
      app_ices was deprecated in 16, to be removed in 19.
      app_macro was deprecated in 16, to be removed in 21.
      app_fax was deprecated in 16, to be removed in 19.
      app_url was deprecated in 16, to be removed in 19.
      app_image was deprecated in 16, to be removed in 19.
      app_nbscat was deprecated in 16, to be removed in 19.
      app_dahdiras was deprecated in 16, to be removed in 19.
      cdr_syslog was deprecated in 16, to be removed in 19.
      chan_oss was deprecated in 16, to be removed in 19.
      chan_phone was deprecated in 16, to be removed in 19.
      chan_sip was deprecated in 17, to be removed in 21.
      chan_nbs was deprecated in 16, to be removed in 19.
      chan_misdn was deprecated in 16, to be removed in 19.
      chan_vpb was deprecated in 16, to be removed in 19.
      res_config_sqlite was deprecated in 16, to be removed in 19.
      res_monitor was deprecated in 16, to be removed in 21.
      conf2ael was deprecated in 16, to be removed in 19.
      muted was deprecated in 16, to be removed in 19.
      
      ASTERISK-29548
      ASTERISK-29549
      ASTERISK-29550
      ASTERISK-29551
      ASTERISK-29552
      ASTERISK-29553
      ASTERISK-29554
      ASTERISK-29555
      ASTERISK-29557
      ASTERISK-29558
      ASTERISK-29559
      ASTERISK-29560
      ASTERISK-29561
      ASTERISK-29562
      ASTERISK-29563
      ASTERISK-29564
      ASTERISK-29565
      ASTERISK-29566
      ASTERISK-29567
      ASTERISK-29568
      ASTERISK-29569
      ASTERISK-29570
      ASTERISK-29571
      ASTERISK-29572
      ASTERISK-29573
      ASTERISK-29574
      
      Change-Id: Ic3bee31a10d42c4b3bbc913d893f7b2a28a27131
      13fd0789
  2. Aug 12, 2021
  3. Aug 09, 2021
    • Naveen Albert's avatar
      func_frame_drop: New function · 118d8482
      Naveen Albert authored
      Adds function to selectively drop specified frames
      in the TX or RX direction on a channel, including
      control frames.
      
      ASTERISK-29478
      
      Change-Id: I8147c9d55d74e2e48861edba6b22f930920541ec
      118d8482
  4. Aug 06, 2021
    • Alexander Traud's avatar
      aelparse: Accept an included context with timings. · 0b1a629e
      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
      0b1a629e
    • Kevin Harwell's avatar
      format_ogg_speex: Implement a "not supported" write handler · 62883092
      Kevin Harwell authored
      This format did not specify a "write" handler, so when attempting to write
      to it (ast_writestream) a crash would occur.
      
      This patch adds a default handler that simply issues a "not supported"
      warning, thus no longer crashing.
      
      ASTERISK-29539
      
      Change-Id: I8f6ddc7cc3b15da30803be3b1cf68e2ba0fbce91
      62883092
  5. Aug 04, 2021
    • Naveen Albert's avatar
      cdr_adaptive_odbc: Prevent filter warnings · adf707f2
      Naveen Albert authored
      Previously, if CDR filters were used so that
      not all CDR records used all sections defined
      in cdr_adaptive_odbc.conf, then warnings will
      always be emitted (if each CDR record is unique
      to a particular section, n-1 warnings to be
      specific).
      
      This turns the offending warning log into
      a verbose message like the other one, since
      this behavior is intentional and not
      indicative of anything wrong.
      
      ASTERISK-29494
      
      Change-Id: Ifd314fa9298722bc99494d5ca2658a5caa94a5f8
      adf707f2
    • Naveen Albert's avatar
      app_queue: Allow streaming multiple announcement files · 940f6c4a
      Naveen Albert authored
      Allows multiple files comprising an agent announcement
      to be played by separating on the ampersand, similar
      to the multi-file support in other Asterisk applications.
      
      ASTERISK-29528
      
      Change-Id: Iec600d8cd5ba14aa1e4e37f906accb356cd7891a
      940f6c4a
  6. Aug 03, 2021
    • Igor Goncharovsky's avatar
      res_pjsip_header_funcs: Add PJSIP_HEADERS() ability to read header by pattern · 1e4ed61a
      Igor Goncharovsky authored
      PJSIP currently does not provide a function to replace SIP_HEADERS() function to get a list of headers from INVITE request.
      It may be used to get all X- headers in case the actual set and names of headers unknown.
      
      ASTERISK-29389
      
      Change-Id: Ic09d395de71a0021e0d6c5c29e1e19d689079f8b
      1e4ed61a
    • Rijnhard Hessel's avatar
      res_statsd: handle non-standard meter type safely · 71dd1d91
      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
      71dd1d91
    • under's avatar
      codec_builtin.c: G729 audio gets corrupted by Asterisk due to smoother · feb1e06a
      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
      feb1e06a
  7. Aug 02, 2021
    • Naveen Albert's avatar
      app_dtmfstore: New application to store digits · 016f6a0e
      Naveen Albert authored
      Adds application to asynchronously collect digits
      dialed on a channel in the TX or RX direction
      using a framehook and stores them in a specified
      variable, up to a configurable number of digits.
      
      ASTERISK-29477
      
      Change-Id: I51aa93fc9507f7636ac44806c4420ce690423e6f
      016f6a0e
  8. Jul 27, 2021
  9. Jul 22, 2021
    • Asterisk Development Team's avatar
    • Kevin Harwell's avatar
      AST-2021-009 - pjproject-bundled: Avoid crash during handshake for TLS · 3025ef4f
      Kevin Harwell authored
      If an SSL socket parent/listener was destroyed during the handshake,
      depending on timing, it was possible for the handling callback to
      attempt access of it after the fact thus causing a crash.
      
      ASTERISK-29415 #close
      
      Change-Id: I105dacdcd130ea7fdd4cf2010ccf35b5eaf1432d
      3025ef4f
    • Kevin Harwell's avatar
      AST-2021-008 - chan_iax2: remote crash on unsupported media format · 2a141a58
      Kevin Harwell authored
      If chan_iax2 received a packet with an unsupported media format, for
      example vp9, then it would set the frame's format to NULL. This could
      then result in a crash later when an attempt was made to access the
      format.
      
      This patch makes it so chan_iax2 now ignores/drops frames received
      with unsupported media format types.
      
      ASTERISK-29392 #close
      
      Change-Id: Ifa869a90dafe33eed8fd9463574fe6f1c0ad3eb1
      2a141a58
    • Joshua C. Colp's avatar
      AST-2021-007 - res_pjsip_session: Don't offer if no channel exists. · 523a7952
      Joshua C. Colp authored
      If a re-INVITE is received after we have sent a BYE request then it
      is possible for no channel to be present on the session. If this
      occurs we allow PJSIP to produce the offer instead. Since the call
      is being hung up if it produces an incorrect offer it doesn't
      actually matter. This also ensures that code which produces SDP
      does not need to handle if a channel is not present.
      
      ASTERISK-29381
      
      Change-Id: I673cb88c432f38f69b2e0851d55cc57a62236042
      523a7952
  10. Jul 20, 2021
    • Andre Barbosa's avatar
      res_stasis_playback: Check for chan hangup on play_on_channels · 2c3defc6
      Andre Barbosa authored
      Verify `ast_check_hangup` before looping to the next sound file.
      If the call is already hangup we just break the cycle.
      It also ensures that the PlaybackFinished event is sent if the call was hangup.
      
      This is also use-full when we are playing a big list of file for a channel that is hangup.
      Before this patch Asterisk will give a warning for every sound not played and fire a PlaybackStart for every sound file on the list tried to be played.
      
      With the patch we just break the playback cycle when the chan is hangup.
      
      ASTERISK-29501 #close
      
      Change-Id: Ic4e1c01b974c9a1f2d9678c9d6b380bcfc69feb8
      2c3defc6
  11. Jul 19, 2021
    • Sean Bright's avatar
      res_pjsip_stir_shaken: RFC 8225 compliance and error message cleanup. · 30feaada
      Sean Bright authored
      From RFC 8225 Section 5.2.1:
      
          The "dest" claim is a JSON object with the claim name of "dest"
          and MUST have at least one identity claim object.  The "dest"
          claim value is an array containing one or more identity claim JSON
          objects representing the destination identities of any type
          (currently "tn" or "uri").  If the "dest" claim value array
          contains both "tn" and "uri" claim names, the JSON object should
          list the "tn" array first and the "uri" array second.  Within the
          "tn" and "uri" arrays, the identity strings should be put in
          lexicographical order, including the scheme-specific portion of
          the URI characters.
      
      Additionally, make it clear that there was a failure to sign the JWT
      payload and not necessarily a memory allocation failure.
      
      Change-Id: Ia8733b861aef6edfaa9c2136e97b447a01578dc9
      30feaada
    • Sebastien Duthil's avatar
      stun: Emit warning message when STUN request times out · 4bd975f4
      Sebastien Duthil authored
      Without this message, it is not obvious that the reason is STUN timeout.
      
      ASTERISK-29507 #close
      
      Change-Id: I26e4853c23a1aed324552e1b9683ea3c05cb1f74
      4bd975f4
    • Sean Bright's avatar
      res_http_media_cache.c: Parse media URLs to find extensions. · 76c09b1c
      Sean Bright authored
      Use the URI parsing functions 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
      76c09b1c
  12. Jul 16, 2021
  13. Jul 15, 2021
  14. Jul 13, 2021
  15. Jul 08, 2021
    • Sean Bright's avatar
      res_pjsip_config_wizard.c: Add port matching support. · 146b59df
      Sean Bright authored
      In f8b0c2c9 we added support for port numbers in 'match' statements
      but neglected to include that support in the PJSIP config wizard.
      
      The removed code would have also prevented IPv6 addresses from being
      successfully used in the config wizard as well.
      
      ASTERISK-29503 #close
      
      Change-Id: Idd5bbfd48009e7a741757743dbaea68e2835a34d
      146b59df
    • Naveen Albert's avatar
      app_waitforcond: New application · 1b21b1ab
      Naveen Albert authored
      While several applications exist to wait for
      a certain event to occur, none allow waiting
      for any generic expression to become true.
      This application allows for waiting for a condition
      to become true, with configurable timeout and
      checking interval.
      
      ASTERISK-29444
      
      Change-Id: I08adf2824b8bc63405778cf355963b5005612f41
      1b21b1ab
  16. Jun 24, 2021
    • Andre Barbosa's avatar
      res_stasis_playback: Send PlaybackFinish event only once for errors · 283812e4
      Andre Barbosa authored
      When we try to play a list of sound files in the same Play command,
      we get only one PlaybackFinish event, after all sounds are played.
      
      But in the case where the Play fails (because channel is destroyed
      for example), Asterisk will send one PlaybackFinish event for each
      sound file still to be played. If the list is big, Asterisk is
      sending many events.
      
      This patch adds a failed state so we can understand that the play
      failed. On that case we don't send the event, if we still have a
      list of sounds to be played.
      
      When we reach the last sound, we send the PlaybackFinish with
      the failed state.
      
      ASTERISK-29464 #close
      
      Change-Id: I4c2e5921cc597702513af0d7c6c2c982e1798322
      283812e4
    • George Joseph's avatar
      jitterbuffer: Correct signed/unsigned mismatch causing assert · 88da59ef
      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
      88da59ef
  17. Jun 23, 2021
    • Naveen Albert's avatar
      app_dial: Expanded A option to add caller announcement · c4236dcf
      Naveen Albert authored
      Hitherto, the A option has made it possible to play
      audio upon answer to the called party only. This option
      is expanded to allow for playback of an audio file to
      the caller instead of or in addition to the audio
      played to the answerer.
      
      ASTERISK-29442
      
      Change-Id: If6eed3ff5c341dc8c588c8210987f2571e891e5e
      c4236dcf
  18. Jun 22, 2021
    • Joshua C. Colp's avatar
      core: Don't play silence for Busy() and Congestion() applications. · 5e1cb325
      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
      5e1cb325
    • Bernd Zobl's avatar
      res_pjsip_sdp_rtp: Evaluate remotely held for Session Progress · 6b041d10
      Bernd Zobl authored
      With the fix for ASTERISK_28754 channels are no longer put on hold if an
      outbound INVITE is answered with a "Session Progress" containing
      "inactive" audio.
      
      The previous change moved the evaluation of the media attributes to
      `negotiate_incoming_sdp_stream()` to have the `remotely_held` status
      available when building the SDP in `create_outgoing_sdp_stream()`.
      This however means that an answer to an outbound INVITE, which does not
      traverse `negotiate_incoming_sdp_stream()`, cannot set the
      `remotely_held` status anymore.
      
      This change moves the check so that both, `negotiate_incoming_sdp_stream()` and
      `apply_negotiated_sdp_stream()` can do the checks.
      
      ASTERISK-29479
      
      Change-Id: Icde805a819399d5123b688e1ed1d2bcd9d5b0f75
      6b041d10
  19. Jun 17, 2021
  20. Jun 16, 2021
    • George Joseph's avatar
      res_pjsip_messaging: Overwrite user in existing contact URI · 702e1d33
      George Joseph authored
      When the MessageSend destination is in the form
      PJSIP/<number>@<endpoint> and the endpoint's contact
      URI already has a user component, that user component
      will now be replaced with <number> when creating the
      request URI.
      
      ASTERISK_29404
      
      Change-Id: I80e5910fa25c803d1440da0594a0d6b34b6b4ad5
      702e1d33
  21. Jun 15, 2021
    • Bernd Zobl's avatar
      res_pjsip/pjsip_message_filter: set preferred transport in pjsip_message_filter · 80478803
      Bernd Zobl authored
      Set preferred transport when querying the local address to use in
      filter_on_tx_messages(). This prevents the module to erroneously select
      the wrong transport if more than one transports of the same type (TCP or
      TLS) are configured.
      
      ASTERISK-29241
      
      Change-Id: I598e60257a7f92b29efce1fb3e9a2fc06f1439b6
      80478803
    • Naveen Albert's avatar
      pbx_builtins: Corrects SayNumber warning · 2b174a38
      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
      2b174a38
  22. Jun 11, 2021
    • Jaco Kroon's avatar
      func_lock: Prevent module unloading in-use module. · 6b678210
      Jaco Kroon authored
      
      The scenario where a channel still has an associated datastore we
      cannot unload since there is a function pointer to the destroy and fixup
      functions in play.  Thus increase the module ref count whenever we
      allocate a datastore, and decrease it during destroy.
      
      In order to tighten the race that still exists in spite of this (below)
      add some extra failure cases to prevent allocations in these cases.
      
      Race:
      
      If module ref is zero, an LOCK or TRYLOCK is invoked (near)
      simultaneously on a channel that has NOT PREVIOUSLY taken a lock, and if
      in such a case the datastore is created *prior* to unloading being set
      to true (first step in module unload) then it's possible that the module
      will unload with the destructor being called (and segfault) post the
      module being unloaded.  The module will however wait for such locks to
      release prior to unloading.
      
      If post that we can recheck the module ref before returning the we can
      (in theory, I think) eliminate the last of the race.  This race is
      mostly theoretical in nature.
      
      Change-Id: I21a514a0b56755c578a687f4867eacb8b59e23cf
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      6b678210
    • Jaco Kroon's avatar
      func_lock: Add "dialplan locks show" cli command. · 6f303335
      Jaco Kroon authored
      
      For example:
      
      arthur*CLI> dialplan locks show
      func_lock locks:
      Name                                     Requesters Owner
      uls-autoref                              0          (unlocked)
      1 total locks listed.
      
      Obviously other potentially useful stats could be added (eg, how many
      times there was contention, how many times it failed etc ... but that
      would require keeping the stats and I'm not convinced that's worth the
      effort.  This was useful to troubleshoot some other issues so submitting
      it.
      
      Change-Id: Ib875e56feb49d523300aec5f36c635ed74843a9f
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      6f303335
    • Jaco Kroon's avatar
      func_lock: Fix memory corruption during unload. · a3df5d7d
      Jaco Kroon authored
      
      AST_TRAVERSE accessess current as current = current->(field).next ...
      and since we free current (and ast_free poisons the memory) we either
      end up on a ast_mutex_lock to a non-existing lock that can never be
      obtained, or a segfault.
      
      Incidentally add logging in the "we have to wait for a lock to release"
      case, and remove an ineffective statement that sets memory that was just
      cleared by ast_calloc to zero.
      
      Change-Id: Id19ba3d9867b23d0e6783b97e6ecd8e62698b8c3
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      a3df5d7d
    • Jaco Kroon's avatar
      func_lock: Fix requesters counter in error paths. · 6bd741b7
      Jaco Kroon authored
      
      In two places we bail out with failure after we've already incremented
      the requesters counter, if this occured then it would effectively result
      in unload to wait indefinitely, thus preventing clean shutdown.
      
      Change-Id: I362a6c0dc424f736d4a9c733d818e72d19675283
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      6bd741b7
    • Naveen Albert's avatar
      app_originate: Allow setting Caller ID and variables · a611a0cd
      Naveen Albert authored
      Caller ID can now be set on the called channel and
      Variables can now be set on the destination
      using the Originate application, just as
      they can be currently using call files
      or the Manager Action.
      
      ASTERISK-29450
      
      Change-Id: Ia64cfe97d2792bcbf4775b3126cad662922a8b66
      a611a0cd
Loading