Skip to content
Snippets Groups Projects
  1. Sep 10, 2019
  2. Sep 05, 2019
    • George Joseph's avatar
    • Joshua Colp's avatar
      AST-2019-005 - translate: Don't assume all frames will have a src. · 1e9714a0
      Joshua Colp authored
      This change removes the assumption that a frame will always have
      a src set on it. This assumption is incorrect.
      
      Given a scenario where an RTP packet is received with no payload
      the resulting audio frame will have no samples. If this frame goes
      through a signed linear translation path an interpolated frame can
      be created (if generic packet loss concealment is enabled) that has
      minimal data on it, including no src. If this frame is given to a
      translation path a crash will occur due to the lack of src.
      
      ASTERISK-28499
      
      Change-Id: I024d10dd98207eb8a6b35b59880bcdf1090538f8
      1e9714a0
    • Kevin Harwell's avatar
      AST-2019-004 - res_pjsip_t38.c: Add NULL checks before using session media · 18f5f5fc
      Kevin Harwell authored
      After receiving a 200 OK with a declined stream in response to a T.38
      initiated re-invite Asterisk would crash when attempting to dereference
      a NULL session media object.
      
      This patch checks to make sure the session media object is not NULL before
      attempting to use it.
      
      ASTERISK-28495
      patches:
        ast-2019-004.patch submitted by Alexei Gradinari (license 5691)
      
      Change-Id: I168f45f4da29cfe739acf87e597baa2aae7aa572
      18f5f5fc
  3. Sep 04, 2019
    • Chris-Savinovich's avatar
      test_utils.c: Skip test adsi_loaded_test if module not loaded. · ed757cc7
      Chris-Savinovich authored
      Module res_adsi.so is deprecated, therefore it does not load by default.
      Module not loaded causes it to yield a FAIL when tested by tests/test_utils.c.
      This fix checks if the corresponding module is loaded at the start of the test,
      and if not, it passes the test and exits with a message.
      
      This fix is applied to all versions where the module is marked deprecated.
      
      Change-Id: I52be64c8f6af222e15148a856d1f10cb113e1e94
      ed757cc7
    • Igor Goncharovsky's avatar
      chan_unistim: Fix clang warning: variable sized type not at end of a struct · 3863ab9a
      Igor Goncharovsky authored
      On reading information about initial client packet unistim use dirty
      implementation of destination ip address retrieval. This fix uses
      CMSG_*(..) to get ip address and make clang compile without warning.
      
      ASTERISK-25592 #close
      Reported-by: Alexander Traud
      
      Change-Id: Ic1fd34c2c2bcc951da65bf62e3f7a8adff8351b1
      3863ab9a
  4. Sep 03, 2019
  5. Aug 30, 2019
  6. Aug 28, 2019
    • Kevin Harwell's avatar
      res_pjsip_mwi: add better handling of solicited vs unsolicited subscriptions · 172e183b
      Kevin Harwell authored
      res_pjsip_mwi allows both solicited and unsolicited MWI subscription types.
      While both can be set in the configuration for a given endpoint/aor, only
      one is allowed. Precedence is given to unsolicited. Meaning if an endpoint/aor
      is configured to allow both types then the solicited subscription is rejected
      when it comes in. However, there is a configuration option to override that
      behavior:
      
      mwi_subscribe_replaces_unsolicited
      
      When set to "yes" then when a solicited subscription comes in instead of
      rejecting it Asterisk is suppose to replace the unsolicited one if it exists.
      Prior to this patch there was a bug in Asterisk that allowed the solicted one
      to be added, but did not remove the unsolicited. As a matter of fact a new
      unsolicited subscription got added everytime a SIP register was received.
      Over time this eventually could "flood" a phone with SIP notifies.
      
      This patch fixes that behavior to now make it work as expected. If configured
      to do so a solicited subscription now properly replaces the unsolicited one.
      As well when an unsubscribe is received the unsolicited subscription is
      restored. Logic was also put in to handle reloads, and any configuration changes
      that might result from that. For instance, if a solicited subscription had
      previously replaced an unsolicited one, but after reload it was configured to
      not allow that then the solicited one needs to be shutdown, and the unsolicited
      one added.
      
      ASTERISK-28488
      
      Change-Id: Iec2ec12d9431097e97ed5f37119963aee41af7b1
      172e183b
  7. Aug 27, 2019
    • Igor Goncharovsky's avatar
      chan_unistim: Fix code, causing all incoming DTMF sent back to asterisk · 1d06a1ef
      Igor Goncharovsky authored
      Current implementation of ast_channel_tech send_digit_begin hook uses
      same function for tone playback as key press handler. This cause every
      incoming dtmf send back to asterisk. In case of two unistim phones
      connected to each other, it'll cause indefinite DTMF loop. Fix add
      separate function for dtmf tone phone play.
      
      Change-Id: I5795db468df552f0c89c7576b6b3858b26c4eab4
      1d06a1ef
  8. Aug 26, 2019
  9. Aug 23, 2019
  10. Aug 22, 2019
    • George Joseph's avatar
      chan_rtp: Accept hostname as well as ip address as destination · 19045db3
      George Joseph authored
      The UnicastRTP channel driver provided by chan_rtp now accepts
      "<hostname>:<port>" as an alternative to "<ip_address>:<port>"
      in the destination. The first AAAA (preferred) or A record resolved
      will be used as the destination. The lookup is synchronous so beware
      of possible dialplan delays if you specify a hostname.
      
      Change-Id: Ie6f95b983a8792bf0dacc64c7953a41032dba677
      19045db3
    • George Joseph's avatar
      dns_core: Create new API ast_dns_resolve_ipv6_and_ipv4 · 9e015713
      George Joseph authored
      The new function takes in a pointer to an ast_sockaddr structure,
      a hostname and an optional port and then dispatches parallel
      "AAAA" and "A" record queries.  If an "AAAA" record is returned,
      it's parsed into the ast_sockaddr structure along with the port
      if it was supplied.  If no "AAAA" record was returned, the
      first "A" record returned (if any) is parsed instead.
      
      This is a synchronous call.  If you need asynchronous lookups,
      use ast_dns_query_set_resolve_async and roll your own.
      
      Change-Id: I194b0b0e73da94b35cc35263a868ffac3a8d0a95
      9e015713
  11. Aug 21, 2019
  12. Aug 20, 2019
    • George Joseph's avatar
      res_ari.c: Prefer exact handler match over wildcard · 8da4e28a
      George Joseph authored
      Given the following request path and 2 handler paths...
      Request: /channels/externalMedia
      Handler: /channels/{channelId}      "wildcard"
      Handler: /channels/externalmedia    "non-wildcard"
      
      ...if /channels/externalMedia was registered as a handler after
      /channels/{channelId} as shown above, the request would automatically
      match the wildcard handler and attempt to parse "externalMedia" into
      the channelId variable which isn't what was intended.  It'd work
      if the non-wildard entry was defined in rest-api/api-docs/channels.json
      before the wildcard entry but that makes the json files
      order-dependent which isn't a good thing.
      
      To combat this issue, the search loop saves any wildcard match but
      continues looking for exact matches at the same level.  If it finds
      one, it's used.  If it hasn't found an exact match at the end of
      the current level, the wildcard is used.  Regardless, after
      searching the current level, the wildcard is cleared so it won't
      accidentally match for a different object or a higher level.
      
      BTW, it's currently not possible for more than 1 wildcard entry
      to be defined for a level.  For instance, there couldn't be:
      Handler: /channels/{channelId}
      Handler: /channels/{channelName}
      We wouldn't know which one to match.
      
      Change-Id: I574aa3cbe4249c92c30f74b9b40e750e9002f925
      8da4e28a
    • Sean Bright's avatar
      audiohook.c: Substitute silence for unavailable audio frames · 64906c4c
      Sean Bright authored
      There are 4 scenarios to consider when capturing audio from a channel
      with an audiohook:
      
       1. There is no rx and no tx audio, so return nothing.
       2. There is rx but no tx audio, so return rx.
       3. There is tx but no rx audio, so return tx.
       4. There is rx and tx audio, so mix them and return.
      
      The file passed as the primary argument to MixMonitor will be written to
      in scenarios 2, 3, and 4. However, if you pass the r() and t() options
      to MixMonitor, a frame will only be written to the r() file if there was
      rx audio and a frame will only be written to the t() file if there was
      tx audio.
      
      If you subsequently take the r() and t() files and try to mix them, the
      sides of the conversation will 'drift' and be non-representative of the
      user experience.
      
      This patch adds a new 'S' option to MixMonitor that injects a frame of
      silence on either the r() side or the t() side of the channel so that
      when later mixed, there is no such drift.
      
      Change-Id: Ibf5ed73a811087727bd561a89a59f4447b4ee20e
      64906c4c
    • Stas Kobzar's avatar
      res_pjsip: Channel variable SIPFROMDOMAIN · c7270dca
      Stas Kobzar authored
      In chan_sip, there was variable SIPFROMDOMAIN that allows to set
      From header URI domain per channel. This patch introduces res_pjsip
      variable SIPFROMDOMAIN for backward compatibility with chan_sip.
      
      ASTERISK-28489
      
      Change-Id: I715133e43172ce2a1e82093538dc39f9e99e5f2e
      c7270dca
  13. Aug 15, 2019
  14. Aug 09, 2019
  15. Aug 08, 2019
    • George Joseph's avatar
    • George Joseph's avatar
      CI: Escape backslashes in printenv/sort/tr · 446bac73
      George Joseph authored
      Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94
      (cherry picked from commit c6558e09)
      446bac73
    • Kevin Harwell's avatar
      srtp: Fix possible race condition, and add NULL checks · b805e123
      Kevin Harwell authored
      Somehow it's possible for the srtp session object to be NULL even though the
      Asterisk srtp object itself is valid. When this happened it would cause a
      crash down in the srtp code when attempting to protect or unprotect data.
      
      After looking at the code there is at least one spot that makes this situation
      possible. If Asterisk fails to unprotect the data, and after several retries
      it still can't then the srtp->session gets freed, and set to NULL while still
      leaving the Asterisk srtp object around. However, according to the original
      issue reporter this does not appear to be their situation since they found
      no errors logged stating the above happened (which Asterisk does for that
      situation).
      
      An issue was found however, where a possible race condition could occur between
      the pjsip incoming negotiation, and the receiving of RTP packets. Both places
      could attempt to create/setup srtp for the same rtp instance at the same time.
      This potentially could be the cause of the problem as well.
      
      Given the above this patch adds locking around srtp setup for a given rtp, or
      rtcp instance. NULL checks for the session have also been added within the
      protect and unprotect functions as a precaution. These checks should at least
      stop Asterisk from crashing if it gets in this situation again.
      
      This patch also fixes one other issue noticed during investigation. When doing
      a replace the old object was freed before creating the replacement. If the new
      replacement object failed to create then the rtp/rtcp instance would now point
      to freed srtp data which could potentially cause a crash as well when the next
      attempt to reference it was made. This is now fixed so the old srtp object is
      kept upon replacement failure.
      
      Lastly, more logging has been added to help diagnose future issues.
      
      ASTERISK-28472
      
      Change-Id: I240e11cbb1e9ea8083d59d50db069891228fe5cc
      b805e123
    • George Joseph's avatar
      CI: Add "throttle" label and "skip_gate" capability · be613060
      George Joseph authored
      To make throttling by label fully active, the "throttle" option
      has to be specified with a specific label.
      
      You can now specify "skip_gate" in the Gerrit comments when you
      do a +2 code review to tell Jenkins not to actually run the
      gate.  You'd do this if you plan to manually merge the change.
      
      Also updated the "printenv" debug output to better sort multi-line
      comments.
      
      Change-Id: I4c0b1085acec4805f2ca207eebac50aad81f27e2
      be613060
    • George Joseph's avatar
  16. Aug 07, 2019
  17. Aug 06, 2019
Loading