Skip to content
Snippets Groups Projects
  1. Nov 02, 2017
  2. Mar 08, 2017
    • Sean Bright's avatar
      pbx_spool: Set AST_OUTGOING_ATTEMPT variable on channel · bc2c66b5
      Sean Bright authored
      Set a variable on the channel that indicates which attempt number we
      are currently performing to allow for attempt-specific behavior.
      
      ASTERISK-26568 #close
      Reported by: Roman Shubovich
      
      Change-Id: Iacd7e8d43b0ed5b6cb021c62f41f1a1f5733dd89
      bc2c66b5
  3. Mar 06, 2017
    • Sean Bright's avatar
      pbx_spool: Gracefully handle long lines in call files · 5a74abc5
      Sean Bright authored
      Per the linked issue, we aren't checking the buffer filled by fgets()
      to determine if it contains a newline, so we will fail to correctly
      parse the trailing portion of a long line.
      
      This patch increases the buffer size from 256 to 1024, and skips any
      line that exceeds that length, logging a warning in the process.
      
      ASTERISK-17067 #close
      Reported by: Dave Olszewski
      
      Change-Id: I51bcf270c1b4347ba05b43f18dc2094c76f5d7b0
      5a74abc5
  4. Feb 22, 2017
    • Sean Bright's avatar
      pbx_realtime: Prevent premature extension matching · 15ed7af0
      Sean Bright authored
      The patterns provided by pbx_realtime were checked in the order in
      which they were returned from the realtime backend. If there was
      overlap between multiple patterns, the first one to correctly match was
      chosen even though it may not have been the best match.
      
      We now sort the patterns descending by their length and compare in that
      order. There may be cases where this still results in a sub-optimal
      match, but this patch should improve the overall behavior.
      
      ASTERISK-18271 #close
      Reported by: Charlie Smurthwaite
      
      Change-Id: I56d9ac15810eb1775966b669c3028e32cc7bd809
      15ed7af0
  5. Feb 21, 2017
    • Sean Bright's avatar
      pbx_dundi: DUNDi weight parameter not processed correctly · fc70ca94
      Sean Bright authored
      The DUNDi weight field is not always converted from network byte order
      to host byte order. This can result in incorrect weight values and
      incorrect selection of DUNDi destinations.
      
      ASTERISK-18731 #close
      Reported by: Peter Racz
      Patches:
      	dundi_weight.patch (license #6290) patch uploaded by Peter Racz
      
      Change-Id: Iba3e1a700ff539db57211a7bbc26f7b22ea9a1be
      fc70ca94
    • 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
  6. Feb 10, 2017
    • Sean Bright's avatar
      manager: Restore Originate failure behavior from Asterisk 11 · 09107730
      Sean Bright authored
      In Asterisk 11, if the 'Originate' AMI command failed to connect the provided
      Channel while in extension mode, a 'failed' extension would be looked up and
      run. This was, I believe, unintentionally removed in 51b6c496. This patch
      restores that behavior.
      
      This also adds an enum for the various 'synchronous' modes in an attempt to
      make them meaningful.
      
      ASTERISK-26115 #close
      Reported by: Nasir Iqbal
      
      Change-Id: I8afbd06725e99610e02adb529137d4800c05345d
      09107730
  7. Jan 04, 2017
    • Jonathan R. Rose's avatar
      core/pbx: dialplan show - display filename/line# · d96e3502
      Jonathan R. Rose authored
      Adds the ability for extensions to be registered to include filename and
      line number so that dialplan show output can show the filename and line
      number of a config file responsible for generating a given extension.
      
      This only affects config modules that are written to use the new extension
      registering functions. In this patch, that only includes pbx_config, so
      extensions registered in extensions.conf and any included extension will
      be shown in this manner. Extensions registered in this manner will show
      the filename and line number *instead* of the registrar.
      
      ASTERISK-26658 #close
      Reported by: Jonathan R. Rose
      
      Change-Id: Ieccc6abccdff34ed5c7da3511fd24972b8f2dd30
      d96e3502
  8. Nov 23, 2016
  9. 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
  10. Aug 15, 2016
    • Alexei Gradinari's avatar
      core: Entity ID is not set or invalid · e85adbd9
      Alexei Gradinari authored
      The Exchanging Device and Mailbox States could not working
      if the Entity ID (EID) is not set manually and can't be obtained
      from ethernet interface.
      
      This patch replaces debug message to warning
      and addes missing description about option 'entityid' to
      asterisk.conf.sample.
      
      With this patch the asterisk also:
      (1) decline loading the modules which won't work without EID:
          res_corosync and res_pjsip_publish_asterisk.
      (2) warn if EID is empty on loading next modules:
          pbx_dundi, res_xmpp
      
      Starting with v197 systemd/udev will automatically assign "predictable"
      names for all local Ethernet interfaces.
      This patch also addes some new ethernet prefixes "eno" and "ens".
      
      ASTERISK-26164 #close
      
      Change-Id: I72d712f1ad5b6f64571bb179c5cb12461e7c58c6
      e85adbd9
  11. Jul 21, 2016
    • Corey Farrell's avatar
      pbx: Create pbx_sw.c for management of 'struct ast_sw'. · a36a174c
      Corey Farrell authored
      This changes context switches from a linked list to a vector, makes
      'struct ast_sw' opaque to pbx.c.
      
      Although ast_walk_context_switches is maintained the procedure is no
      longer efficient except for the first call (inc==NULL).  This
      functionality is replaced by two new functions implemented by vector
      macros.
      * ast_context_switches_count (AST_VECTOR_SIZE)
      * ast_context_switches_get (AST_VECTOR_GET)
      
      As with ast_walk_context_switches callers of these functions are
      expected to have locked contexts.  Only a few places in Asterisk walked
      the switches, they have been converted to use the new functions.
      
      Change-Id: I08deb016df22eee8288eb03de62593e45a1f0998
      a36a174c
  12. Jul 18, 2016
    • Corey Farrell's avatar
      pbx: Create pbx_ignorepat.c for management of 'struct ast_ignorepat'. · e2e8713b
      Corey Farrell authored
      This changes context ignore patterns from a linked list to a vector,
      makes 'struct ast_ignorepat' opaque to pbx.c.
      
      Although ast_walk_context_ignorepats is maintained the procedure is no
      longer efficient except for the first call (inc==NULL).  This
      functionality is replaced by two new functions implemented by vector
      macros.
      * ast_context_ignorepats_count (AST_VECTOR_SIZE)
      * ast_context_ignorepats_get (AST_VECTOR_GET)
      
      As with ast_walk_context_ignorepats callers of these functions are
      expected to have locked contexts.  Only a few places in Asterisk walked
      the ignorepats, they have been converted to use the new functions.
      
      Change-Id: I78f2157d275ef1b7d624b4ff7d770d38e5d7f20a
      e2e8713b
  13. Jul 15, 2016
    • Corey Farrell's avatar
      pbx: Create pbx_include.c for management of 'struct ast_include'. · be36bd7c
      Corey Farrell authored
      This changes context includes from a linked list to a vector, makes
      'struct ast_include' opaque to pbx.c.
      
      Although ast_walk_context_includes is maintained the procedure is no
      longer efficient except for the first call (inc==NULL).  This
      functionality is replaced by two new functions implemented by vector
      macros.
      * ast_context_includes_count (AST_VECTOR_SIZE)
      * ast_context_includes_get (AST_VECTOR_GET)
      
      As with ast_walk_context_includes callers of these functions are
      expected to have locked contexts.  Only a few places in Asterisk walked
      the includes, they have been converted to use the new functions.
      
      const have been applied where possible to parameters for ast_include
      functions.
      
      Change-Id: Ib5c882e27cf96fb2aec67a39c18b4c71c9c83b60
      be36bd7c
  14. Jun 08, 2016
    • Timo Teräs's avatar
      Fixes to include signal.h · 39b69ab5
      Timo Teräs authored
      POSIX defines signal.h. sys/signal.h should not be used as it is
      c-library internal header which may or may not exist. Notably with
      musl it generates warning of being incorrect.
      
      Change-Id: Ia56b0aa1d84b5c590114867b1b384a624f39a6fc
      39b69ab5
  15. Apr 05, 2016
    • Joshua Colp's avatar
      pbx: Add support for autohints. · 1dc5e286
      Joshua Colp authored
      This change introduces the concept of autohints. These are hints
      which are created as a result of device state changes occurring within
      the core. When this happens a hint will be created (if it does not
      exist already) using the device name as the extension.
      
      For example if a device state change is received for "PJSIP/bob"
      and autohints are enabled on a context then a hint will exist in
      that context for "bob" with a device of "PJSIP/bob".
      
      For virtual or custom device states the name after the type will
      be used. For example if the device state of "Custom:bob" changes
      then a hint will exist in that context for "bob" with a device of
      "Custom:bob".
      
      This functionality can be enabled in extensions.conf by placing
      "autohints=yes" in a context.
      
      ASTERISK-25881 #close
      
      Change-Id: I7e444c7da41b7b7d33374420fec658beeb18584e
      1dc5e286
  16. Jan 10, 2016
    • Corey Farrell's avatar
      pbx_dundi: Run cleanup on failed load. · 26e0e113
      Corey Farrell authored
      During failed startup of pbx_dundi no cleanup was performed.  Add a call
      to unload_module before returning AST_MODULE_LOAD_DECLINE.
      
      ASTERISK-25677 #close
      
      Change-Id: I8ffa226fda4365ee7068ac1f464473f1a4ebbb29
      26e0e113
  17. Dec 01, 2015
    • Richard Mudgett's avatar
      Audit improper usage of scheduler exposed by 5c713fdf. · fa207290
      Richard Mudgett authored
      channels/chan_iax2.c:
      * Initialize struct chan_iax2_pvt scheduler ids earlier because of
      iax2_destroy_helper().
      
      channels/chan_sip.c:
      channels/sip/config_parser.c:
      * Fix initialization of scheduler id struct members.  Some off nominal
      paths had 0 as a scheduler id to be destroyed when it was never started.
      
      chan_skinny.c:
      * Fix some scheduler id comparisons that excluded the valid 0 id.
      
      channel.c:
      * Fix channel initialization of the video stream scheduler id.
      
      pbx_dundi.c:
      * Fix channel initialization of the packet retransmission scheduler id.
      
      ASTERISK-25476
      
      Change-Id: I07a3449f728f671d326a22fcbd071f150ba2e8c8
      fa207290
  18. Jun 08, 2015
    • Corey Farrell's avatar
      Fix unsafe uses of ast_context pointers. · 80621ce3
      Corey Farrell authored
      Although ast_context_find, ast_context_find_or_create and
      ast_context_destroy perform locking of the contexts table,
      any context pointer can become invalid at any time that the
      contexts table is unlocked. This change adds locking around
      all complete operations involving these functions.
      
      Places where ast_context_find was followed by ast_context_destroy
      have been replaced with calls ast_context_destroy_by_name.
      
      ASTERISK-25094 #close
      Reported by: Corey Farrell
      
      Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
      80621ce3
  19. May 13, 2015
  20. May 11, 2015
    • Ivan Poddubny's avatar
      pbx/pbx_spool: Fix issue when call files were executed too early · e6ebddd9
      Ivan Poddubny authored
      pbx_spool used to delete/move the call file upon successful outgoing
      call completion, but did not delete it from in-memory list of files
      (dirlist, used only when compiled with inotify/kqueue support).
      That resulted in an extra attempt to process that filename after
      retrytime seconds.
      Then, if a new file with the same name appears that is scheduled
      in future further than the completed one plus its retrytime,
      then it gets executed earlier than expected.
      
      This patch fixes remove_from_queue function to also remove the entry
      from the dirlist.
      
      ASTERISK-17069 #close
      Reported by: Jeremy Kister
      
      ASTERISK-24442 #close
      Reported by: tootai
      
      Change-Id: If9ec9b88073661ce485d6b008fd0b2612e49a28b
      e6ebddd9
  21. May 05, 2015
  22. Apr 14, 2015
    • Corey Farrell's avatar
      Build System: Create Makefile macro MOD_ADD_SOURCE. · 62508d68
      Corey Farrell authored
      This new macro allows a single line to add all additional
      sources to a module.  This helps prevent modules from
      missing steps, and makes future changes easier since
      they can be made in a single place.
      
      ASTERISK-24960 #close
      Reported by: Corey Farrell
      
      Change-Id: I38f12d8b72c5e7bb37a879b2fb51761a2855eb4b
      62508d68
  23. 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
  24. Apr 06, 2015
  25. Jan 30, 2015
  26. Dec 17, 2014
  27. Dec 02, 2014
  28. Nov 05, 2014
  29. Oct 13, 2014
    • George Joseph's avatar
      manager/config: Support templates and non-unique category names via AMI · c7e6b6ba
      George Joseph authored
      This patch provides the capability to manipulate templates and categories
      with non-unique names via AMI.
      
      Summary of changes:
      
      GetConfig and GetConfigJSON: Added "Filter" parameter:  A comma separated list
      of name_regex=value_regex expressions which will cause only categories whose
      variables match all expressions to be considered.  The special variable name
      TEMPLATES can be used to control whether templates are included.  Passing
      'include' as the value will include templates along with normal categories.
      Passing 'restrict' as the value will restrict the operation to ONLY templates.
      Not specifying a TEMPLATES expression results in the current default behavior
      which is to not include templates.
      
      UpdateConfig: NewCat now includes options for allowing duplicate category
      names, indicating if the category should be created as a template, and
      specifying templates the category should inherit from.  The rest of the
      actions now accept a filter string as defined above.  If there are non-unique
      category names, you can now update specific ones based on variable values.
      
      To facilitate the new capabilities in manager, corresponding changes had to be
      made to config, most notably the addition of filter criteria to many of the
      APIs.  In some cases it was easy to change the references to use the new
      prototype but others would have required touching too many files for this
      patch so a wrapper with the original prototype was created.  Macros couldn't
      be used in this case because it would break binary compatibility with modules
      such as res_digium_phone that are linked to real symbols.
      
      Tested-by: George Joseph
      
      Review: https://reviewboard.asterisk.org/r/4033/
      ........
      
      Merged revisions 425383 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 425384 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c7e6b6ba
  30. Sep 26, 2014
  31. Sep 16, 2014
  32. Aug 06, 2014
    • George Joseph's avatar
      pbx_lua: fix regression with global sym export and context clash by pbx_config. · 3e5ab6ca
      George Joseph authored
      ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
      pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
      set, was always force loaded before pbx_config.  Since I couldn't find any
      reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
      changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
      realize was that the symbols need to be exported not because Asterisk needs
      them but because any external Lua modules like luasql.mysql need the base
      Lua language APIs exported (ASTERISK-17279).
      
      Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
      context_merge was only merging includes, switches and ignore patterns if
      the context was already existing AND has extensions, or if the context was
      brand new.  If pbx_lua is loaded before pbx_config, the context will exist
      BUT pbx_lua, being implemented as a switch, will never place extensions in
      it, just the switch statement.  The result is that when pbx_config loads,
      it never merges the switch statement created by pbx_lua into the final
      context.
      
      This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
      an "else if" in context_merge that catches the case where an existing context
      has includes, switchs or ingore patterns but no actual extensions.
      
      ASTERISK-23818 #close
      Reported by: Dennis Guse
      Reported by: Timo Teräs
      Tested by: George Joseph
      Review: https://reviewboard.asterisk.org/r/3891/
      ........
      
      Merged revisions 420146 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 420147 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 420148 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      3e5ab6ca
    • Kinsey Moore's avatar
      Stasis: Allow message types to be blocked · f1036f40
      Kinsey Moore authored
      This introduces stasis.conf and a mechanism to prevent certain message
      types from being published. Internally, this works by preventing the
      chosen message types from being created which ensures that those
      message types can never be published. This patch also adjusts message
      publishers such that message payloads are not created if the related
      message type is not available.
      
      ASTERISK-23943 #close
      Review: https://reviewboard.asterisk.org/r/3823/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f1036f40
  33. Jul 25, 2014
  34. Jul 20, 2014
  35. 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
  36. Jul 03, 2014
  37. Jun 19, 2014
Loading