Skip to content
Snippets Groups Projects
  1. Jul 20, 2014
  2. Jul 16, 2014
  3. Jul 07, 2014
  4. Jun 30, 2014
  5. Jun 27, 2014
  6. Jun 26, 2014
    • Matthew Jordan's avatar
      res_http_websocket: Close websocket correctly and use careful fwrite · 365ae752
      Matthew Jordan authored
      When a client takes a long time to process information received from Asterisk,
      a write operation using fwrite may fail to write all information. This causes
      the underlying file stream to be in an unknown state, such that the socket
      must be disconnected. Unfortunately, there are two problems with this in
      Asterisk's existing websocket code:
      1. Periodically, during the read loop, Asterisk must write to the connected
         websocket to respond to pings. As such, Asterisk maintains a reference to
         the session during the loop. When ast_http_websocket_write fails, it may
         cause the session to decrement its ref count, but this in and of itself
         does not break the read loop. The read loop's write, on the other hand,
         does not break the loop if it fails. This causes the socket to get in a
         'stuck' state, preventing the client from reconnecting to the server.
      2. More importantly, however, is that the fwrite in ast_http_websocket_write
         fails with a large volume of data when the client takes awhile to process
         the information. When it does fail, it fails writing only a portion of
         the bytes. With some debugging, it was shown that this was failing in a
         similar fashion to ASTERISK-12767. Switching this over to ast_careful_fwrite
         with a long enough timeout solved the problem.
      
      Note that this version of the patch, unlike r417310 in Asterisk 11, exposes
      configuration options beyond just chan_sip's sip.conf. Configuration options
      to configure the write timeout have also been added to pjsip.conf and ari.conf.
      
      #ASTERISK-23917 #close
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/3624/
      ........
      
      Merged revisions 417310 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 417311 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      365ae752
  7. 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
  8. May 09, 2014
  9. May 07, 2014
  10. May 01, 2014
  11. Apr 18, 2014
  12. Apr 17, 2014
  13. Apr 15, 2014
  14. Apr 02, 2014
  15. Mar 25, 2014
  16. Mar 18, 2014
  17. Mar 17, 2014
  18. Mar 14, 2014
  19. Mar 10, 2014
  20. Mar 08, 2014
  21. Mar 07, 2014
  22. Mar 06, 2014
    • George Joseph's avatar
      sorcery: Create AST_SORCERY dialplan function. · a4906e9f
      George Joseph authored
      This patch creates the AST_SORCERY dialplan function which allows someone to
      retrieve any value from a sorcery-based config file.  It's similar to 
      AST_CONFIG.
      
      The creation of the function itself was fairly straightforward but it required
      changes to the underlying sorcery infrastructure that rippled into individual
      sorcery objects.  The changes stemmed from inconsistencies in how sorcery
      created ast_variable objectsets from sorcery objects and the inconsistency
      in how individual objects used that feature especially when it came to
      parameters that can be specified multiple times like contact in aor and match
      in identify.  You can read more here...
      http://lists.digium.com/pipermail/asterisk-dev/2014-February/065202.html
      
      So, what this patch does, besides actually creating the AST_SORCERY function,
      is the following...
      
      * Creates ast_variable_list_append which is a helper to append one ast_variable
        list to another.
      * Modifies the ast_sorcery_object_field_register functions to accept the
        already-defined sorcery_fields_handler callback.
      * Modifies ast_sorcery_objectset_create to accept a parameter indicating return
        type preference...a single ast_variable with all values concatenated or an
        ast_variable list with multiple entries.  Also fixed a few bugs.
      * Modifies individual sorcery object implementations to use the new function
        definition of the ast_sorcery_object_field_register functions.
      * Modifies location.c and res_pjsip_endpoint_identifier_ip.c to implement
        sorcery_fields_handler handlers so they return multiple occurrences as an
        ast_variable_list.
      * Added a whole bunch of tests to test_sorcery.
      
      (closes issue ASTERISK-22537)
      Review: http://reviewboard.asterisk.org/r/3254/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      a4906e9f
    • Jonathan Rose's avatar
      pjsip configuration: Make transport TOS values consistent with endpoints · f0b8590c
      Jonathan Rose authored
      Transport TOS values were interpreted as DSCP values without being documented
      as such. Endpoint TOS values (tos_audio/tos_video) behaved normally as TOS
      values have historically. This patch makes the transport TOS values behave as
      TOS values and makes all TOS values readable as string values (e.g. AF11).
      In addition, alembic scripts have been updated to use the proper field types
      for all TOS/COS values.
      
      (issue ASTERISK-23235)
      Reported by: George Joseph
      Review: https://reviewboard.asterisk.org/r/3304/
      ........
      
      Merged revisions 410028 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f0b8590c
  23. Feb 20, 2014
  24. Feb 17, 2014
  25. Feb 13, 2014
  26. Feb 06, 2014
  27. Feb 05, 2014
  28. Feb 04, 2014
  29. Jan 31, 2014
    • Kevin Harwell's avatar
      res_pjsip: Config option to enable PJSIP logger at load time. · 10e38fb1
      Kevin Harwell authored
      Added a "debug" configuration option for res_pjsip that when set to "yes"
      enables SIP messages to be logged.  It is specified under the "system" type.
      Also added an alembic script to add the option to realtime.
      
      (closes issue ASTERISK-23038)
      Reported by: Rusty Newton
      Review: https://reviewboard.asterisk.org/r/3148/
      ........
      
      Merged revisions 407036 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      10e38fb1
    • Mark Michelson's avatar
      Decouple subscription handling from NOTIFY/PUBLISH body generation. · f55abe9c
      Mark Michelson authored
      When the PJSIP pubsub framework was created, subscription handlers were required
      to state what event they handled along with what body types they knew how to
      generate. While this serves well when implementing a base RFC, it has problems
      when trying to extend the body to support non-standard or proprietary body
      elements. The code also was NOTIFY-specific, meaning that when the time comes
      that we start writing code to send out PUBLISH requests with MWI or presence
      bodies, we would likely find ourselves duplicating code that had previously been
      written.
      
      This changeset introduces the concept of body generators and body supplements. A
      body generator is responsible for allocating a native structure for a given body
      type, providing the primary body content, converting the native structure to a
      string, and deallocating resources. A body supplement takes the primary body
      content (the native structure, not a string) generated by the body generator and
      adds nonstandard elements to the body. With these elements living in their own
      module, it becomes easy to extend our support for body types and to re-use
      resources when sending a PUBLISH request.
      
      Body generators and body supplements register themselves with the pubsub core,
      similar to how subscription and publish handlers had done. Now, subscription
      handlers do not need to know what type of body content they generate, but they
      still need to inform the pubsub core about what the default body type for a
      given event package is. The pubsub core keeps track of what body generators and
      body supplements have been registered. When a SUBSCRIBE arrives, the pubsub core
      will check that there is a subscription handler for the event in the SUBSCRIBE,
      then it will check that there is a body generator that can provide the content
      specified in the Accept header(s).
      
      Because of the nature of body generators and supplements, it means
      res_pjsip_exten_state and res_pjsip_mwi have been completely gutted. They no
      longer worry about body types, instead calling
      ast_sip_pubsub_generate_body_content() when they need to generate a NOTIFY body.
      
      Review: https://reviewboard.asterisk.org/r/3150
      ........
      
      Merged revisions 407016 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f55abe9c
  30. Jan 28, 2014
  31. Jan 16, 2014
  32. Jan 15, 2014
    • Kinsey Moore's avatar
      PJSIP: Add Path header support · 7cbb6eab
      Kinsey Moore authored
      This adds Path support to chan_pjsip in res_pjsip_path.c with minimal
      additions in res_pjsip_registrar.c to store the path and additions in
      res_pjsip_outbound_registration.c to enable advertisement of path
      support to registrars and intervening proxies.
      
      Path information is stored on contacts and is enabled via Address of
      Record (AoRs) and Registration configuration sections.
      
      While adding path support, it became necessary to be able to add SIP
      supplements that handled messages outside of sessions, so a framework
      for handling these types of hooks was added in parallel to the
      already-existing session supplements and several senders of
      out-of-dialog requests were refactored as a result.
      
      (closes issue ASTERISK-21084)
      Review: https://reviewboard.asterisk.org/r/3050/
      ........
      
      Merged revisions 405565 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7cbb6eab
  33. Jan 14, 2014
    • Mark Michelson's avatar
      Fix erroneous behavior when sending auth rejection to artificial endpoint. · aced8bdd
      Mark Michelson authored
      We were not including an authentication challenge when sending a 401 response
      to unmatched endpoints. This was due to the conversion to use a vector for
      authentication section names on an endpoint. The vector for artificial endpoints
      was empty, resulting in the challenge being sent back containing no challenges.
      
      This is worked around by placing a bogus value in the artificial endpoint's auth
      vector. This value is never looked up by anything, since they instead will directly
      call ast_sip_get_artificial_auth().
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      aced8bdd
Loading