Skip to content
Snippets Groups Projects
  1. Sep 17, 2019
  2. Sep 13, 2019
    • Ben Ford's avatar
      res_rtp_asterisk.c: Send RTCP as compound packets. · 723b695c
      Ben Ford authored
      According to RFC3550, ALL RTCP packets must be sent in a compond packet
      of at least two individual packets, including SR/RR and SDES. REMB,
      FIR, and NACK were not following this format, and as a result, would
      fail the packet check in ast_rtcp_interpret. This was found from writing
      unit tests for RTCP. The browser would accept the way we were
      constructing these RTCP packets, but when sending directly from one
      Asterisk instance to another, the above mentioned problem would occur.
      
      Change-Id: Ieb140e9c22568a251a564cd953dd22cd33244605
      723b695c
  3. Sep 12, 2019
    • Sean Bright's avatar
      channels: Allow updating variable value · 32ce6e9a
      Sean Bright authored
      When modifying an already defined variable in some channel drivers they
      add a new variable with the same name to the list, but that value is
      never used, only the first one found.
      
      Introduce ast_variable_list_replace() and use it where appropriate.
      
      ASTERISK-23756 #close
      Patches:
        setvar-multiplie.patch submitted by Michael Goryainov
      
      Change-Id: Ie1897a96c82b8945e752733612ee963686f32839
      32ce6e9a
    • Friendly Automation's avatar
  4. Sep 11, 2019
  5. Sep 10, 2019
    • sungtae kim's avatar
      res_musiconhold: Added unregister realtime moh class · cf364cd0
      sungtae kim authored
      This fix allows a realtime moh class to be unregistered from the command
      line. This is useful when the contents of a directory referenced by a
      realtime moh class have changed.
      The realtime moh class is then reloaded on the next request and uses the
      new directory contents.
      
      ASTERISK-17808
      
      Change-Id: Ibc4c6834592257c4bb90601ee299682d15befbce
      cf364cd0
    • Ben Ford's avatar
      res_rtp: Add unit tests for RTCP stats. · 0e56643d
      Ben Ford authored
      Added unit tests for RTCP video stats. These tests include NACK, REMB,
      FIR/FUR/PLI, SR/RR/SDES, and packet loss statistics. The REMB and FIR
      tests are currently disabled due to a bug. We expect to receive a
      compound packet, but the code sends this out as a single packet, which
      the browser accepts, but makes Asterisk upset.
      
      While writing these tests, I noticed an issue with NACK as well. Where
      it is handling a received NACK request, it was reading in only the first
      8 bits of following packets that were also lost. This has been changed
      to the correct value of 16 bits.
      
      Also made a minor fix to the data buffer unit test.
      
      Change-Id: I56107c7411003a247589bbb6086d25c54719901b
      0e56643d
    • Frederic LE FOLL's avatar
      ChanIsAvail() generates a CDR when unanswered=yes in cdr.conf. · 2d0eee54
      Frederic LE FOLL authored
      ChanIsAvail() creates a temporary channel with ast_request() to test
      resource availability. It should not generate a CDR when it hangs up
      this temporary channel.
      
      This patch disables CDR generation for the temporary channel with
      ast_cdr_set_property().
      
      ASTERISK-28527
      
      Change-Id: I7b0555c6909c7d322e452dde97c9ea5b111552d1
      2d0eee54
    • Frederic LE FOLL's avatar
      chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up · 41b67f15
      Frederic LE FOLL authored
      When the remote ISDN party ends an ISDN call on a PRI link
      (DISCONNECT), CHANNEL(hangupsource) information is not available.
      
      chan_dahdi already contains an ast_set_hangupsource() in
      __dahdi_exception() function but it seems that ISDN message processing
      does not use this part of code.
      
      Two other channel modules associate ast_queue_hangup() and
      ast_set_hangupsource() functions calls:
      - chan_pjsip in chan_pjsip_session_end() function,
      - chan_sip in sip_queue_hangup_cause() function.
      chan_iax2 separates them, in iax2_queue_hangup()/iax2_destroy() and
      set_hangup_source_and_cause().
      
      Thus, I propose to add ast_set_hangupsource() beside
      ast_queue_hangup() in sig_pri_queue_hangup(), like chan_pjsip and
      chan_sip already do.
      
      ASTERISK-28525
      
      Change-Id: I0f588a4bcf15ccd0648fd69830d1b801c3f21b7c
      41b67f15
    • George Joseph's avatar
      ARI: External Media · 2ae1a22e
      George Joseph authored
      The Channel resource has a new sub-resource "externalMedia".
      This allows an application to create a channel for the sole purpose
      of exchanging media with an external server.  Once created, this
      channel could be placed into a bridge with existing channels to
      allow the external server to inject audio into the bridge or
      receive audio from the bridge.
      See https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI
      for more information.
      
      Change-Id: I9618899198880b4c650354581b50c0401b58bc46
      2ae1a22e
    • George Joseph's avatar
    • Friendly Automation's avatar
    • George Joseph's avatar
      chan_sip: Update links referenced in deprecation notice · 5fb9b231
      George Joseph authored
      The links in the deprecation notice were the shortened
      variety but it makes better sense to show the unshortened
      links as they're more descriptive.
      
      I.E.
      wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
      rather than
      wiki.asterisk.org/wiki/x/tAHOAQ
      
      Change-Id: If2da5d5243e2d4a6f193b15691d23e7e5a7c57a9
      5fb9b231
  6. Sep 08, 2019
  7. 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
  8. 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
  9. Sep 03, 2019
  10. Aug 30, 2019
  11. 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
  12. 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
  13. Aug 26, 2019
  14. Aug 23, 2019
  15. 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
  16. Aug 21, 2019
  17. 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
Loading