Skip to content
Snippets Groups Projects
  1. Apr 11, 2015
  2. Apr 09, 2015
  3. Apr 06, 2015
  4. Apr 01, 2015
  5. Mar 25, 2015
  6. Mar 19, 2015
    • Matthew Jordan's avatar
      funcs/func_env: Fix regression caused in FILE read operation · 627cc16a
      Matthew Jordan authored
      When r432935 was merged, it did correctly fix a situation where a FILE read
      operation on the middle of a file buffer would not read the requested length
      in the parameters passed to the FILE function. Unfortunately, it would also
      allow the FILE function to append more bytes than what was available in the
      buffer if the length exceeded the end of the buffer length.
      
      This patch takes the minimum of the remaining bytes in the buffer along with
      the calculated length to append provided by the original patch, and uses
      that as the length to append in the return result. This patch also updates
      the unit tests with the scenarios that were originally pointed out in
      ASTERISK-21765 that the original implementation treated incorrectly.
      
      ASTERISK-21765
      ........
      
      Merged revisions 433173 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 433174 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      627cc16a
  7. Jan 07, 2015
  8. Dec 23, 2014
  9. Dec 11, 2014
  10. Dec 05, 2014
  11. Dec 03, 2014
  12. Dec 02, 2014
  13. Dec 01, 2014
    • Matthew Jordan's avatar
      main/stasis: Allow subscriptions to use a threadpool for message delivery · 1106e8fd
      Matthew Jordan authored
      Prior to this patch, all Stasis subscriptions would receive a dedicated
      thread for servicing published messages. In contrast, prior to r400178
      (see review https://reviewboard.asterisk.org/r/2881/), the subscriptions
      shared a thread pool. It was discovered during some initial work on Stasis
      that, for a low subscription count with high message throughput, the
      threadpool was not as performant as simply having a dedicated thread per
      subscriber.
      
      For situations where a subscriber receives a substantial number of messages
      and is always present, the model of having a dedicated thread per subscriber
      makes sense. While we still have plenty of subscriptions that would follow
      this model, e.g., AMI, CDRs, CEL, etc., there are plenty that also fall into
      the following two categories:
      * Large number of subscriptions, specifically those tied to endpoints/peers.
      * Low number of messages. Some subscriptions exist specifically to coordinate
        a single message - the subscription is created, a message is published, the
        delivery is synchronized, and the subscription is destroyed.
      In both of the latter two cases, creating a dedicated thread is wasteful (and
      in the case of a large number of peers/endpoints, harmful). In those cases,
      having shared delivery threads is far more performant.
      
      This patch adds the ability of a subscriber to Stasis to choose whether or not
      their messages are dispatched on a dedicated thread or on a threadpool. The
      threadpool is configurable through stasis.conf.
      
      Review: https://reviewboard.asterisk.org/r/4193
      
      ASTERISK-24533 #close
      Reported by: xrobau
      Tested by: xrobau
      ........
      
      Merged revisions 428681 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 428687 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1106e8fd
  14. Nov 24, 2014
  15. Nov 21, 2014
  16. Nov 14, 2014
    • Matthew Jordan's avatar
      tests/test_cel: Unlock bridge on off nominal paths · 32685449
      Matthew Jordan authored
      If the test fails due to memory allocation errors, we may as well attempt to
      unlock the bridge on the way out.
      ........
      
      Merged revisions 427927 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427932 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      32685449
    • Mark Michelson's avatar
      Fix race condition that could result in ARI transfer messages not being sent. · 2d9471ab
      Mark Michelson authored
      From reviewboard:
      
      "During blind transfer testing, it was noticed that tests were failing
      occasionally because the ARI blind transfer event was not being sent.
      After investigating, I detected a race condition in the blind transfer
      code. When blind transferring a single channel, the actual transfer
      operation (i.e. removing the transferee from the bridge and directing
      them to the proper dialplan location) is queued onto the transferee
      bridge channel. After queuing the transfer operation, the blind transfer
      Stasis message is published. At the time of publication, snapshots of
      the channels and bridge involved are created. The ARI subscriber to the
      blind transfer Stasis message then attempts to determine if the bridge
      or any of the involved channels are subscribed to by ARI applications.
      If so, then the blind transfer message is sent to the applications. The
      way that the ARI blind transfer message handler works is to first see
      if the transferer channel is subscribed to. If not, then iterate over
      all the channel IDs in the bridge snapshot and determine if any of
      those are subscribed to. In the test we were running, the lone
      transferee channel was subscribed to, so an ARI event should have been
      sent to our application. Occasionally, though, the bridge snapshot did
      not have any channels IDs on it at all. Why?
      
      The problem is that since the blind transfer operation is handled by a
      separate thread, it is possible that the transfer will have completed and
      the channels removed from the bridge before we publish the blind transfer
      Stasis message. Since the blind transfer has completed, the bridge on
      which the transfer occurred no longer has any channels on it, so the
      resulting bridge snapshot has no channels on it. Through investigation of
      the code, I found that attended transfers can have this issue too for the
      case where a transferee is transferred to an application."
      
      The fix employed here is to decouple the creation of snapshots for the transfer
      messages from the publication of the transfer messages. This way, snapshots
      can be created to reflect what they are at the time of the transfer operation.
      
      Review: https://reviewboard.asterisk.org/r/4135
      ........
      
      Merged revisions 427848 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 427870 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2d9471ab
  17. Nov 06, 2014
  18. Nov 05, 2014
  19. Oct 17, 2014
  20. Oct 16, 2014
  21. Oct 14, 2014
  22. 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
  23. Oct 10, 2014
  24. Sep 26, 2014
  25. Sep 23, 2014
    • Mark Michelson's avatar
      Make CDR and CEL unit tests less FRACKy. · a89964a5
      Mark Michelson authored
      Prior to this commit, CDR and CEL tests were expected to trigger
      FRACKs (i.e. assertions) due to the fact that the channels they
      create have no formats on them. Some code was independently added
      recently that attempts to prevent FRACKs from occurring by failing
      early when attempting to set up translation paths if one or both
      channels support no formats. Unfortunately, this attempt to be helpful
      made the CDR and CEL tests go from simply FRACKing to outright
      failing and in some cases, failing so badly as to crash Asterisk.
      
      This commit seeks to correct past mistakes by adding the ulaw format
      to channels created by the CDR and CEL unit tests. This makes setting
      up translation paths succeed, eliminates previously-seen FRACKs, and
      ultimately causes the unit tests to succeed again.
      
      Review: https://reviewboard.asterisk.org/r/4014
      ........
      
      Merged revisions 423783 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      a89964a5
  26. Sep 18, 2014
  27. Aug 27, 2014
  28. Aug 20, 2014
  29. Aug 14, 2014
  30. Aug 08, 2014
  31. Aug 07, 2014
  32. Aug 06, 2014
  33. 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
  34. Jul 23, 2014
  35. Jul 22, 2014
  36. Jul 21, 2014
  37. Jul 20, 2014
Loading