Skip to content
Snippets Groups Projects
  1. Jul 14, 2017
  2. Jul 11, 2017
    • Benjamin Keith Ford's avatar
      manager: Remove AMI "Queues" action. · 5d86da61
      Benjamin Keith Ford authored
      When performing the "Queues" action via AMI, it outputs the same
      text that the Asterisk CLI outputs when running a "queue show"
      command, which does not conform with the AMI spec. "QueueStatus"
      already does what the "Queues" action should do, so instead of
      correcting the output, the "Queues" action will be removed and
      "QueueStatus" should be used instead.
      
      ASTERISK-27073 #close
      Reported by: Brian
      
      Change-Id: Id11743859758255b69cc3a557750d7a56c6d16f8
      5d86da61
  3. 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
  4. Jul 01, 2017
    • Sean Bright's avatar
      app_voicemail: Cleanup ODBC connection handling · 950b39a4
      Sean Bright authored
      The primary focus of this patch is adding a missing call to
      ast_odbc_release_obj(), but is also a general cleanup of the ODBC
      related code in app_voicemail.
      
      ASTERISK-27093 #close
      
      Change-Id: I8e285142eaeb3146b4287a928276b70db76c902b
      950b39a4
  5. Jun 30, 2017
    • Kevin Harwell's avatar
      app_stream_echo: misc bug fixes · e7d41050
      Kevin Harwell authored
      Fixed the following bugs:
      
      * calls to stream_echo_write had the last two parameters swapped
      * ast_read should have been ast_read_stream
      * added a null check on the frame's subclass format
      
      This also resets the update_sent flag upon receiving SRRCHANGE control frame.
      This will then force a video update.
      
      ASTERISK-26997
      
      Change-Id: I6ad7c8253559b800800433c52339e7f5aa583566
      e7d41050
  6. Jun 29, 2017
  7. Jun 27, 2017
    • Ivan Poddubny's avatar
      app_queue: Fix returning to dialplan when a queue is empty · 78277555
      Ivan Poddubny authored
      The fix for ASTERISK-25665 introduced a regression.
      The return value of queue_exec used to be 0 in case of leavewhenempty
      but it was changed to -1 (returned from wait_our_turn and passed
      transparently by queue_exec), thus leading to hangup instead of returning
      back to dialplan.
      
      This commit resets the value back to 0 in this case, restoring
      original behavior.
      
      ASTERISK-27065 #close
      Reported by: Marek Cervenka
      
      Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
      78277555
  8. Jun 22, 2017
    • Alexei Gradinari's avatar
      app_voicemail: IMAP connection control · 0cef7b9d
      Alexei Gradinari authored
      A new global option "imap_poll_logout" was added to specify whether need to
      disconnect from the IMAP server after polling of mailboxes.
      
      ASTERISK-27068 #close
      
      Closing IMAP connection after loading mailbox from voicemail.conf
      
      ASTERISK-24052 #close
      
      Change-Id: Ib7558ba04516240a32b65f42e9be64372a0ae12a
      0cef7b9d
  9. Jun 16, 2017
  10. Jun 14, 2017
  11. May 31, 2017
  12. May 30, 2017
    • Mark Michelson's avatar
      Confbridge: Add "sfu" video mode to bridge profile options. · 39d14834
      Mark Michelson authored
      A previous commit added plumbing to bridge_softmix to allow for an SFU
      experience with Asterisk. This commit adds an option to app_confbridge
      that allows for a confbridge to actually make use of the SFU video mode.
      
      SFU mode is implemented in a "set it and forget it" kind of way. That
      is, when the bridge is created, if SFU mode is enabled, then the video
      mode gets set to SFU and cannot be changed. Future improvements may
      allow for a hybrid experience (e.g. forward multiple video streams,
      specifically those of the most recent talkers), but for this addition,
      no such capability is present.
      
      Change-Id: I87bbcb63dec6dbbb42488f894871b86f112b2020
      39d14834
    • Mark Michelson's avatar
      Add primitive SFU support to bridge_softmix. · 2da86940
      Mark Michelson authored
      This sets up the "plumbing" in bridge_softmix to
      be able to accommodate Asterisk asking as an SFU
      (selective forwarding unit) for conferences.
      
      The way this works is that whenever a channel enters or leaves a
      conference, all participants in the bridge get sent a stream topology
      change request. The topologies consist of the channels' original
      topology, along with video destination streams corresponding to each
      participants' source video streams. So for instance, if Alice, Bob, and
      Carol are in the conference, and each supplies one video stream, then
      the topologies for each would look like so:
      
      Alice:
      Audio,
      Source video(Alice),
      Destination Video(Bob),
      Destination video (Carol)
      
      Bob:
      Audio,
      Source video(Bob)
      Destination Video(Alice),
      Destination video (Carol)
      
      Carol:
      Audio,
      Source video(Carol)
      Destination Video(Alice),
      Destination video (Bob)
      
      This way, video that arrives from a source video stream can then be
      copied out to the destination video streams on the other participants'
      channels.
      
      Once the bridge gets told that a topology on a channel has changed, the
      bridge constructs a map in order to get the video frames routed to the
      proper destination streams. This is done using the bridge channel's
      stream_map.
      
      This change is bare-bones with regards to SFU support. Some key features
      are missing at this point:
      
      * Stream limits. This commit makes no effort to limit the number of
        streams on a specific channel. This means that if there were 50 video
        callers in a conference, bridge_softmix will happily send out topology
        change requests to every channel in the bridge, requesting 50+
        streams.
      
      * Configuration. The plumbing has been added to bridge_softmix, but
        there has been nothing added as of yet to app_confbridge to enable SFU
        video mode.
      
      * Testing. Some functions included here have unit tests.
        However, the functionality as a whole has only been verified by
        hand-tracing the code.
      
      * Selectivenss. For a "selective" forwarding unit, this does not
        currently have any means of being selective.
      
      * Features. Presumably, someone might wish to only receive video from
        specific sources. There are no external-facing functions at the moment
        that allow for users to select who they receive video from.
      
      * Efficiency. The current scheme treats all video streams as being
        unidirectional. We could be re-using a source video stream as a
        desetnation, too. But to simplify things on this first round, I did it
        this way.
      
      Change-Id: I7c44a829cc63acf8b596a337b2dc3c13898a6c4d
      2da86940
  13. May 23, 2017
    • Joshua Colp's avatar
      app_queue: Fix members showing as being in call when not. · faab0580
      Joshua Colp authored
      A change was done which added an 'in_call' flag to queue
      members that was set to true while talking to an agent.
      Unfortunately in practice this does not accurately reflect
      whether they are talking to an agent or not. If a Local
      channel is involved and a transfer is performed then the
      app_queue application would incorrectly think the agent
      was still in a call with the caller. This was done to
      fix a race condition between an agent becoming available
      by device state and the checking of the last call information
      for the wrapup time. There was a small window where the
      last call information would be the previous value instead
      of the new one.
      
      This change goes about fixing the original issue in a
      different way by considering the call completed if device
      state is received which would make the agent available
      and if they are currently in a call. If this occurs the
      last call information is updated before the agent becomes
      available ensuring that old information is not present
      when checking if the member should be called. This also
      improves the transfer situation by actually updating
      and enforcing the wrapup time.
      
      ASTERISK-26399
      ASTERISK-26400
      ASTERISK-26715
      ASTERISK-26975
      
      Change-Id: Ife1cb686e3173b3a6d368601adef9aff69d4beea
      faab0580
    • Robert Mordec's avatar
      app_confbridge: Race between removing and playing name recording while leaving · 36e90952
      Robert Mordec authored
      When user leaves a conference, its channel calls async_play_sound_file()
      in order to play the name announcement and then unlinks the sound file.
      The async_play_sound_file() function adds a task to conference playback queue,
      which then runs playback_common() function in a different thread.
      
      It leads to a race condition when, in some cases, channel thread may unlink
      the sound file before playback_common() had a chance to open it.
      
      This patch creates a file deletion task, that is queued after playback.
      
      ASTERISK-27012 #close
      
      Change-Id: I412f7922d412004b80917d4e892546c15bd70dd3
      36e90952
  14. May 22, 2017
    • Steve Davies's avatar
      app_queue: Add QUEUE_RAISE_PENALTY feature · be4beff3
      Steve Davies authored
      Additional variable to work alongside QUEUE_MAX_PENALTY and QUEUE_MIN_PENALTY,
      including an extra parameter in queuerules.conf. This value causes lower
      Agent penalty values to "raise up" so that they can join higher penalty agents
      and be treated equally after a period of time.
      
      ASTERISK-26995 #close
      
      Change-Id: If1c6421a983667a5ac4c359f6dac25b212b4c459
      be4beff3
  15. May 17, 2017
    • Kevin Harwell's avatar
      app_stream_echo: Added a multi-stream echo application · a60d1f39
      Kevin Harwell authored
      If the channel does not have multi-stream support then this application acts
      just like app_echo. If it does have multi-stream support then each stream is
      echoed back to itself (one-to-one).
      
      If a "num" is specified, then a new topology is made that contains clones (from
      the channel's topology) of all media types that are not equal to the given
      "type". If the media type differs then the first stream matching the "type" is
      cloned into the new topology and then up to "num" - 1 of the same stream are
      also cloned into it. Any additional streams from the original topology matching
      the "type" are subsequently ignored (i.e. not added to the new topology).
      
      For this same case when a frame is read from a stream that frame is still
      echoed back like before, but now that frame is also echoed out to the
      additional streams that matched on the specified "type".
      
      ASTERISK-26997 #close
      
      Change-Id: I254144486734178e196c7f590a26ffc13543ff2c
      a60d1f39
  16. May 16, 2017
    • Joshua Colp's avatar
      asterisk: Audit locking of channel when manipulating flags. · 5a7af00e
      Joshua Colp authored
      When manipulating flags on a channel the channel has to be
      locked to guarantee that nothing else is also manipulating
      the flags. This change introduces locking where necessary to
      guarantee this. It also adds helper functions that manipulate
      channel flags and lock to reduce repeated code.
      
      ASTERISK-26789
      
      Change-Id: I489280662dba0f4c50981bfc5b5a7073fef2db10
      5a7af00e
  17. May 11, 2017
    • Ivan Poddubny's avatar
      app_queue: Fix duplicate queue_log entries for EXITEMPTY and ABANDON · 045dbcc2
      Ivan Poddubny authored
      There are 2 places in app_queue.c that log EXITEMPTY event: one in
      wait_our_turn, and another one in queue_exec in the loop trying to
      call an agent after wait_our_turn.
      
      In most cases it leads to logging EXITEMPTY twice.
      
      ABANDON is also logged on two places, and in the rare case when an agent
      and caller hang up simultaneously it's also possible to get duplicates
      in queue_log.
      
      This commit changes wait_our_turn to return -1 ("the caller should exit
      the queue") instead of 0 ("the caller's turn has arrived") in case of
      leaving when empty, so queue_exec skips the agent calling loop.
      
      Also, leave_queue is now executed only once in this case, because 2nd
      time is just a noop when the queue entry has already been removed.
      
      Also, it sets qe->handled to -1 to indicate that the call was not
      answered by an agent, but the necessary handling has already been done
      in order to avoid logging an extra ABANDON entry.
      
      ASTERISK-25665 #close
      Reported by: Ove Aursand
      
      Change-Id: I4578dd383bf2ac41589cf167865e8aaebcd4c11e
      045dbcc2
  18. May 05, 2017
    • George Joseph's avatar
      app_confbridge: Fix reference to cfg in menu_template_handler · 00018341
      George Joseph authored
      menu_template_handler wasn't properly accounting for the fact that
      it might be called both during a load/reload (which isn't really
      valid but not prevented) and by a dialplan function.  In both cases
      it was attempting to use the "pending" config which wasn't valid in
      the latter case.  aco_process_config is also partly to blame because
      it wasn't properly cleaning "pending" up when a reload was done and
      no changes were made.  Both of these contributed to a crash if
      CONFBRIDGE(menu,template) was called in a dialplan after a reload.
      
      * aco_process_config now sets info->internal->pending to NULL
        after it unrefs it although this isn't strictly necessary in the
        context of this fix.
      * menu_template_handler now uses the "current" config and silently
        ignores any attempt to be called as a result of someone uses the
        "template" parameter in the conf file.
      
      Luckily there's no other place in the codebase where
      aco_pending_config is used outside of aco_process_config.
      
      ASTERISK-25506 #close
      Reported-by: Frederic LE FOLL
      
      Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
      00018341
  19. Apr 27, 2017
    • Joshua Colp's avatar
      channel: Add ability to request an outgoing channel with stream topology. · 2b22c3c8
      Joshua Colp authored
      This change extends the ast_request functionality by adding another
      function and callback to create an outgoing channel with a requested
      stream topology. Fallback is provided by either converting the
      requested stream topology into a format capabilities structure if
      the channel driver does not support streams or by converting the
      requested format capabilities into a stream topology if the channel
      driver does support streams.
      
      The Dial application has also been updated to request an outgoing
      channel with the stream topology of the calling channel.
      
      ASTERISK-26959
      
      Change-Id: Ifa9037a672ac21d42dd7125aa09816dc879a70e6
      2b22c3c8
  20. Apr 25, 2017
    • Sean Bright's avatar
      cleanup: Fix fread() and fwrite() error handling · f5b67871
      Sean Bright authored
      Cleaned up some of the incorrect uses of fread() and fwrite(), mostly in
      the format modules. Neither of these functions will ever return a value
      less than 0, which we were checking for in some cases.
      
      I've introduced a fair amount of duplication in the format modules, but
      I plan to change how format modules work internally in a subsequent
      patch set, so this is simply a stop-gap.
      
      Change-Id: I8ca1cd47c20b2c0b72088bd13b9046f6977aa872
      f5b67871
  21. Apr 12, 2017
    • George Joseph's avatar
      modules: change module LOAD_FAILUREs to LOAD_DECLINES · 747beb1e
      George Joseph authored
      In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed
      to AST_MODULE_LOAD_DECLINE.  This prevents asterisk from exiting
      if a module can't be loaded.  If the user wishes to retain the
      FAILURE behavior for a specific module, they can use the "require"
      or "preload-require" keyword in modules.conf.
      
      A new API was added to logger: ast_is_logger_initialized().  This
      allows asterisk.c/check_init() to print to the error log once the
      logger subsystem is ready instead of just to stdout.  If something
      does fail before the logger is initialized, we now print to stderr
      instead of stdout.
      
      Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
      747beb1e
  22. Apr 05, 2017
    • Troy Bowman's avatar
      app_queue: Log reason for PAUSEALL/UNPAUSEALL · fac5115c
      Troy Bowman authored
      We needed the reason for our reporting when agents pause/unpause all of
      their queues at once.  This is a small, simple patch that adds a reason
      for PAUSEALL and UNPAUSEALL.  I have been using it in production for years.
      
      ASTERISK-26920 #close
      
      Change-Id: Ifb3f0d1a0abd5194253d9794023546e1395baf3d
      fac5115c
  23. Mar 27, 2017
    • Joshua Colp's avatar
      channel: Remove old epoll support and fixed max number of file descriptors. · 5d938045
      Joshua Colp authored
      This change removes the old epoll support which has not been used or
      maintained in quite some time.
      
      The fixed number of file descriptors on a channel has also been removed.
      File descriptors are now contained in a growable vector. This can be
      used like before by specifying a specific position to store a file
      descriptor at or using a new API call, ast_channel_fd_add, which adds
      a file descriptor to the channel and returns its position.
      
      Tests have been added which cover the growing behavior of the vector
      and the new API call.
      
      ASTERISK-26885
      
      Change-Id: I1a754b506c009b83dfdeeb08c2d2815db30ef928
      5d938045
  24. Mar 21, 2017
  25. Mar 17, 2017
    • Robert Mordec's avatar
      app_queue: Member stuck as pending after forwarding previous call from queue · 79069f8c
      Robert Mordec authored
      Queue member will get stuck in pending_members if queue calls a device
      that is different from the one observed for state changes.
      
      This patch removes members from pending_members as a result of channel stasis
      events such as blind or attended transfers and hangup.
      
      ASTERISK-26862 #close
      
      Change-Id: I8bf6df487b9bb35726c08049ff25cdad5e357727
      79069f8c
    • Sean Bright's avatar
      app_queue: Fix locking behavior in stasis message handlers · c13ea608
      Sean Bright authored
      The queue_stasis_data structure contains various mutable fields that require
      appropriate locking. Specifically, the 'dying,' 'member_uniqueid,' and
      'caller_uniqueid' fields need to be locked when read from or written to.
      
      Change-Id: I246b7dbff8447acc957a1299f6ad0ebd0fd39088
      c13ea608
  26. Mar 16, 2017
  27. Mar 15, 2017
    • Richard Mudgett's avatar
      autochan/mixmonitor/chanspy: Fix unsafe channel locking and references. · c87e7dd9
      Richard Mudgett authored
      Dereferencing struct ast_autochan.chan without first calling
      ast_autochan_channel_lock() is unsafe because the pointer could change at
      any time due to a masquerade.  Unfortunately, ast_autochan_channel_lock()
      itself uses struct ast_autochan.chan unsafely and can result in a deadlock
      if the original channel happens to get destroyed after a masquerade in
      addition to the pointer getting changed.
      
      The problem is more likely to happen with v11 and earlier because
      masquerades are used to optimize out local channels on those versions.
      However, it could still happen on newer versions if the channel is
      executing a dialplan application when the channel is transferred or
      redirected.  In this situation a masquerade still must be used.
      
      * Added a lock to struct ast_autochan to safely be able to use
      ast_autochan.chan while trying to get the channel lock in
      ast_autochan_channel_lock().  The locking order is the channel lock then
      the autochan lock.  Locking in the other direction requires deadlock
      avoidance.
      
      * Fix unsafe ast_autochan.chan usages in app_mixmonitor.c.
      
      * Fix unsafe ast_autochan.chan usages in app_chanspy.c.
      
      * app_chanspy.c: Removed unused autochan parameter from next_channel().
      
      ASTERISK-26867
      
      Change-Id: Id29dd22bc0f369b44e23ca423d2f3657187cc592
      c87e7dd9
    • Sean Bright's avatar
      app_queue: Handle the caller being redirected out of a queue bridge · 982d6173
      Sean Bright authored
      A caller can leave the Queue() application after being bridged with a
      member in a few ways:
      
        * Caller or member hangup
        * Caller is transferred somewhere else (blind or atx)
        * Caller is externally redirected elsewhere
      
      The first 2 scenarios are currently handled by subscribing to stasis
      messages, but the 3rd is not explicitly covered. If a caller is
      redirected away from the Queue() application, the member who was last
      bridged with that caller will remain in an "In use" state until the
      caller hangs up.
      
      This patch adds handling of the caller leaving the queue via
      redirection. We monitor the caller-member bridge, and if the caller is
      the one that leaves, we treat it the same as we would a caller hangup.
      
      ASTERISK-26400 #close
      Reported by: Etienne Lessard
      
      Change-Id: Iba160907770de5a6c9efeffc9df5a13e9ea75334
      982d6173
  28. Mar 08, 2017
  29. Feb 24, 2017
  30. Feb 23, 2017
    • frahaase's avatar
      Binaural synthesis (confbridge): Adds binaural synthesis to bridge_softmix. · 094c26aa
      frahaase authored
      Adds binaural synthesis to bridge_softmix (via convolution using libfftw3).
      Binaural synthesis is conducted at 48kHz.
      For a conference, only one spatial representation is rendered.
      The default rendering is applied for mono-capable channels.
      
      ASTERISK-26292
      
      Change-Id: Iecdb381b6adc17c961049658678f6219adae1ddf
      094c26aa
  31. Feb 21, 2017
    • Sean Bright's avatar
      realtime: Fix ast_load_realtime_multientry handling · ab04a018
      Sean Bright authored
      ast_load_realtime_multientry() returns an ast_config structure whose
      ast_categorys are keyed with the empty strings. Several modules were
      giving semantic meaning to the category names causing problems at
      runtime.
      
      * app_directory: Treated the category name as the mailbox name, and
        would fail to direct calls to the appropriate extension after an
        entry was chosen.
      
      * app_queue: Queues, queue members, and queue rules were all affected
        and needed to be updated.
      
      * pbx_realtime: Pattern matching would never succeed because the
        extension entered by the user was always compared to the empty
        string.
      
      Change-Id: Ie7e44986344b0b76ea8f6ddb5879f5040c6ca8a7
      ab04a018
  32. Feb 20, 2017
  33. Feb 14, 2017
    • Sean Bright's avatar
      app_voicemail: Allow 'Comedian Mail' branding to be overriden · 275f469a
      Sean Bright authored
      Original patch by John Covert, slight modifications by me.
      
      ASTERISK-17428 #close
      Reported by: John Covert
      Patches:
      	app_voicemail.c.patch (license #5512) patch uploaded by
              John Covert
      
      Change-Id: Ic3361b0782e5a5397a19ab18eb8550923a9bd6a6
      275f469a
    • rrittgarn's avatar
      app_voicemail: VoiceMailPlayMsg did not play database stored messages · 2b245b12
      rrittgarn authored
      When attempting to use VoiceMailPlayMsg with a realtime data backend
      the message is located, but never retrieved. This patch adds the
      required RETRIEVE and DISPOSE calls that will fetch the message from
      the database (and IMAP storage as well for that matter).
      
      Also, removed extraneous make_file call.
      
      ASTERISK-26723 #close
      
      Change-Id: I1e122dd53c0f3d7faa10f3c2b7e7e76a47d51b8c
      2b245b12
    • Sean Bright's avatar
      app_record: Add option to prevent silence from being truncated · 662c9e69
      Sean Bright authored
      When using Record() with the silence detection feature, the stream is
      written out to the given file. However, if only 'silence' is detected,
      this file is then truncated to the first second of the recording.
      
      This patch adds the 'u' option to Record() to override that behavior.
      
      ASTERISK-18286 #close
      Reported by: var
      Patches:
      	app_record-1.8.7.1.diff (license #6184) patch uploaded by var
      
      Change-Id: Ia1cd163483235efe2db05e52f39054288553b957
      662c9e69
Loading