Skip to content
Snippets Groups Projects
  1. Dec 31, 2015
  2. Dec 28, 2015
    • Joshua Colp's avatar
      410c5ee0
    • Matt Jordan's avatar
    • Joshua Colp's avatar
      test_time: Provide a timeout when waiting. · a05bb258
      Joshua Colp authored
      The test_timezone_watch unit test is written to expect a
      condition to be signaled when the inotify daemon thread runs.
      There exists a small window where the test_timezone_watch
      thread can signal the inotify daemon thread while it is not
      reading on the underlying file descriptor. If this occurs
      the test_timezone_watch thread will wait indefinitely for a
      signal that will never arrive.
      
      This change adds a timeout to the condition so it will return
      regardless after a period of time.
      
      Change-Id: Ifed981879df6de3d93acd3ee0a70f92546517390
      a05bb258
    • Matt Jordan's avatar
      tests/test_stasis_endpoints: Remove expected duplicate events · 96b32e03
      Matt Jordan authored
      The cache_clear test was written to expect duplicate Stasis messages
      sent from the technology endpoint to the all caching topic. This patch
      fixes the test to no longer expect these duplicate messages.
      
      ASTERISK-25137
      
      Change-Id: I58075d70d6cdf42e792e0fb63ba624720bfce981
      96b32e03
    • Dade Brandon's avatar
      res_http_websocket.c: prevent avoidable disconnections caused by write errors · 3bddcc02
      Dade Brandon authored
      Updated ast_websocket_write to encode the entire frame in to one
      write operation, to ensure that we don't end up with a situation
      where the websocket header has been sent, while the body can not
      be written.
      
      Previous to August's patch in commit b9bd3c14, certain network
      conditions could cause the header to be written, and then the
      sub-sequent body to fail - which would cause the next successful
      write to contain a new header, and a new body (resulting in
      the peer receiving two headers - the second of which would be
      read as part of the body for the first header).
      
      This was patched to have both write operations individually fail
      by closing the websocket.
      
      In a case available to the submitter of this patch, the same
      body which would consistently fail to write, would succeed
      if written at the same time as the header.
      
      This update merges the two operations in to one, adds debug messages
      indicating the reason for a websocket connection being closed during
      a write operation, and clarifies some variable names for code legibility.
      
      Change-Id: I4db7a586af1c7a57184c31d3d55bf146f1a40598
      3bddcc02
    • George Joseph's avatar
      endpoint/stasis: Eliminate duplicate events on endpoint status change · 22db16fa
      George Joseph authored
      
      When an endpoint is created, its messages are forwarded to both the tech
      endpoint topic and the all endpoints topic. This is done so that various
      parties interested in endpoint messages can subscribe to just the tech
      endpoint and receive all messages associated with that particular technology,
      as opposed to subscribing to the all endpoints topic. Unfortunately, when the
      tech endpoint is created, it also forwards all of its messages to the all
      topic. This results in duplicate messages whenever an endpoint publishes its
      messages.
      
      This patch resolves the duplicate message issue by creating a new function
      for Stasis caching topics, stasis_cp_sink_create. In most respects, this acts
      as a normal caching topic, save that it no longer forwards messages it receives
      to the all endpoints topic. This allows it to act as an aggregation "sink",
      while preserving the necessary caching behaviour.
      
      ASTERISK-25137 #close
      Reported-by: Vitezslav Novy
      
      ASTERISK-25116 #close
      Reported-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      Tested-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      
      Change-Id: Ie47784adfb973ab0063e59fc18f390d7dd26d17b
      22db16fa
    • Matt Jordan's avatar
      b4b4a952
    • Matt Jordan's avatar
    • Joshua Colp's avatar
    • Corey Farrell's avatar
      Remove res_jabber file that was left behind. · 6b08f01c
      Corey Farrell authored
      Change-Id: I9d88fac0394d5bbaff0900a2ee911c4e4478846b
      6b08f01c
  3. Dec 25, 2015
    • Dade Brandon's avatar
      chan_sip.c: fix websocket_write_timeout default value · 6dc21bbf
      Dade Brandon authored
      websocket_write_timeout was not being set to its default value
      during sip config reload, which meant that prior to this commit,
      1) the default value of 100 was not used, unless an invalid value
      (or 1) was specified in sip.conf for websocket_write_timeout, and
      2) if the websocket_write_timeout directive was removed from sip.conf
      without a full restart of asterisk, then the previous value would
      continue to be used indefinitely.
      
      This essentially lead to a 0ms write timeout (the first write attempt
      in ast_careful_fwrite must have succeeded) in websocket write requests
      from chan_sip, unless websocket_write_timeout was explicitely set in sip.conf.
      
      Changes to websocket_write_timeout still only apply to new websocket
      sessions, after the sip reload -- timeouts on existing sessions are
      not adjusted during sip reload.
      
      Change-Id: Ibed3816ed29cc354af6564c5ab3e75eab72cb953
      6dc21bbf
  4. Dec 24, 2015
    • Richard Mudgett's avatar
      bridge_basic.c: Fix GOTO_ON_BLINDXFR · 8eb5da06
      Richard Mudgett authored
      Use of GOTO_ON_BLINDXFR would not work at all.  The target location would
      never be executed by the transferring channel.
      
      * Made feature_blind_transfer() call ast_bridge_set_after_go_on() with
      valid context, exten, and priority parameters from the transferring
      channel.
      
      * Renamed some feature_blind_transfer() local variables for clarity.
      
      ASTERISK-25641 #close
      Reported by Dmitry Melekhov
      
      Change-Id: I19bead9ffdc4aee8d58c654ca05a198da1e4b7ac
      8eb5da06
    • Matt Jordan's avatar
      res/res_pjsip_location: Delete contact_status object when contact is deleted · 2df4ad64
      Matt Jordan authored
      In 450579e9, a change was made that removed the deletion of the
      'contact_status' object when a 'contact' object is deleted in sorcery.
      This unfortunately means that the 'contact_status' object persists, even when
      something has explicitly removed a contact. The result is that the state of
      the contact will not be regenerated if that contact is re-created, and the
      stale state will be reported/used for that contact. It also results in
      no ContactStatusChanged events being generated for either ARI or AMI.
      
      This patch restores the deletion logic that was removed. Doing so now
      results in the expected events being generated again.
      
      Change-Id: I28789a112e845072308b5b34522690e3faf58f07
      2df4ad64
    • Kevin Harwell's avatar
      res_rtp_asterisk: rtp->ice check not wrapped in HAVE_PJPROJECT ifdef · b8876711
      Kevin Harwell authored
      Change-Id: I19b49112e1b630bd04e859f14ccf96f8ebd6b151
      b8876711
  5. Dec 23, 2015
  6. Dec 22, 2015
    • Dade Brandon's avatar
      app_amd: Correct maximum_number_of_words functionality & documentation · ca394161
      Dade Brandon authored
      - The maximum_number_of_words was previously documented as being
      the number of words that when exceeded, would result in the AMD
      application returning that the audio represents a machine.
      
      This was inconsistent with its actual functionality - it was
      a number of words that when REACHED, would result in determination
      as a machine.
      
      This update corrects the functionality to match the previously
      documented functionality.  This is a backwards incompatible change
      in configuration file, and has been added to UPGRADE.txt as a result.
      
      The sample configuration file and application defaults have been updated
      so that the default value is now 2, which reflects the same default
      functionality as previous versions.
      
      - Update documentation for silence_threshold, which previously implied
      that it was measuring time, rather than noise averages in the sample.
      
      - Update the comments in amd.conf.sample.
      
      ASTERISK-25639 #close
      Change-Id: I4b1451e5dc9cb3cb06d59b6ab872f5275ba79093
      ca394161
  7. Dec 21, 2015
    • Dade Brandon's avatar
      res_rtp_asterisk: Resolve further timing issues with DTLS negotiation · 648ca2b1
      Dade Brandon authored
      Resolves an edge case dtls negotiation delay for certain networks which
      somehow manage to drop the rtcp side's packet when these are both sent
      ast_rtp_remote_address_set, causing it to have to time-out and restart
      the handshake.
      
      Move dtls pending bio flush in to it's own function, and call it from
      ast_rtp_on_ice_complete, when we're rtp->ice, rather than when
      ast_rtp_remote_address_set.
      
      Keep the existing flush from the recent change to res_rtp_remote_address_set
      if ice is not being used.
      
      ASTERISK-25614 #close
      Reported-by: XenCALL
      Tested by: XenCALL
      
      Change-Id: Ie2caedbdee1783159f375589b6fd3845c8577ba5
      648ca2b1
  8. Dec 19, 2015
  9. Dec 18, 2015
  10. Dec 17, 2015
  11. Dec 16, 2015
    • Joshua Colp's avatar
      json: Audit ast_json_* usage for thread safety. · d17d9a92
      Joshua Colp authored
      The JSON library Asterisk uses, jansson, is not thread
      safe for us in a few ways. To help with this wrappers for JSON
      object reference count increasing and decreasing were added
      which use a global lock to ensure they don't clobber over
      each other. This does not extend to reference count manipulation
      within the jansson library itself. This means you can't safely
      use the object borrowing specifier (O) in ast_json_pack and
      you can't share JSON instances between objects.
      
      This change removes uses of the O specifier and replaces them
      with the o specifier and an explicit ast_json_ref. Some cases
      of instance sharing have also been removed.
      
      ASTERISK-25601 #close
      
      Change-Id: I06550d8b0cc1bfeb56cab580a4e608ae4f1ec7d1
      d17d9a92
    • Matt Jordan's avatar
      093f14d7
  12. Dec 15, 2015
    • server-pandora's avatar
      res_rtp_asterisk.c: Fix DTLS negotiation delays. · 32ec83f3
      server-pandora authored
      - Trigger pending DTLS packets to send out, once the RTP instance's remote
        address is set.
      - Avoids locking the DTLS structure unnecessarily by only doing this if
        DTLS is passive.
      - Add DTLS locks around the structurally sensitive calls in the SSL
        portion of __rtp_recvfrom, since dtls_srtp_check_pending does not lock
        inside of itself, and we're dealing with the SSL BIO in at least two
        threads.
      
      WebRTC channels may receive a DTLS handshake before
      ast_rtp_remote_address_set is called, which causes there to be a pending
      response to send out.   Previous to 1ad827, this was handled by calling
      dtls_srtp_check_pending on receipt of any RTP packet - a STUN or RTP
      packet could trigger the pending handshake response.  Since that was
      rightfully removed, whenever the DTLS handshake is received before the
      remote address is set, we would have to wait until another SSL packet
      arrives.
      
      As of Chrome M47's optimizations to their handshake process, WebRTC
      conversations between Chrome M47+ and Asterisk, where Asterisk is passive,
      experience a 1 second delay without this patch, because the SSL handshake
      is received before ICE negotation stores the remote_address, and the next
      SSL packet isn't received until after a 1 second timeout in Chrome, which
      causes a new handshake request.
      
      ASTERISK-25614 #close
      
      Change-Id: I547f1be7e302dbf71f6553dd8cbc0657b1d0b908
      32ec83f3
    • pchero's avatar
      AMI: Fixed OriginateResponse message · 52ca6fb9
      pchero authored
      When the asterisk sending OriginateResponse message,
      it doesn't set the "Uniqueid".
      And it didn't support correct response message for
      Application originate.
      
      ASTERISK-25624 #close
      
      Change-Id: I26f54f677ccfb0b7cfd4967a844a1657fd69b74d
      52ca6fb9
  13. Dec 14, 2015
  14. Dec 13, 2015
    • Matt Jordan's avatar
      main/utils: Don't emit an ERROR message if the read end of a pipe closes · 9a96a86e
      Matt Jordan authored
      An ERROR or WARNING message should generally indicate that something has gone
      wrong in Asterisk. In the case of writing to a file descriptor, Asterisk is not
      in control of when the far end closes its reading on a file descriptor. If the
      far end does close the file descriptor in an unclean fashion, this isn't a bug
      or error in Asterisk, particularly when the situation can be gracefully
      handled in Asterisk.
      
      Currently, when this happens, a user would see the following somewhat cryptic
      ERROR message:
      
        "utils.c: write() returned error: Broken pipe"
      
      There's a few problems with this:
      (1) It doesn't provide any context, other than 'something broke a pipe'
      (2) As noted, it isn't actually an error in Asterisk
      (3) It can get rather spammy if the thing breaking the pipe occurs often, such
          as a FastAGI server
      (4) Spammy ERROR messages make Asterisk appear to be having issues, or can even
          mask legitimate issues
      
      This patch changes ast_carefulwrite to only log an ERROR if we actually had one
      that was reasonably under our control. For debugging purposes, we still emit
      a debug message if we detect that the far side has stopped reading.
      
      Change-Id: Ia503bb1efcec685fa6f3017bedf98061f8e1b566
      9a96a86e
  15. Dec 12, 2015
    • George Joseph's avatar
      pjsip/config_transport: Check pjproject version at runtime for async ops · 3e6637fe
      George Joseph authored
      pjproject < 2.5.0 will segfault on a tls transport if async_operations
      is greater than 1.  A runtime version check has been added to throw
      an error if the version is < 2.5.0 and async_operations > 1.
      
      To assist in the check, a new api "ast_compare_versions" was added
      to utils which compares 2 major.minor.patch.extra version strings.
      
      ASTERISK-25615 #close
      
      Change-Id: I8e88bb49cbcfbca88d9de705496d6f6a8c938a98
      Reported-by: George Joseph
      Tested-by: George Joseph
      3e6637fe
  16. Dec 10, 2015
  17. Dec 09, 2015
Loading