Skip to content
Snippets Groups Projects
  1. Oct 05, 2020
  2. 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
  3. 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
  4. Feb 27, 2015
  5. Aug 05, 2014
    • Matthew Jordan's avatar
      Multiple revisions 420089-420090,420097 · 47bf7efc
      Matthew Jordan authored
      ........
        r420089 | mjordan | 2014-08-05 15:10:52 -0500 (Tue, 05 Aug 2014) | 72 lines
        
        ARI: Add channel technology agnostic out of call text messaging
        
        This patch adds the ability to send and receive text messages from various
        technology stacks in Asterisk through ARI. This includes chan_sip (sip),
        res_pjsip_messaging (pjsip), and res_xmpp (xmpp). Messages are sent using the
        endpoints resource, and can be sent directly through that resource, or to a
        particular endpoint.
        
        For example, the following would send the message "Hello there" to PJSIP
        endpoint alice with a display URI of sip:asterisk@mycooldomain.org:
        
        ari/endpoints/sendMessage?to=pjsip:alice&from=sip:asterisk@mycooldomain.org&body=Hello+There
        
        This is equivalent to the following as well:
        
        ari/endpoints/PJSIP/alice/sendMessage?from=sip:asterisk@mycooldomain.org&body=Hello+There
        
        Both forms are available for message technologies that allow for arbitrary
        destinations, such as chan_sip.
        
        Inbound messages can now be received over ARI as well. An ARI application that
        subscribes to endpoints will receive messages from those endpoints:
        
        {
          "type": "TextMessageReceived",
          "timestamp": "2014-07-12T22:53:13.494-0500",
          "endpoint": {
            "technology": "PJSIP",
            "resource": "alice",
            "state": "online",
            "channel_ids": []
          },
          "message": {
            "from": "\"alice\" <sip:alice@127.0.0.1>",
            "to": "pjsip:asterisk@127.0.0.1",
            "body": "Watson, come here.",
            "variables": []
          },
          "application": "testsuite"
        }
        
        The above was made possible due to some rather major changes in the message
        core. This includes (but is not limited to):
        - Users of the message API can now register message handlers. A handler has
          two callbacks: one to determine if the handler has a destination for the
          message, and another to handle it.
        - All dialplan functionality of handling a message was moved into a message
          handler provided by the message API.
        - Messages can now have the technology/endpoint associated with them.
          Various other properties are also now more easily accessible.
        - A number of ao2 containers that weren't really needed were replaced with
          vectors. Iteration over ao2_containers is expensive and pointless when
          the lifetime of things is well defined and the number of things is very
          small.
        
        res_stasis now has a new file that makes up its structure, messaging. The
        messaging functionality implements a message handler, and passes received
        messages that match an interested endpoint over to the app for processing.
        
        Note that inadvertently while testing this, I reproduced ASTERISK-23969.
        res_pjsip_messaging was incorrectly parsing out the 'to' field, such that
        arbitrary SIP URIs mangled the endpoint lookup. This patch includes the
        fix for that as well.
        
        Review: https://reviewboard.asterisk.org/r/3726
        
        ASTERISK-23692 #close
        Reported by: Matt Jordan
        
        ASTERISK-23969 #close
        Reported by: Andrew Nagy
      ........
        r420090 | mjordan | 2014-08-05 15:16:37 -0500 (Tue, 05 Aug 2014) | 2 lines
        
        Remove automerge properties :-(
      ........
        r420097 | mjordan | 2014-08-05 16:36:25 -0500 (Tue, 05 Aug 2014) | 2 lines
        
        test_message: Fix strict-aliasing compilation issue
      ........
      
      Merged revisions 420089-420090,420097 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      47bf7efc
  6. Jul 22, 2014
    • Matthew Jordan's avatar
      ARI: Fix endpoint/channel subscription issues; allow for subscriptions to tech · bb87796f
      Matthew Jordan authored
      This patch serves two purposes:
      (1) It fixes some bugs with endpoint subscriptions not reporting all of the
          channel events
      (2) It serves as the preliminary work needed for ASTERISK-23692, which allows
          for sending/receiving arbitrary out of call text messages through ARI in a
          technology agnostic fashion.
      
      The messaging functionality described on ASTERISK-23692 requires two things:
      (1) The ability to send/receive messages associated with an endpoint. This is
          relatively straight forwards with the endpoint core in Asterisk now.
      (2) The ability to send/receive messages associated with a technology and an
          arbitrary technology defined URI. This is less straight forward, as
          endpoints are formed from a tech + resource pair. We don't have a
          mechanism to note that a technology that *may* have endpoints exists.
      
      This patch provides such a mechanism, and fixes a few bugs along the way.
      
      The first major bug this patch fixes is the forwarding of channel messages
      to their respective endpoints. Prior to this patch, there were two problems:
      (1) Channel caching messages weren't forwarded. Thus, the endpoints missed
          most of the interesting bits (such as channel creation, destruction, state
          changes, etc.)
      (2) Channels weren't associated with their endpoint until after creation.
          This resulted in endpoints missing the channel creation message, which
          limited the usefulness of the subscription in the first place (a major use
          case being 'tell me when this endpoint has a channel'). Unfortunately,
          this meant another parameter to ast_channel_alloc. Since not all channel
          technologies support an ast_endpoint, this patch makes such a call
          optional and opts for a new function, ast_channel_alloc_with_endpoint.
      
      When endpoints are created, they will implicitly create a technology endpoint
      for their technology (if one does not already exist). A technology endpoint is
      special in that it has no state, cannot have channels created for it, cannot
      be created explicitly, and cannot be destroyed except on shutdown. It does,
      however, have all messages from other endpoints in its technology forwarded to
      it.
      
      Combined with the bug fixes, we now have Stasis messages being properly
      forwarded. Consider the following scenario: two PJSIP endpoints (foo and bar),
      where bar has a single channel associated with it and foo has two channels
      associated with it. The messages would be forwarded as follows:
      
      channel PJSIP/foo-1 --
                            \
                             --> endpoint PJSIP/foo --
                            /                         \
      channel PJSIP/foo-2 --                           \
                                                        ---- > endpoint PJSIP
                                                      /
      channel PJSIP/bar-1 -----> endpoint PJSIP/bar --
      
      ARI, through the applications resource, can:
       - subscribe to endpoint:PJSIP/foo and get notifications for channels
         PJSIP/foo-1,PJSIP/foo-2 and endpoint PJSIP/foo
       - subscribe to endpoint:PJSIP/bar and get notifications for channels
         PJSIP/bar-1 and endpoint PJSIP/bar
       - subscribe to endpoint:PJSIP and get notifications for channels
         PJSIP/foo-1,PJSIP/foo-2,PJSIP/bar-1 and endpoints PJSIP/foo,PJSIP/bar
      
      Note that since endpoint PJSIP never changes, it never has events itself. It
      merely provides an aggregation point for all other endpoints in its technology
      (which in turn aggregate all channel messages associated with that endpoint).
      
      This patch also adds endpoints to res_xmpp and chan_motif, because the actual
      messaging work will need it (messaging without XMPP is just sad).
      
      Review: https://reviewboard.asterisk.org/r/3760/
      
      ASTERISK-23692
      ........
      
      Merged revisions 419196 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      bb87796f
  7. Feb 21, 2014
  8. Jan 12, 2014
  9. Dec 20, 2013
  10. Nov 22, 2013
    • Kinsey Moore's avatar
      ARI: Don't leak implementation details · d9015a53
      Kinsey Moore authored
      This change prevents channels used as implementation details from
      leaking out to ARI. It does this by preventing creation of JSON blobs
      of channel snapshots created from those channels and sanitizing JSON
      blobs of bridge snapshots as they are created. This introduces a
      framework for excluding information from output targeted at Stasis
      applications on a consumer-by-consumer basis using channel sanitization
      callbacks which could be extended to bridges or endpoints if necessary.
      
      This prevents unhelpful error messages from being generated by
      ast_json_pack.
      
      This also corrects a bug where BridgeCreated events would not be
      created.
      
      (closes issue ASTERISK-22744)
      Review: https://reviewboard.asterisk.org/r/2987/
      Reported by: David M. Lee
      ........
      
      Merged revisions 403069 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d9015a53
  11. Nov 12, 2013
  12. Nov 07, 2013
    • David M. Lee's avatar
      ari: User better nicknames for ARI operations · 7d0d1a1e
      David M. Lee authored
      While working on building client libraries from the Swagger API, I
      noticed a problem with the nicknames.
      
          channel.deleteChannel()
          channel.answerChannel()
          channel.muteChannel()
      
      Etc. We put the object name in the nickname (since we were generating C
      code), but it makes OO generators redundant.
      
      This patch makes the nicknames more OO friendly. This resulted in a lot
      of name changing within the res_ari_*.so modules, but not much else.
      
      There were a couple of other fixed I made in the process.
      
       * When reversible operations (POST /hold, POST /unhold) were made more
         RESTful (POST /hold, DELETE /unhold), the path for the second operation
         was left in the API declaration. This worked, but really the two
         operations should have been on the same API.
       * The POST /unmute operation had still not been REST-ified.
      
      Review: https://reviewboard.asterisk.org/r/2940/
      ........
      
      Merged revisions 402528 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7d0d1a1e
  13. Oct 02, 2013
  14. Aug 01, 2013
    • David M. Lee's avatar
      Split caching out from the stasis_caching_topic. · e1b959cc
      David M. Lee authored
      In working with res_stasis, I discovered a significant limitation to
      the current structure of stasis_caching_topics: you cannot subscribe
      to cache updates for a single channel/bridge/endpoint/etc.
      
      To address this, this patch splits the cache away from the
      stasis_caching_topic, making it a first class object. The stasis_cache
      object is shared amongst individual stasis_caching_topics that are
      created per channel/endpoint/etc. These are still forwarded to global
      whatever_all_cached topics, so their use from most of the code does
      not change.
      
      In making these changes, I noticed that we frequently used a similar
      pattern for bridges, endpoints and channels:
      
           single_topic  ---------------->  all_topic
                 ^
                 |
           single_topic_cached  ----+---->  all_topic_cached
                                    |
                                    +---->  cache
      
      This pattern was extracted as the 'Stasis Caching Pattern', defined in
      stasis_caching_pattern.h. This avoids a lot of duplicate code between
      the different domain objects.
      
      Since the cache is now disassociated from its upstream caching topics,
      this also necessitated a change to how the 'guaranteed' flag worked
      for retrieving from a cache. The code for handling the caching
      guarantee was extracted into a 'stasis_topic_wait' function, which
      works for any stasis_topic.
      
      (closes issue ASTERISK-22002)
      Review: https://reviewboard.asterisk.org/r/2672/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e1b959cc
  15. Jul 27, 2013
  16. Jun 13, 2013
  17. May 08, 2013
    • David M. Lee's avatar
      Initial support for endpoints. · e06e519a
      David M. Lee authored
      An endpoint is an external device/system that may offer/accept
      channels to/from Asterisk. While this is a very useful concept for end
      users, it is surprisingly not a core concept within Asterisk itself.
      
      This patch defines ast_endpoint as a separate object, which channel
      drivers may use to expose their concept of an endpoint. As the channel
      driver creates channels, it can use ast_endpoint_add_channel() to
      associate channels to the endpoint. This updated the endpoint
      appropriately, and forwards all of the channel's events to the
      endpoint's topic.
      
      In order to avoid excessive locking on the endpoint object itself, the
      mutable state is not accessible via getters. Instead, you can create a
      snapshot using ast_endpoint_snapshot_create() to get a consistent
      snapshot of the internal state.
      
      This patch also includes a set of topics and messages associated with
      endpoints, and implementations of the endpoint-related RESTful
      API. chan_sip was updated to create endpoints with SIP peers, but the
      state of the endpoints is not updated with the state of the peer.
      
      Along for the ride in this patch is a Stasis test API. This is a
      stasis_message_sink object, which can be subscribed to a Stasis
      topic. It has functions for blocking while waiting for conditions in
      the message sink to be fulfilled.
      
      (closes issue ASTERISK-21421)
      Review: https://reviewboard.asterisk.org/r/2492/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e06e519a
  18. Apr 22, 2013
    • David M. Lee's avatar
      This patch adds a RESTful HTTP interface to Asterisk. · 1c21b857
      David M. Lee authored
      The API itself is documented using Swagger, a lightweight mechanism for
      documenting RESTful API's using JSON. This allows us to use swagger-ui
      to provide executable documentation for the API, generate client
      bindings in different languages, and generate a lot of the boilerplate
      code for implementing the RESTful bindings. The API docs live in the
      rest-api/ directory.
      
      The RESTful bindings are generated from the Swagger API docs using a set
      of Mustache templates.  The code generator is written in Python, and
      uses Pystache. Pystache has no dependencies, and be installed easily
      using pip. Code generation code lives in rest-api-templates/.
      
      The generated code reduces a lot of boilerplate when it comes to
      handling HTTP requests. It also helps us have greater consistency in the
      REST API.
      
      (closes issue ASTERISK-20891)
      Review: https://reviewboard.asterisk.org/r/2376/
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1c21b857
  19. Aug 30, 2012
    • Matthew Jordan's avatar
      Clean up doxygen warnings · 8018b879
      Matthew Jordan authored
      This patch fixes numerous doxygen warnings across Asterisk.  It also updates
      the makefile to regenerate the doxygen configuration on the local system
      before running doxygen to help prevent warnings/errors on the local system.
      
      Much thanks to Andrew for tackling one of the Asterisk janitor projects!
      
      (issue ASTERISK-20259)
      Reported by: Andrew Latham
      Patches:
        doxygen_partial.diff uploaded by Andrew Latham (license 5985)
        make_progdocs.diff uploaded by Andrew Latham (license 5985)
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8018b879
  20. Jun 15, 2012
    • Kevin P. Fleming's avatar
      Multiple revisions 369001-369002 · 166b4e2b
      Kevin P. Fleming authored
      ........
        r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
        
        Add support-level indications to many more source files.
        
        Since we now have tools that scan through the source tree looking for files
        with specific support levels, we need to ensure that every file that is
        a component of a 'core' or 'extended' module (or the main Asterisk binary)
        is explicitly marked with its support level. This patch adds support-level
        indications to many more source files in tree, but avoids adding them to
        third-party libraries that are included in the tree and to source files
        that don't end up involved in Asterisk itself.
      ........
        r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
        
        Add a script to enable finding source files without support-levels defined.
      ........
      
      Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      166b4e2b
  21. Jun 08, 2010
    • Terry Wilson's avatar
      Add SRTP support for Asterisk · 857814f4
      Terry Wilson authored
      After 5 years in mantis and over a year on reviewboard, SRTP support is finally
      being comitted. This includes generic CHANNEL dialplan functions that work for
      getting the status of whether a call has secure media or signaling as defined
      by the underlying channel technology and for setting whether or not a new
      channel being bridged to a calling channel should have secure signaling or
      media. See doc/tex/secure-calls.tex for examples.
      
      Original patch by mikma, updated for trunk and revised by me.
      
      (closes issue #5413)
      Reported by: mikma
      Tested by: twilson, notthematrix, hemanshurpatel
      
      Review: https://reviewboard.asterisk.org/r/191/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      857814f4
Loading