Skip to content
Snippets Groups Projects
  1. Jul 09, 2019
    • Kevin Harwell's avatar
      app_voicemail: Remove dependency on the stasis cache · c93c5791
      Kevin Harwell authored
      app_voicemail utilized the stasis cache when polling mailboxes for MWI. This
      caused a memory leak (items were not being appropriately removed from the
      cache), and subsequent slowdown in system processing. This patch removes the
      stasis cache dependency, thus alleviating the memory leak. It does this by
      utilizing the new MWI API that better manages state lifetime.
      
      ASTERISK-28443
      ASTERISK-27121
      
      Change-Id: Ie89fedaca81ea1fd03d150d9d3a1ef3d53740e46
      c93c5791
  2. Jun 28, 2019
    • Chris-Savinovich's avatar
      app_voicemail.c: Build all three variants for app_voicemail at the same time · 6b1f6ea2
      Chris-Savinovich authored
      Changes made to apps/Makefile to optionally build all three app_voicemail
      variations at the same time: 1) file (default), 2) odbc, and 3) imap.
      This functionality was requested by users. modules.conf.sample warns the
      user to make sure only one voicemail is loaded at a time.
      
      Change-Id: Iba3cd8ffb4b7e8b1c64a11dd383e1eafcd3ed0e7
      6b1f6ea2
  3. Jun 21, 2019
    • Nasir Iqbal's avatar
      app_amd: issue with silence suppression fixed · 29bc7cf6
      Nasir Iqbal authored
      Now AMD algorithm will not ignore AST_FRAME_NULL, As I think using manual
      wait time instead of `framelength` is enough to fix timeout / TOOLONG issue.
      
      ASTERISK-28419 #close
      
      Change-Id: I16ea2d6295bc99b975e8c092e5f9fbd9214debdb
      29bc7cf6
  4. Jun 13, 2019
    • George Joseph's avatar
      app_confbridge: Attended transfer event fixup · f3e5419d
      George Joseph authored
      When a channel already in a conference bridge is attended transfered
      to another extension, or when an existing call is attended
      transferred into a conference bridge, we now generate ConfbridgeJoin
      and ConfbridgeLeave events for the entering and departing channels.
      
      Change-Id: Id7709cfbceb26fbcb828b2d0d2a6b2fbeaf028e1
      f3e5419d
  5. Jun 11, 2019
    • Alexei Gradinari's avatar
      app_attended_transfer: new application AttendedTransfer · 3eaeb3e6
      Alexei Gradinari authored
      AttendedTransfer queues up attended transfer to the given extension.
      
      This application can be useful with Custom Dynamic Features.
      For example to make attended transfer to a predefined number.
      
      features.conf
      ;;;
      [applicationmap]
      my_atxfer => *7,self,GoSub,"my_atxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=my_atxfer
      TRANSFER_CONTEXT=my_transfer
      
      [my_atxfer]
      exten => s,1,AttendedTransfer(1234567890)
         same => n,Return()
      
      [my_transfer]
      include => default
      ;;;
      
      This application also can be used to completly redefine Attended transfer
      feature using dialplan. For example:
      
      features.conf
      ;;;
      [featuremap]
      atxfer => *7
      
      [applicationmap]
      custom_atxfer => *2,self,GoSub,"custom_atxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=custom_atxfer
      TRANSFER_CONTEXT=my_transfer
      
      [custom_atxfer]
      exten => s,1,
         same => n,Playback(pbx-transfer)
         same => n,Read(dest,dial,10,i,3,3)
         same => n,AttendedTransfer(${dest})
         same => n,Return()
      
      [my_transfer]
      include => default
      ;;;
      
      Change-Id: Ie5cfa455d0813cffd5c85a6fb117f07d8f0b903b
      3eaeb3e6
  6. Jun 07, 2019
    • Alexei Gradinari's avatar
      app_blind_transfer: new application BlindTransfer · 745cbab5
      Alexei Gradinari authored
      BlindTransfer redirects all channels currently bridged to the
      caller channel to the specified destination.
      
      This application can be useful with Custom Dynamic Features.
      For example to make blind transfer to a predefined number.
      
      features.conf
      ;;;
      [applicationmap]
      my_blindxfer => *6,self,GoSub,"my_blindxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=my_blindxfer
      
      [my_blindxfer]
      exten => s,1,BlindTransfer(1234567890,default)
         same => n,Return()
      ;;;
      
      This application also can be used to completly redefine Blind transfer
      feature using dialplan. For example:
      
      features.conf
      ;;;
      [featuremap]
      blindxfer =>
      
      [applicationmap]
      custom_blindxfer => ##,self,GoSub,"custom_blindxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=custom_blindxfer
      
      [custom_blindxfer]
      exten => s,1,
         same => n,Playback(pbx-transfer)
         same => n,Read(dest,dial,10,i,3,3)
         same => n,BlindTransfer(${dest},default)
         same => n,Return()
      ;;;
      
      Change-Id: I9d55e7f69ccfd4472dec00d62771d6de8803215a
      745cbab5
  7. May 23, 2019
  8. May 10, 2019
    • George Joseph's avatar
      Fixes for GCC 9 · c5c953c1
      George Joseph authored
      Various fixes for issues caught by gcc 9.  Mostly snprintf
      trying to copy to a buffer potentially too small.
      
      ASTERISK-28412
      
      Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e
      c5c953c1
  9. May 02, 2019
    • Joshua Colp's avatar
      app_confbridge: Add "all" variants of REMB behavior. · 80dba268
      Joshua Colp authored
      When producing a combined REMB value the normal behavior
      is to have a REMB value which is unique for each sender
      based on all of their receivers. This can result in one
      sender having low bitrate while all the rest are high.
      
      This change adds "all" variants which produces a bridge
      level REMB value instead. All REMB reports are combined
      together into a single REMB value that is the same for
      each sender.
      
      ASTERISK-28401
      
      Change-Id: I883e6cc26003b497c8180b346111c79a131ba88c
      80dba268
  10. Apr 30, 2019
  11. Apr 29, 2019
    • Rodrigo Ramírez Norambuena's avatar
      app_queue: Set correct value by default for shared_lastcall · ed615afb
      Rodrigo Ramírez Norambuena authored
      There a long history here:
      
      In commit dd1e62c0 has introduce by default shared_lastcall = true by
      default but this now only happen is there not [general] directive in
      queues.conf
      
      After that, the commit 4b50e3f1 fix the
      sample file.
      
      We'll need to keep the same setting if there a general or not section in
      configuration file since the shared_lastcall is by a long time in
      sample files as default value to 'no'.
      
      Change-Id: Id44faec370136df8d57902b453ad4059ed21b94c
      ed615afb
  12. Apr 24, 2019
    • Antoni Goldstein's avatar
      app_dial.c: RINGTIME, PROGRESSTIME and ms resolution dial timings · 8e21c25c
      Antoni Goldstein authored
      Added RINGTIME, RINGTIME_MS, PROGRESSTIME, PROGRESSTIME_MS variables filled
      at the earliest received PROGRESS or RINGING.
      Added millisecond versions of DIALEDTIME and ANSWEREDTIME.
      
      Added millisecond versions of ast_channel_get_up_time and
      ast_channel_get_duration in channel.c.
      
      ASTERISK-28363
      
      Change-Id: If95f1a7d8c4acbac740037de0c6e3109ff6620b1
      8e21c25c
  13. Apr 23, 2019
    • Kevin Harwell's avatar
      mwi core: Move core MWI functionality into its own files · ff0d0ac2
      Kevin Harwell authored
      There is enough MWI functionality to warrant it having its own 'c' and header
      files. This patch moves all current core MWI data structures, and functions
      into the following files:
      
      main/mwi.h
      main/mwi.c
      
      Note, code was simply moved, and not modified. However, this patch is also in
      preparation for core MWI changes, and additions to come.
      
      Change-Id: I9dde8bfae1e7ec254fa63166e090f77e4d3097e0
      ff0d0ac2
  14. Apr 13, 2019
    • Sean Bright's avatar
      app_voicemail: Don't split mailbox options on comma · d58d7d45
      Sean Bright authored
      Because the per-mailbox options are the last thing on a line, don't look
      for or stomp on any subsequent commas.
      
      ASTERISK-27935 #close
      Reported by: Sébastien Duthil
      
      Change-Id: I07b2eb4a33c303d0c7114d5b906f8c067c60a153
      d58d7d45
  15. Apr 12, 2019
    • Sean Bright's avatar
      app_voicemail: Cleanup stale lock files on module load · 63f86cac
      Sean Bright authored
      If Asterisk crashes while a VM directory is locked, lock files in the VM
      spool directory will not get properly cleaned up. We now clear them on
      module load.
      
      ASTERISK-20207 #close
      Reported by: Steven Wheeler
      
      Change-Id: If40ccd508e2f6e5ade94dde2f0bcef99056d0aaf
      63f86cac
  16. Mar 29, 2019
    • Sean Bright's avatar
      app_queue: Fix a few member pause bugs · e8cf3693
      Sean Bright authored
      * Always set member->lastpause when setting member->paused
      
      * Fixed typo (using member->lastcall instead of member->lastpause) in
        'queue show' output.
      
      * Use a constant 'now' in 'queue show' output for a better point-in-time
        view of time based stats.
      
      ASTERISK-27541 #close
      Reported by: César Benjamín García Martínez
      
      Change-Id: Ib41ced90cfdb66f9bb1e7b263d0f6fc1ac6e18fa
      e8cf3693
  17. Mar 26, 2019
  18. Mar 13, 2019
  19. Mar 11, 2019
    • Joshua Colp's avatar
      stasis: Improve topic/subscription names and statistics. · 0231dd6a
      Joshua Colp authored
      Topic names now follow: <subsystem>:<functionality>[/<object>]
      
      This ensures that they are all unique, and also provides better
      insight in to what each topic is for.
      
      Subscriber ids now also use the main topic name they are
      subscribed to and an incrementing integer as their identifier to
      make it easier to understand what the subscription is primarily
      responsible for.
      
      Both the CLI commands for listing topic and subscription statistics
      now sort to make it a bit easier to see what is going on.
      
      Subscriptions will now show all topics that they are receiving messages
      from, not just the main topic they were subscribed to.
      
      ASTERISK-28335
      
      Change-Id: I484e971a38c3640f2bd156282e532eed84bf220d
      0231dd6a
  20. Mar 08, 2019
  21. Mar 04, 2019
    • Sean Bright's avatar
      app_queue: Handle empty 'interface' in queue member config · f6b5b720
      Sean Bright authored
      While the 'interface' column is a NOT NULL, the empty string is still
      allowed. res_config_odbc treats the empty string as a NULL and we crash
      when trying to dereference.
      
      Also cleaned up an adjacent error message for consistency.
      
      ASTERISK-28168 #close
      
      Change-Id: I55e012b540fbcda99bb40bede3099b7ae5db8202
      f6b5b720
  22. Feb 19, 2019
  23. Feb 07, 2019
    • Joshua Colp's avatar
      res_odbc: Add basic query logging. · 54a912b2
      Joshua Colp authored
      When Asterisk is connected and used with a database the response
      time of the database can cause problems in Asterisk if it is long.
      Normally the only way to see this problem would be to retrieve a
      backtrace from Asterisk and examine where things are blocked, or
      examine the database to see if there is any indication of a
      problem.
      
      This change adds some basic query logging to make it easier to
      investigate such a problem. When logging is enabled res_odbc will
      now keep track of the number of queries executed, as well as the
      query that has taken the longest time to execute. There is also
      an option which will cause a WARNING message to be output if a
      query takes longer than a configurable amount of time to execute.
      
      This makes it easier and clearer for users that their database may
      be experiencing a problem that could impact Asterisk.
      
      ASTERISK-28277
      
      Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6
      54a912b2
  24. Jan 22, 2019
    • George Joseph's avatar
      app_voicemail: Add Mailbox Aliases · c6980e32
      George Joseph authored
      You can now define an "aliases" context in voicemail.conf
      whose entries point to actual mailboxes.  These can be used anywhere
      the mailbox is specified.
      
      Example:
      [general]
      aliasescontext = myaliases
      
      [default]
      1234 = yadayada
      
      [myaliases]
      4321@devices = 1234@default
      
      Now you can use 4321@devices to refer to the 1234@default mailbox.
      
      This can be useful to provide channel drivers with constant
      mailbox specifications such as <extension>@devices leaving
      app_voicemail to control exactly which mailbox the alias points to.
      Now, only voicemail has to be reloaded to make changes instead of
      individual channel drivers which are usually more expensive to
      reload.
      
      Change-Id: I395b9205c91523a334fe971be0d1de4522067b04
      c6980e32
  25. Jan 02, 2019
  26. Dec 18, 2018
    • George Joseph's avatar
      app_voicemail: Don't delete mailbox state unless mailbox is deleted · c23c8d92
      George Joseph authored
      The free_user function was automatically deleting the stasis mailbox
      state but this only makes sense when the mailbox is actually
      deleted, not just the structure freed.  This was causing issues
      where leave_voicemail would publish the mwi message to stasis and
      delete the state before the message could be processed by
      res_pjsip_mwi.
      
      * Removed the delete of state from free_user().
      
      * Created a new free_user_final() function that both frees the data
        structure and deletes the state.  This function is only called
        during module load/unload where it's appropriate to delete the
        state.
      
      ASTERISK-28215
      
      Change-Id: I305e8b3c930e9ac41d901e5dc8a58fd7904d98dd
      c23c8d92
  27. Dec 12, 2018
  28. Dec 03, 2018
  29. Nov 29, 2018
    • George Joseph's avatar
      Revert "app_voicemail: Remove need to subscribe to stasis" · 4f0bf027
      George Joseph authored
      This reverts commit 29115e23.
      
      That commit closed a long standing hole which allowed subscriptions
      to mailboxes that weren't configured in voicemail.conf.  This
      caused an issue with FreePBX which depdended on that behavior.
      The commit is being reverted until FreePBX can handle the new
      behavior.
      
      ASTERISK-28151
      Reported by: Ronald Raikes
      
      Change-Id: I57b7b85e75d7dd97c742b5c69d718a0f61260c15
      4f0bf027
  30. Nov 26, 2018
    • George Joseph's avatar
      bridges: Remove reliance on stasis caching · 3667c5e1
      George Joseph authored
      * The bridging core no longer uses the stasis cache for bridge
        snapshots.  The latest bridge snapshot is now stored on the
        ast_bridge structure itself.
      
      * The following APIs are no longer available since the stasis cache
        is no longer used:
          ast_bridge_topic_cached()
          ast_bridge_topic_all_cached()
      
      * A topic pool is now used for individual bridge topics.
      
      * The ast_bridge_cache() function was removed since there's no
        longer a separate container of snapshots.
      
      * A new function "ast_bridges()" was created to retrieve the
        container of all bridges.  Users formerly calling
        ast_bridge_cache() can use the new function to iterate over
        bridges and retrieve the latest snapshot directly from the
        bridge.
      
      * The ast_bridge_snapshot_get_latest() function was renamed to
        ast_bridge_get_snapshot_by_uniqueid().
      
      * A new function "ast_bridge_get_snapshot()" was created to retrieve
        the bridge snapshot directly from the bridge structure.
      
      * The ast_bridge_topic_all() function now returns a normal topic
        not a cached one so you can't use stasis cache functions on it
        either.
      
      * The ast_bridge_snapshot_type() stasis message now has the
        ast_bridge_snapshot_update structure as it's data.  It contains
        the last snapshot and the new one.
      
      * cdr, cel, manager and ari have been updated to use the new
        arrangement.
      
      Change-Id: I7049b80efa88676ce5c4666f818fa18ad1985369
      3667c5e1
    • Joshua Colp's avatar
      stasis: Segment channel snapshot to reduce creation cost. · 50ac85cb
      Joshua Colp authored
      When a channel snapshot was created it used to be done
      from scratch, copying all data (many strings). This incurs
      a cost when doing so.
      
      This change segments the channel snapshot into different
      components which can be reused if unchanged from the
      previous snapshot creation, reducing the cost. In normal
      cases this results in some pointers being copied with
      reference count being bumped, some integers being set,
      and a string or two copied. The other benefit is that it
      is now possible to determine if a channel snapshot update
      is redundant and thus stop it before a message is published
      to stasis.
      
      The specific segments in the channel snapshot were split up
      based on whether they are changed together, how often they
      are changed, and their general grouping. In practice only
      1 (or 0) of the segments actually get changed in normal
      operation.
      
      Invalidation is done by setting a flag on the channel when
      the segment source is changed, forcing creation of a new
      segment when the channel snapshot is created.
      
      ASTERISK-28119
      
      Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
      50ac85cb
    • Joshua Colp's avatar
      stasis: Use an implementation specific channel snapshot cache. · d0ccbb33
      Joshua Colp authored
      Channels no longer use the Stasis cache for channel snapshots. Instead
      they are stored in a hash table in stasis_channels which reduces the
      number of Stasis messages created and allows better storage.
      
      As a result the following APIs are no longer available since the stasis
      cache is no longer used:
      ast_channel_topic_cached()
      ast_channel_topic_all_cached()
      
      The ast_channel_cache_all() and ast_channel_cache_by_name() functions
      now return an ao2_container of ast_channel_snapshots rather than
      a container of stasis_messages therefore you can't (and don't need
      to) call stasis_cache functions on it.
      
      The ast_channel_topic_all() function now returns a normal topic not
      a cached one so you can't use stasis cache functions on it either.
      
      The ast_channel_snapshot_type() stasis message now has the
      ast_channel_snapshot_update structure as it's data. It contains the
      last snapshot and the new one.
      
      ast_channel_snapshot_get_latest() still returns the latest snapshot.
      
      The latest snapshot is now stored on the channel itself to eliminate
      cache hits when Stasis messages that have the snapshot as a payload
      are created.
      
      ASTERISK-28102
      
      Change-Id: I9334febff60a82d7c39703e49059fa3a68825786
      d0ccbb33
  31. Nov 21, 2018
  32. Nov 19, 2018
  33. Nov 18, 2018
    • Joshua Colp's avatar
      stasis: Add internal filtering of messages. · 3077ad0c
      Joshua Colp authored
      This change adds the ability for subscriptions to indicate
      which message types they are interested in accepting. By
      doing so the filtering is done before being dispatched
      to the subscriber, reducing the amount of work that has
      to be done.
      
      This is optional and if a subscriber does not add
      message types they wish to accept and set the subscription
      to selective filtering the previous behavior is preserved
      and they receive all messages.
      
      There is also the ability to explicitly force the reception
      of all messages for cases such as AMI or ARI where a large
      number of messages are expected that are then generically
      converted into a different format.
      
      ASTERISK-28103
      
      Change-Id: I99bee23895baa0a117985d51683f7963b77aa190
      3077ad0c
  34. Oct 24, 2018
    • Alexei Gradinari's avatar
      app_dial/queue/followme: 'I' options to block initial updates in both directions · 4a567cee
      Alexei Gradinari authored
      The 'I' option currently blocks initial CONNECTEDLINE or REDIRECTING updates
      from the called parties to the caller.
      
      This patch also blocks updates in the other direction before call is
      answered.
      
      ASTERISK-27980
      
      Change-Id: I6ce9e151a2220ce9e95aa66666933cfb9e2a4a01
      4a567cee
    • George Joseph's avatar
      bridge_softmix: Add SDP "label" attribute to streams · 8d1c6bb6
      George Joseph authored
      Adding the "label" attribute used for participant info correlation
      was previously done in app_confbridge but it wasn't working
      correctly because it didn't have knowledge about which video
      streams belonged to which channel.  Only bridge_softmix has that
      data so now it's set when the bridge topology is changed.
      
      ASTERISK-28107
      
      Change-Id: Ieddeca5799d710cad083af3fcc3e677fa2a2a499
      8d1c6bb6
  35. Oct 18, 2018
    • Richard Mudgett's avatar
      app_dial/app_queue: Update application option documentation · 9838a5e5
      Richard Mudgett authored
      * Update the post-answer documentation and example.  The Dial example was
      incorrect and misleading for the post-answer subroutine useage.
      
      * Fix note and warning paragraphs in option descriptions.  They don't show
      up in the wiki.
      
      Change-Id: I81019a1fd75d5b9151f76b52c38e2a90da682d14
      9838a5e5
  36. Oct 17, 2018
    • Corey Farrell's avatar
      taskprocessor: Warn on unused result from pushing task. · 5ab94d2a
      Corey Farrell authored
      Add attribute_warn_unused_result to ast_taskprocessor_push,
      ast_taskprocessor_push_local and ast_threadpool_push.  This will help
      ensure we perform the necessary cleanup upon failure.
      
      Change-Id: I7e4079bd7b21cfe52fb431ea79e41314520c3f6d
      5ab94d2a
Loading