Skip to content
Snippets Groups Projects
  1. Nov 30, 2021
    • Naveen Albert's avatar
      documentation: Standardize examples · bcb7aee7
      Naveen Albert authored
      Most examples in the XML documentation use the
      example tag to demonstrate examples, which gets
      parsed specially in the Wiki to make it easier
      to follow for users.
      
      This fixes a few modules to use the example
      tag instead of vanilla para tags to bring them
      in line with the standard syntax.
      
      ASTERISK-29777 #close
      
      Change-Id: I9acb6cc5faf1d220e73c6dd28592371d768d279b
      bcb7aee7
  2. Nov 15, 2021
    • Josh Soref's avatar
      res: Spelling fixes · dcf492e7
      Josh Soref authored
      Correct typos of the following word families:
      
      identifying
      structures
      actcount
      initializer
      attributes
      statement
      enough
      locking
      declaration
      userevent
      provides
      unregister
      session
      execute
      searches
      verification
      suppressed
      prepared
      passwords
      recipients
      event
      because
      brief
      unidentified
      redundancy
      character
      the
      module
      reload
      operation
      backslashes
      accurate
      incorrect
      collision
      initializing
      instance
      interpreted
      buddies
      omitted
      manually
      requires
      queries
      generator
      scheduler
      configuration has
      owner
      resource
      performed
      masquerade
      apparently
      routable
      
      ASTERISK-29714
      
      Change-Id: I88485116d2c59b776aa2e1f8b4ce8239a21decda
      dcf492e7
  3. Mar 10, 2021
  4. Jan 03, 2020
  5. Dec 11, 2018
  6. Nov 26, 2018
    • 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
  7. Jan 24, 2018
    • Corey Farrell's avatar
      Remove redundant module checks and references. · 527cf5a5
      Corey Farrell authored
      This removes references that are no longer needed due to automatic
      references created by module dependencies.
      
      In addition this removes most calls to ast_module_check as they were
      checking modules which are listed as dependencies.
      
      Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
      527cf5a5
  8. Jan 15, 2018
    • Corey Farrell's avatar
      loader: Add dependency fields to module structures. · 9cfdb81e
      Corey Farrell authored
      * Declare 'requires' and 'enhances' text fields on module info structure.
      * Rename 'nonoptreq' to 'optional_modules'.
      * Update doxygen comments.
      
      Still need to investigate dependencies among modules I cannot compile.
      
      Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
      9cfdb81e
  9. Jan 03, 2018
    • Corey Farrell's avatar
      loader: Create ast_module_running_ref. · 55f1d69c
      Corey Farrell authored
      This function returns NULL if the module in question is not running.  I
      did not change ast_module_ref as most callers do not check the result
      and they always call ast_module_unref.
      
      Make use of this function when running registered items from:
      * app_stack API's
      * bridge technologies
      * CLI commands
      * File formats
      * Manager Actions
      * RTP engines
      * Sorcery Wizards
      * Timing Interfaces
      * Translators
      * AGI Commands
      * Fax Technologies
      
      ASTERISK-20346 #close
      
      Change-Id: Ia16fd28e188b2fc0b9d18b8a5d9cacc31df73fcc
      55f1d69c
  10. Dec 08, 2017
    • Sean Bright's avatar
      utils: Add convenience function for setting fd flags · 2ffe52a1
      Sean Bright authored
      There are many places in the code base where we ignore the return value
      of fcntl() when getting/setting file descriptior flags. This patch
      introduces a convenience function that allows setting or clearing file
      descriptor flags and will also log an error on failure for later
      analysis.
      
      Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
      2ffe52a1
  11. Nov 02, 2017
    • Corey Farrell's avatar
      Add missing menuselect dependencies. · 606ae348
      Corey Farrell authored
      This adds menuselect dependencies for modules that use symbols of other
      modules.
      
      ASTERISK-27390
      
      Change-Id: Ia2d2849f5b87a72af7324a82edc3f283eafb5385
      606ae348
    • Corey Farrell's avatar
      Prevent unload of modules which implement an Optional API. · 79f111e1
      Corey Farrell authored
      Once an Optional API module is loaded it should stay loaded.  Unloading
      an optional API module runs the risk of a crash if something else is
      using it.  This patch causes all optional API providers to tell the
      module loader not to unload except at shutdown.
      
      ASTERISK-27389
      
      Change-Id: Ia07786fe655681aec49cc8d3d96e06483b11f5e6
      79f111e1
  12. Jul 12, 2017
    • Corey Farrell's avatar
      core: Add digit filtering to ast_waitfordigit_full · 6b138046
      Corey Farrell authored
      This adds a parameter to ast_waitfordigit_full which can be used to only
      stop waiting when certain expected digits are received.  Any unexpected
      DTMF digits are simply ignored.
      
      This also creates a new dialplan application WaitDigit.
      
      ASTERISK-27129 #close
      
      Change-Id: Id233935ea3d13e71c75a0861834c5936c3700ef9
      6b138046
  13. May 23, 2017
    • Sean Bright's avatar
      res_agi: Allow configuration of audio format of EAGI pipe · d847fe65
      Sean Bright authored
      This change allows the format of the EAGI audio pipe to be changed by
      setting the dialplan variable 'EAGI_AUDIO_FORMAT' to the name of one of
      the loaded formats.
      
      ASTERISK-26124 #close
      
      Change-Id: I7a10fad401ad2a21c68c2e7246fa357d5cee5bbd
      d847fe65
    • Sean Bright's avatar
      res_agi: Clarify 'RECORD FILE' documentation · e2e6baa8
      Sean Bright authored
      Documented the 'beep' option in both the parameters list and the command
      description.
      
      ASTERISK-23839 #close
      
      Change-Id: I4970395c922dbdce3f7cf0f56d5b065ec9aa53ea
      e2e6baa8
    • Sean Bright's avatar
      res_agi: Prevent crash when SET VARIABLE called without arguments · 3dcb3c88
      Sean Bright authored
      Explicitly check that the appropriate number of arguments were passed to
      SET VARIABLE before attempting to reference them. Also initialize the
      arguments array to zeroes before populating it.
      
      ASTERISK-22432 #close
      
      Change-Id: I5143607d80a2724f749c1674f3126b04ed32ea97
      3dcb3c88
    • Sean Bright's avatar
      res_agi: Fix malformed AGI usage response · e490aa31
      Sean Bright authored
      If the generated XML documentation for a command does not end with a \n,
      the postamble of the usage message does not appear on its own line.
      
      ASTERISK-25662 #close
      
      Change-Id: If190f1e9e37fe215fed95897d78d4a6e142b0020
      e490aa31
  14. 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
  15. Feb 02, 2017
    • Richard Mudgett's avatar
      res_agi: Prevent an AGI from eating frames it should not. (Re-do) · 97c30847
      Richard Mudgett authored
      A dialplan intercept routine is equivalent to an interrupt routine.  As
      such, the routine must be done quickly and you do not have access to the
      media stream.  These restrictions are necessary because the media stream
      is the responsibility of some other code and interfering with or delaying
      that processing is bad.  A possible future dialplan processing
      architecture change may allow the interception routine to run in a
      different thread from the main thread handling the media and remove the
      execution time restriction.
      
      * Made res_agi.c:run_agi() running an AGI in an interception routine run
      in DeadAGI mode.  No touchy channel frames.
      
      ASTERISK-25951
      
      ASTERISK-26343
      
      ASTERISK-26716
      
      Change-Id: I638f147ca7a7f2590d7194a8ef4090eb191e4e43
      97c30847
  16. Nov 14, 2016
  17. Nov 10, 2016
  18. Nov 08, 2016
    • Mark Michelson's avatar
      AGI: Only defer frames when in an interception routine. · 28926d1c
      Mark Michelson authored
      AGI recently was modified to defer important frames. This was because
      when AGI was used in a connected line interception routine, the
      resulting connected line frame would end up getting discarded by the
      AGI.
      
      However, this caused bad behavior in other cases. Specifically, during a
      transfer, if someone attempted to manually set the Caller ID on a
      channel in an AGI, the deferred connected line frame would end up
      overwriting what had been manually set in the AGI.
      
      Since the initial issue was specific to interception routines, this
      change removes the manual frame deferral from AGI and instead uses the
      new frame deferral API in interception routines.
      
      ASTERISK-26343 #close
      Reported by Morton Tryfoss
      
      Change-Id: Iab7d39436d0ee99bfe32ad55ef91e9bd88db4208
      28926d1c
  19. Oct 27, 2016
    • Corey Farrell's avatar
      Remove ASTERISK_REGISTER_FILE. · a6e5bae3
      Corey Farrell authored
      ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
      all traces of it.
      
      Previously exported symbols removed:
      * __ast_register_file
      * __ast_unregister_file
      * ast_complete_source_filename
      
      This also removes the mtx_prof static variable that was declared when
      MTX_PROFILE was enabled.  This variable was only used in lock.c so it
      is now initialized in that file only.
      
      ASTERISK-26480 #close
      
      Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
      a6e5bae3
  20. Aug 15, 2016
    • Matt Jordan's avatar
      res_agi: Improve documentation · 3269cf4c
      Matt Jordan authored
      * Groups of AGI commands that have similar functionality now reference
        each other, and all reference the AGI application for ease of wiki
        reference.
      
      * The documentation for the AGI application has been improved, in
        particular noting the various AGI types and how they are invoked.
      
      * A warning message has been added to DeadAGI, noting that it is
        deprecated.
      
      Change-Id: I479ccdee8a7393f01b18692c3d4ab7e6bdd1875d
      3269cf4c
  21. Apr 25, 2016
    • George Joseph's avatar
      res_agi: Prevent run_agi from eating frames it shouldn't · 99fcf2a7
      George Joseph authored
      The run_agi function is eating control frames when it shouldn't be. This is
      causing issues when an AGI is run from CONNECTED_LINE_SEND_SUB in a blond
      transfer.
      
      Alice calls Bob. Bob attended transfers to Charlie but hangs up before Charlie
      answers.
      
      Alice gets the COLP UPDATE indicating Charlie but Charlie never gets an UPDATE
      and is left thinking he's connected to Bob.
      
      In this case, when CONNECTED_LINE_SEND_SUB runs on Alice's channel and it calls
      an AGI, the extra eaten frames prevent CONNECTED_LINE_SEND_SUB from running on
      Charlie's channel.
      
      The fix was to accumulate deferrable frames in the "forever" loop instead of
      dropping them, and re-queue them just before running the actual agi command
      or exiting.
      
      ASTERISK-25951 #close
      
      Change-Id: I0f4bbfd72fc1126c2aaba41da3233a33d0433645
      99fcf2a7
  22. Nov 25, 2015
    • Kevin Harwell's avatar
      fastagi: record file closed after sending result · 9014f1f4
      Kevin Harwell authored
      The fastagi record-file testsuite test sometimes fails reporting an empty
      recorded file. This was happening because Asterisk was sending the agi result
      notification prior to actually closing the file and the data, being buffered,
      had not been written to the file yet when the test attempts to check the file
      size.
      
      This patch makes it so the record file stream is closed prior to sending the
      agi result notification.
      
      ASTERISK-25593 #close
      
      Change-Id: I6b2b3be3ae37f7c7b18e672c419a89b3b8513cde
      9014f1f4
  23. May 13, 2015
  24. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  25. Dec 12, 2014
  26. Oct 28, 2014
  27. Jul 25, 2014
  28. Jul 20, 2014
  29. Jul 04, 2014
    • Matthew Jordan's avatar
      Remove many deprecated modules · 97834718
      Matthew Jordan authored
      Billing records are fair,
      To get paid is quite bright,
      You should really use ODBC;
      Good-bye cdr_sqlite.
      
      Microsoft did once push H.323,
      Hell, we all remember NetMeeting.
      But try to compile chan_h323 now
      And you will take quite a beating.
      
      The XMPP and SIP war was fierce,
      And in the distant fray
      Was birthed res_jabber/chan_jingle;
      But neither to stay.
      
      For everyone did care and chase what Google professed.
      "Free Internet Calling" was what devotees cried,
      But Google did change the specs so often
      That the developers were happy the day chan_gtalk died.
      
      And then there was that odd application
      Dedicated to the Polish tongue.
      app_saycountpl was subsumed by Say;
      One could say its bell was rung.
      
      To read and parse a file from the dialplan
      You could (I guess) use an application.
      app_readfile did fill that purpose, but I think
      A function is perhaps better in its creation.
      
      Barging is rude, I'm not sure why we do it.
      Inwardly, the caller will probably sigh.
      But if you really must do it,
      Don't use app_dahdibarge, use ChanSpy.
      
      We all despise the sound of tinny robots
      It makes our queues so cold.
      To control such an abomination
      It's better to not use Wait/SetMusicOnHold.
      
      It's often nice to know properties of a channel
      It makes our calls right
      We have a nice function called CHANNEL
      And so SIPCHANINFO is sent off into the night.
      
      And now things get odd;
      Apparently one could delimit with a colon
      Properties from the SIPPEER function!
      Commas are in; all others are done.
      
      Finally, a word on pipes and commas.
      We're sorry. We can't say it enough.
      But those compatibility options in asterisk.conf;
      To maintain them forever was just too tough.
      
      This patch removes:
      
      * cdr_sqlite
      * chan_gtalk
      * chan_jingle
      * chan_h323
      * res_jabber
      * app_saycountpl
      * app_readfile
      * app_dahdibarge
      
      It removes the following applications/functions:
      
      * WaitMusicOnHold
      * SetMusicOnHold
      * SIPCHANINFO
      
      It removes the colon delimiter from the SIPPEER function.
      
      Finally, it also removes all compatibility options that were configurable from
      asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems.
      
      Review: https://reviewboard.asterisk.org/r/3698/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      97834718
  30. Jun 13, 2014
    • Matthew Jordan's avatar
      stasis: Reduce creation of channel snapshots to improve performance · 9cc1a8e8
      Matthew Jordan authored
      During some performance testing of Asterisk with AGI, ARI, and lots of Local
      channels, we noticed that there's quite a hit in performance during channel
      creation and releasing to the dialplan (ARI continue). After investigating
      the performance spike that occurs during channel creation, we discovered
      that we create a lot of channel snapshots that are technically unnecessary.
      This includes creating snapshots during:
       * AGI execution
       * Returning objects for ARI commands
       * During some Local channel operations
       * During some dialling operations
       * During variable setting
       * During some bridging operations
      And more.
      
      This patch does the following:
       - It removes a number of fields from channel snapshots. These fields were
         rarely used, were expensive to have on the snapshot, and hurt performance.
         This included formats, translation paths, Log Call ID, callgroup, pickup
         group, and all channel variables. As a result, AMI Status,
         "core show channel", "core show channelvar", and "pjsip show channel" were
         modified to either hit the live channel or not show certain pieces of data.
         While this is unfortunate, the performance gain from this patch is worth
         the loss in behaviour.
       - It adds a mechanism to publish a cached snapshot + blob. A large number of
         publications were changed to use this, including:
         - During Dial begin
         - During Variable assignment (if no AMI variables are emitted - if AMI
           variables are set, we have to make snapshots when a variable is changed)
         - During channel pickup
         - When a channel is put on hold/unhold
         - When a DTMF digit is begun/ended
         - When creating a bridge snapshot
         - When an AOC event is raised
         - During Local channel optimization/Local bridging
         - When endpoint snapshots are generated
         - All AGI events
         - All ARI responses that return a channel
         - Events in the AgentPool, MeetMe, and some in Queue
       - Additionally, some extraneous channel snapshots were being made that were
         unnecessary. These were removed.
       - The result of ast_hashtab_hash_string is now cached in stasis_cache. This
         reduces a large number of calls to ast_hashtab_hash_string, which reduced
         the amount of time spent in this function in gprof by around 50%.
      
      #ASTERISK-23811 #close
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/3568/
      ........
      
      Merged revisions 416211 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9cc1a8e8
  31. May 09, 2014
  32. Dec 18, 2013
    • Kevin Harwell's avatar
      channel locking: Add locking for channel snapshot creation · 28c0cb28
      Kevin Harwell authored
      Original commit message by mmichelson (asterisk 12 r403311):
      
      "This adds channel locks around calls to create channel snapshots as well
      as other functions which operate on a channel and then end up
      creating a channel snapshot. Functions that expect the channel to be
      locked prior to being called have had their documentation updated to
      indicate such."
      
      The above was initially committed and then reverted at r403398.  The problem
      was found to be in core_local.c in the publish_local_bridge_message function.
      The ast_unreal_lock_all function locks and adds a reference to the returned
      channels and while they were being unlocked they were not being unreffed when
      no longer needed.  Fixed by unreffing the channels.
      
      Also in bridge.c a lock was obtained on "other->chan", but then an attempt was
      made to unlock "other" and not the previously locked channel.  Fixed by
      unlocking "other->chan"
      
      (closes issue ASTERISK-22709)
      Reported by: John Bigelow
      ........
      
      Merged revisions 404237 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      28c0cb28
  33. Dec 05, 2013
  34. Dec 03, 2013
  35. Oct 08, 2013
  36. Oct 03, 2013
Loading