Skip to content
Snippets Groups Projects
  1. Mar 09, 2020
    • Paulo Vicentini's avatar
      chan_pjsip: Check audio frame when remote SSRC changes. · ed2a7e3e
      Paulo Vicentini authored
      If the SSRC of a received RTP packet differed from the previous SSRC
      an SSRC change control frame would be queued ahead of the media
      frame. In the case of audio this would result in the format of the
      audio frame not being checked, and if it differed or was not allowed
      then it could cause the call to drop due to failure to set up a
      translation path.
      
      The chan_pjsip module will now no longer assume the first frame
      will be the audio frame and instead goes through the complete list
      to find it.
      
      ASTERISK-28759
      
      Change-Id: I6d854cc523f343e299a615636fc65bdbd5f809ec
      ed2a7e3e
  2. Jan 31, 2020
    • Walter Doekes's avatar
      chan_sip: Return 503 if we're out of RTP ports · 43620cbf
      Walter Doekes authored
      If you're for some reason out of RTP ports, chan_sip would previously
      responde to an INVITE with a 403, which will fail the call.
      
      Now, it returns a 503, allowing the device/proxy to retry the call on a
      different machine.
      
      ASTERISK-28718
      
      Change-Id: I968dcf6c1e30ecddcce397dcda36db727c83ca90
      43620cbf
  3. Jan 24, 2020
    • Walter Doekes's avatar
      chan_sip: Always process updated SDP on media source change · 711a3fed
      Walter Doekes authored
      Fixes no-audio issues when the media source is changed and
      strictrtp is enabled (default).
      
      If the peer media source changes, the SDP session version also changes.
      If it is lower than the one we had stored, chan_sip would ignore it.
      
      This changeset keeps track of the remote media origin identifier,
      comparing that as well. If it changes, the session version needn't be
      higher for us to accept the SDP.
      
      Common scenario where this would've caused problems: a separate media
      gateway that informs the caller about premium rates before handing off
      the call to the final destination.
      
      (An alternative fix would be to set ignoresdpversion=yes on the peer.)
      
      ASTERISK-28686
      
      Change-Id: I88fdbc5aeb777b583e7738c084254c482a7776ee
      711a3fed
  4. Jan 23, 2020
    • Sean Bright's avatar
      chan_pjsip: Ignore RTP that we haven't negotiated · 313189aa
      Sean Bright authored
      If chan_pjsip receives an RTP packet whose payload differs from the
      channel's native format, and asymmetric_rtp_codec is disabled (the
      default), Asterisk will switch the channel's native format to match
      that of the incoming packet without regard to the negotiated payloads.
      
      We now check that the received frame is in a format we have negotiated
      before switching payloads which results in these packets being dropped
      instead of causing the session to terminate.
      
      ASTERISK-28139 #close
      Reported by: Paul Brooks
      
      Change-Id: Icc3b85cee1772026cee5dc1b68459bf9431c14a3
      313189aa
  5. Jan 21, 2020
  6. Jan 16, 2020
    • Sean Bright's avatar
      chan_sip.c: Stop handling continuation lines after reading headers · f309b86e
      Sean Bright authored
      lws2sws() does not stop trying to handle header continuation lines
      even after all headers have been found. This is problematic if the
      first character of a SIP message body is a space or tab character, so
      we update to recognize the end of the message header.
      
      ASTERISK-28693 #close
      Reported by: Frank Matano
      
      Change-Id: Idec8fa58545cd3fd898cbe0075d76c223f8d33df
      f309b86e
  7. Jan 14, 2020
  8. Jan 07, 2020
    • George Joseph's avatar
      sig_pri: Fix deadlock caused by sig_pri_queue_hangup · ee7d72eb
      George Joseph authored
      The change to add setting hangupsource to sig_pri_queue_hangup()
      made in https://gerrit.asterisk.org/c/asterisk/+/12857 casued
      deadlocks when a hangup request was received from the core at the
      same time a hanguprequest was received from the remote end via the
      D channel.
      
      Although the PRI's channel private structure was being unlocked
      before setting the hangupsource, the PRI's own lock was still being
      held during the process.  If channel actions were also coming from
      the core, a deadlock on the PRI could result.  This deadlock could
      then escalate to the entire DAHDI subsystem via DAHDI's global
      interface list lock, especially if someone used the PRI CLI commands.
      
      Fix:
      
      * We now unlock the PRI as well as the PRI's channel private
        structure before setting the hangupsource, then relock both
        afterwards.
      
      ASTERISK-28605
      Reported by: Dirk Wendland
      
      Change-Id: Id74aaa5d4e3746063dbe9deed188eb65193cb9c9
      ee7d72eb
  9. Dec 07, 2019
    • Jaco Kroon's avatar
      chan_sip: in case of tcp/tls, be less annoying about tx errors. · 365d007e
      Jaco Kroon authored
      
      chan_sip.c:3782 __sip_xmit: sip_xmit of 0x7f1478069230 (len 600) to
      213.150.203.60:1492 returned -2: Interrupted system call
      
      returned -2 implies this wasn't actually an OS error, so errno makes no
      sense either.  Internal error was already logged higher up, and -2
      generally means that either there isn't a valid connection available, or
      the pipe notification failed, and that is already correctly logged.
      
      ASTERISK-28651 #close
      
      Change-Id: I46eb82924beeff9dfd86fa6c7eb87d2651b950f2
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      365d007e
  10. Dec 04, 2019
  11. Nov 21, 2019
    • Ben Ford's avatar
      chan_sip.c: Prevent address change on unauthenticated SIP request. · 4a1cadea
      Ben Ford authored
      If the name of a peer is known and a SIP request is sent using that
      peer's name, the address of the peer will change even if the request
      fails the authentication challenge. This means that an endpoint can
      be altered and even rendered unusuable, even if it was in a working
      state previously. This can only occur when the nat option is set to the
      default, or auto_force_rport.
      
      This change checks the result of authentication first to ensure it is
      successful before setting the address and the nat option.
      
      ASTERISK-28589 #close
      
      Change-Id: I581c5ed1da60ca89f590bd70872de2b660de02df
      4a1cadea
  12. Nov 19, 2019
    • Frederic LE FOLL's avatar
      chan_dahdi: PRI span status may stay "Down, Active" after a short alarm · a68299f5
      Frederic LE FOLL authored
      Upon a short PRI disconnection, libpri may maintain Q.921 layer 'up' and
      may thus not send PRI_EVENT_DCHAN_DOWN / PRI_EVENT_DCHAN_UP events.
      If pri_event_alarm() clears DCHAN_UP status bit upon alarm detection
      and no Q.921 reconnection sequence occurs, chan_dahdi will keep
      seeing span status "Down" at the end of alarm.
      
      This patch modifies pri_event_alarm() in order to keep DCHAN_UP bit
      unchanged. libpri will send a PRI_EVENT_DCHAN_DOWN event if it detects
      a disconnection of Q.921 layer and this will clear DCHAN_UP if required.
      
      ASTERISK-28615
      
      Change-Id: Ibe27df4971fd4c82cc6850020bce4a8b2692c996
      a68299f5
  13. Nov 18, 2019
    • Kevin Harwell's avatar
      various files - fix some alerts raised by lgtm code analysis · bdd785d3
      Kevin Harwell authored
      This patch fixes several issues reported by the lgtm code analysis tool:
      
      https://lgtm.com/projects/g/asterisk/asterisk
      
      Not all reported issues were addressed in this patch. This patch mostly fixes
      confirmed reported errors, potential problematic code points, and a few other
      "low hanging" warnings or recommendations found in core supported modules.
      These include, but are not limited to the following:
      
      * innapropriate stack allocation in loops
      * buffer overflows
      * variable declaration "hiding" another variable declaration
      * comparisons results that are always the same
      * ambiguously signed bit-field members
      * missing header guards
      
      Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25
      bdd785d3
  14. Nov 08, 2019
    • Corey Farrell's avatar
      core: Improve MALLOC_DEBUG for frames. · 8a1f30af
      Corey Farrell authored
      * Pass caller information to frame allocation functions.
      * Disable caching as it interfers with MALLOC_DEBUG reporting.
      * Stop using ast_calloc_cache.
      
      Change-Id: Id343cd80a3db941d2daefde2a060750fea8cd260
      8a1f30af
  15. Oct 18, 2019
    • Salah Ahmed's avatar
      Crash during "pjsip show channelstats" execution · ddb0091d
      Salah Ahmed authored
      During execution "pjsip show channelstats" cli command by an
      external module asterisk crashed. It seems this is a separate
      thread running to fetch and print rtp stats. The crash happened on
      the ao2_lock method, just before it going to read the rtp stats on
      a rtp instance. According to gdb backtrace log, it seems the
      session media was already cleaned up at that moment.
      
      ASTERISK-28578
      
      Change-Id: I3e05980dd4694577be6d39be2c21a5736bae3c6f
      ddb0091d
  16. Oct 08, 2019
  17. Oct 01, 2019
  18. Sep 17, 2019
    • Florian Floimair's avatar
      core: Add H.265/HEVC passthrough support · c1898320
      Florian Floimair authored
      This change adds H.265/HEVC as a known codec and creates a cached
      "h265" media format for use.
      
      Note that RFC 7798 section 7.2 also describes additional SDP
      parameters. Handling of these is not yet supported.
      
      ASTERISK-28512
      
      Change-Id: I26d262cc4110b4f7e99348a3ddc53bad0d2cd1f2
      c1898320
    • Guido Falsi's avatar
      chan_dahdi: Fix build with clang/llvm · 4072e219
      Guido Falsi authored
      On FreeBSD using the clang/llvm compiler build fails to build due
      to the switch statement argument being a non integer type expression.
      Switch to an if/else if/else construct to sidestep the issue.
      
      ASTERISK-28536 #close
      
      Change-Id: Idf4a82cc1e94580a2d017fe9e351c226f23e20c8
      4072e219
  19. Sep 16, 2019
    • Joshua Colp's avatar
      chan_pjsip: Relock correct channel during "fax" redirect. · c358da47
      Joshua Colp authored
      When fax detection occurs on an outbound PJSIP channel the
      redirect operation will result in a masquerade occurring and
      the underlying channel on the session changing. The code
      incorrectly relocked the new channel instead of the old
      channel when returning. This resulted in the new channel
      being locked indefinitely. The code now always acts on the
      expected channel.
      
      ASTERISK-28538
      
      Change-Id: I2b2e60d07e74383ae7e90d752c036c4b02d6b3a3
      c358da47
  20. 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
  21. Sep 10, 2019
    • 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
      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
  22. Sep 04, 2019
  23. 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
  24. Aug 26, 2019
  25. 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
  26. Aug 01, 2019
    • Kevin Harwell's avatar
      various modules: json integer overflow · 3656c42c
      Kevin Harwell authored
      There were still a few places in the code that could overflow when "packing"
      a json object with a value outside the base type integer's range. For instance:
      
      unsigned int value = INT_MAX + 1
      ast_json_pack("{s: i}", value);
      
      would result in a negative number being "packed". In those situations this patch
      alters those values to a ast_json_int_t, which widens the value up to a long or
      long long.
      
      ASTERISK-28480
      
      Change-Id: Ied530780d83e6f1772adba0e28d8938ef30c49a1
      3656c42c
  27. Jul 22, 2019
  28. Jul 11, 2019
    • Francesco Castellano's avatar
      chan_sip: Handle invalid SDP answer to T.38 re-invite · 8438d19b
      Francesco Castellano authored
      The chan_sip module performs a T.38 re-invite using a single media
      stream of udptl, and expects the SDP answer to be the same.
      
      If an SDP answer is received instead that contains an additional
      media stream with no joint codec a crash will occur as the code
      assumes that at least one joint codec will exist in this
      scenario.
      
      This change removes this assumption.
      
      ASTERISK-28465
      
      Change-Id: I8b02845b53344c6babe867a3f0a5231045c7ac87
      8438d19b
  29. Jul 08, 2019
    • Kevin Harwell's avatar
      MWI: Update modules that subscribe to MWI to use new API calls · 9637e1df
      Kevin Harwell authored
      The MWI core recently got some new API calls that make tracking MWI state
      lifetime more reliable. This patch updates those modules that subscribe to
      specific MWI topics to use the new API. Specifically, these modules now
      subscribe to both MWI topics and MWI state.
      
      ASTERISK-28442
      
      Change-Id: I32bef880b647246823dbccdf44a98d384fcabfbd
      9637e1df
  30. Jul 01, 2019
    • Chris-Savinovich's avatar
      chan_dahdi.c: crash in chan_dahdi · 0e669712
      Chris-Savinovich authored
      Fixes a crash in chan_dahdi occurring on 32-bit systems. A previous
      patch introduced a variable of type unassigned long long which is 64-bits.
      Casting it as 'ast_json_int_t' along with JSON type 'I' makes it work
      with 32-bit systems.
      
      ASTERISK-28457
      
      Change-Id: I9cef6b5f2d826fc5c93f2f6a1c997c4e3e6c93fe
      0e669712
  31. Jun 25, 2019
    • Dan Cropp's avatar
      chan_pjsip: Transmit REFER waits for the REFER result setting TRANSFERSTATUS · e52fbae0
      Dan Cropp authored
      Previously, when a Transfer (REFER) was performed, chan_pjsip would set
      the TRANSFERSTATUS to SUCCESS when the REFER was queued up.  This did not
      reflect a successful/unsuccessful transfer the way chan_sip did.
      Added a callback module to process the refer subscription information.
      
      Now depends on res_pjsip_pubsub so call transfer progress can be monitored
      and reported
      
      ASTERISK-26968 #close
      Reported-by: Dan Cropp
      
      Change-Id: If6c27c757c66f71e8b75e3fe49da53ebe62395dc
      e52fbae0
  32. Jun 24, 2019
Loading