Skip to content
Snippets Groups Projects
  1. Nov 18, 2019
    • Kevin Harwell's avatar
      bridge_softmix: clear hold when joining a softmix bridge · e77cb325
      Kevin Harwell authored
      MOH continues to play to a channel if that channel was on hold prior to
      entering a softmix bridge. MOH will not stop even if the original "holder"
      attempts an unhold.
      
      For the most part a softmix bridge ignores holds, so a participating channel
      shouldn't join while on hold. This patch checks to see if the channel joining
      the softmix bridge is currently on hold. If so then it indicates an unhold.
      
      ASTERISK-28618
      
      Change-Id: I66ccd4efc80f5b4c3dd68186b379eb442916392b
      e77cb325
  2. May 02, 2019
    • Joshua Colp's avatar
      app_confbridge: Add "all" variants of REMB behavior. · 80dba268
      Joshua Colp authored
      When producing a combined REMB value the normal behavior
      is to have a REMB value which is unique for each sender
      based on all of their receivers. This can result in one
      sender having low bitrate while all the rest are high.
      
      This change adds "all" variants which produces a bridge
      level REMB value instead. All REMB reports are combined
      together into a single REMB value that is the same for
      each sender.
      
      ASTERISK-28401
      
      Change-Id: I883e6cc26003b497c8180b346111c79a131ba88c
      80dba268
  3. Apr 02, 2019
    • Kevin Harwell's avatar
      bridge_softmix: use a float type to store the internal REMB bitrate · d1d06928
      Kevin Harwell authored
      REMB's exponent is 6-bits (0..63) and has a mantissa of 18-bits. We were using
      an unsigned integer to represent the bitrate. However, that type is not large
      enough to hold all potential bitrate values. If the bitrate is large enough
      bits were being shifted off the "front" of the mantissa, which caused the
      wrong value to be sent to the browser.
      
      This patch makes it so it now uses a float type to hold the bitrate. Using a
      float allows for all bitrate values to be correctly represented.
      
      ASTERISK-28255
      
      Change-Id: Ice00fdd16693b16b41230664be5d9f0e465b239e
      d1d06928
  4. Jan 22, 2019
    • Xiemin Chen's avatar
      bridge_softmix: Use MSID:LABEL metadata as the cloned stream's appendix · a5266768
      Xiemin Chen authored
      To avoid the stream name collide if there're more than one video track
      in one client. If client has multi video tracks, the name of ast_stream
      which represents each video track may be the same. Use the MSID:LABEL
      here because it's identifiable.
      
      ASTERISK-28196 #close
      Reported-by: xiemchen
      
      Change-Id: Ib62b2886e8d3a30e481d94616b0ceaeab68a870b
      a5266768
  5. Dec 13, 2018
  6. Nov 13, 2018
  7. Oct 24, 2018
    • George Joseph's avatar
      bridge_softmix: Add SDP "label" attribute to streams · 8d1c6bb6
      George Joseph authored
      Adding the "label" attribute used for participant info correlation
      was previously done in app_confbridge but it wasn't working
      correctly because it didn't have knowledge about which video
      streams belonged to which channel.  Only bridge_softmix has that
      data so now it's set when the bridge topology is changed.
      
      ASTERISK-28107
      
      Change-Id: Ieddeca5799d710cad083af3fcc3e677fa2a2a499
      8d1c6bb6
  8. Jul 03, 2018
  9. Jun 21, 2018
  10. May 03, 2018
    • Joshua Colp's avatar
      stream: Make the topology a reference counted object. · 7528b86c
      Joshua Colp authored
      The stream topology has no lock of its own resulting in
      another lock protecting it in some way (for example the
      channel lock). If multiple channels are being juggled at
      the same time this can be problematic. This change makes
      the topology a reference counted object instead which
      guarantees it will remain valid even without the channel
      lock being held.
      
      Change-Id: I4f4d3dd856a033ed55fe218c3a4fab364afedb03
      7528b86c
  11. Apr 20, 2018
    • Joshua Colp's avatar
      bridge_softmix: Fix sporadic incorrect video stream mapping. · de9c0ede
      Joshua Colp authored
      When an externally initiated renegotiation occurred it was
      possible for video streams to be incorrectly remapped,
      resulting in no video flowing to some receivers.
      
      This change ensures that only the video source sets up
      mappings and also that removed streams do not have mappings
      set up.
      
      Change-Id: Iab05f2254df3606670774844bb0935f833d3a9b0
      de9c0ede
    • Joshua Colp's avatar
      bridge_softmix: Fix some REMB bugs. · 5712a0ae
      Joshua Colp authored
      This change fixes a bug where a REMB collector may be
      freed twice, and also tweaks REMB combining such that if
      there is no bitrate from anyone (or there are no sources)
      we report 0 instead of using an old bitrate.
      
      ASTERISK-27804
      
      Change-Id: Ia9dc9c150043890ee7ff85e9cdec007f1a77fcfd
      5712a0ae
    • Alexander Traud's avatar
      BuildSystem: Add DragonFly BSD. · efe40ff6
      Alexander Traud authored
      ASTERISK-27820
      
      Change-Id: I310896143e94d65da1c2be3bb448204a8b86d557
      efe40ff6
  12. Apr 17, 2018
    • Joshua Colp's avatar
      bridge_softmix / app_confbridge: Add support for REMB combining. · 8de3fa2b
      Joshua Colp authored
      This change adds the ability for multiple REMB reports in
      bridge_softmix to be combined according to a configured
      behavior into a single report. This single report is sent
      back to the sender of video, which adjusts the encoding bitrate
      to be at or below the bitrate of the report. The available
      behaviors are: lowest, highest, and average. Lowest uses the
      lowest received bitrate. Highest uses the highest received
      bitrate. Average goes through the received bitrates adding
      them to the previous average and creates a new average.
      
      Other behaviors can be added in the future and the existing
      average one may be adjusted, but this provides the foundation
      to do so.
      
      Support for configuring which behavior to use has been
      added to app_confbridge.
      
      ASTERISK-27804
      
      Change-Id: I9eafe4e7c1f72d67074a8d6acb26bfcf19322b66
      8de3fa2b
    • George Joseph's avatar
      bridge_softmix: Forward TEXT frames · 4fb7967c
      George Joseph authored
      Core bridging and, more specifically, bridge_softmix have been
      enhanced to relay received frames of type TEXT or TEXT_DATA to all
      participants in a softmix bridge.  res_pjsip_messaging and
      chan_pjsip have been enhanced to take advantage of this so when
      res_pjsip_messaging receives an in-dialog MESSAGE message from a
      user in a conference call, it's relayed to all other participants
      in the call.
      
      res_pjsip_messaging already queues TEXT frames to the channel when
      it receives an in-dialog MESSAGE from an endpoint and chan_pjsip
      will send an MESSAGE when it gets a TEXT frame.  On a normal
      point-to-point call, the frames are forwarded between the two
      correctly.  bridge_softmix was not though so messages weren't
      getting forwarded to conference bridge participants.  Even if they
      were, the bridging code had no way to tell the participants who
      sent the message so it would look like it came from the bridge
      itself.
      
      * The TEXT frame type doesn't allow storage of any meta data, such
      as sender, on the frame so a new TEXT_DATA frame type was added that
      uses the new ast_msg_data structure as its payload.  A channel
      driver can queue a frame of that type when it receives a message
      from outside.  A channel driver can use it for sending messages
      by implementing the new send_text_data channel tech callback and
      setting the new AST_CHAN_TP_SEND_TEXT_DATA flag in its tech
      properties.  If set, the bridging/channel core will use it instead
      of the original send_text callback and it will get the ast_msg_data
      structure. Channel drivers aren't required to implement this.  Even
      if a TEXT_DATA enabled driver uses it for incoming messages, an
      outgoing channel driver that doesn't will still have it's send_text
      callback called with only the message text just as before.
      
      * res_pjsip_messaging now creates a TEXT_DATA frame for incoming
      in-dialog messages and sets the "from" to the display name in the
      "From" header, or if that's empty, the caller id name from the
      channel.  This allows the chat client user to set a friendly name
      for the chat.
      
      * bridge_softmix now forwards TEXT and TEXT_DATA frames to all
      participants (except the sender).
      
      * A new function "ast_sendtext_data" was added to channel which
      takes an ast_msg_data structure and calls a channel's
      send_text_data callback, or if that's not defined, the original
      send_text callback.
      
      * bridge_channel now calls ast_sendtext_data for TEXT_DATA frame
      types and ast_sendtext for TEXT frame types.
      
      * chan_pjsip now uses the "from" name in the ast_msg_data structure
      (if it exists) to set the "From" header display name on outgoing text
      messages.
      
      Change-Id: Idacf5900bfd5f22ab8cd235aa56dfad090d18489
      4fb7967c
  13. Mar 20, 2018
    • Kevin Harwell's avatar
      bridge_softmix: Clear "talking" when a channel is put on hold · cf73a420
      Kevin Harwell authored
      This patch clears the talking flag from the channel (if already set), and
      notifies listeners when that channel is put on hold. Note however, if the
      endpoint continues to send audio frames and these are received by the bridge
      then that channel will be put back into a "talking" state even though they
      are on hold.
      
      ASTERISK-27755 #close
      
      Change-Id: I930e16c4662810f9f02043d69062f88173c5e2ef
      cf73a420
  14. Feb 21, 2018
    • Richard Mudgett's avatar
      bridge_simple.c: Fix stream topology handling. · 39f73340
      Richard Mudgett authored
      The handling of stream topologies was not protected by channel locks in
      simple_bridge_request_stream_topology_change().
      
      * Fixed topology handling to be protected by channel locks where needed in
      simple_bridge_request_stream_topology_change().
      
      ASTERISK-27692
      
      Change-Id: Ica5d78a6c7ecf4f0b95fb16de28d3889b32c4776
      39f73340
  15. Jan 31, 2018
    • Richard Mudgett's avatar
      bridge_softmix.c: Report not talking immediately when muted. · 1ccac0be
      Richard Mudgett authored
      Currently in app_confbridge if someone mutes a channel while that channel
      is talking, the talk detection code is suspended while the channel is
      muted.  As far an an external observer is concerned, the muted channel's
      talk status is still "talking" even though the channel is not contributing
      audio to the conference bridge.  When the channel is later unmuted, it
      takes the usual 'dsp_silence_threshold' option time to clear the talking
      status even though the channel may have stopped talking while the channel
      was muted.
      
      * In bridge_softmix.c, clear the talking status and report talking stopped
      if the channel was talking when the channel is muted.  When the channel is
      unmuted and the channel is still talking then report the channel as
      talking since it is contributing audio to the bridge again.
      
      ASTERISK-27647
      
      Change-Id: Ie4fdbc05a0bc7343c2972bab012e2567917b3d4e
      1ccac0be
    • Richard Mudgett's avatar
      app_confbridge: Update dsp_silence_threshold and dsp_talking_threshold docs. · b9024197
      Richard Mudgett authored
      The dsp_talking_threshold does not represent time in milliseconds.  It
      represents the average magnitude per sample in the audio packets.  This is
      what the DSP uses to determine if a packet is silence or talking/noise.
      
      Change-Id: If6f939c100eb92a5ac6c21236559018eeaf58443
      b9024197
  16. Jan 22, 2018
    • Corey Farrell's avatar
      Add missing OPTIONAL_API and ARI dependences. · 679fa5fb
      Corey Farrell authored
      I've audited all modules that include any header which includes
      asterisk/optional_api.h.  All modules which use OPTIONAL_API now declare
      those dependencies in AST_MODULE_INFO using requires or optional_modules
      as appropriate.
      
      In addition ARI dependency declarations have been reworked.  Instead of
      declaring additional required modules in res/ari/resource_*.c we now add
      them to an optional array "requiresModules" in api-docs for each module.
      This allows the AST_MODULE_INFO dependencies to include those missing
      modules.
      
      Change-Id: Ia0c70571f5566784f63605e78e1ceccb4f79c606
      679fa5fb
  17. Jan 09, 2018
    • Corey Farrell's avatar
      bridge_softmix: Fix sfu_append_source_streams test. · d46cbe78
      Corey Farrell authored
      * validate_stream: zero result from ast_format_cap_identical indicates
        they are not identical, rather than non-zero indicating an error.
      * validate_original_streams: use num_streams instead of
        ARRAY_LEN(params).
      * Fix declaration of alice_dest_stream and bob_dest_stream.
      
      Change-Id: I6b1dd8bed10439d3c7406f033eb1896b6c419147
      d46cbe78
  18. Jan 06, 2018
  19. Dec 28, 2017
    • Richard Mudgett's avatar
      bridge_native_rtp.c: Fix reentrancy framehook crash. · fa36f9c0
      Richard Mudgett authored
      If two channels enter different native rtp bridges at the same time it is
      possible that the framehook interface data pointer can be corrupted
      because the struct variable was declared static.
      
      * Fixed the reentrancy corruption by changing the framehook interface
      struct static variable to a stack local variable.
      
      * Moved the hook.data assignment outside of the channel lock.  It did not
      need the lock's protection.  It probably was giving a false sense of
      security.
      
      The testsuite
      channels/pjsip/basic_calls/two_parties/nominal/alice_initiated/bob_hangs_up
      test caught this with MALLOC_DEBUG and DO_CRASH enabled.
      
      Change-Id: If9e35b97d19209b0f984941c1d8eb5f7c55eea91
      fa36f9c0
  20. Dec 22, 2017
  21. Dec 19, 2017
  22. Nov 08, 2017
  23. Nov 06, 2017
    • Richard Mudgett's avatar
      Fix ast_(v)asprintf() malloc failure usage conditions. · ee08f10d
      Richard Mudgett authored
      When (v)asprintf() fails, the state of the allocated buffer is undefined.
      The library had better not leave an allocated buffer as a result or no one
      will know to free it.  The most likely way it can return failure is for an
      allocation failure.  If the printf conversion fails then you actually have
      a threading problem which is much worse because another thread modified
      the parameter values.
      
      * Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL
      on failure.  That is much more useful than either an uninitialized pointer
      or a pointer that has already been freed.  Many uses won't have to check
      for failure to ensure that the buffer won't be double freed or prevent an
      attempt to free an uninitialized pointer.
      
      * stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by
      ast_asprintf().
      
      * ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to
      the wrong thing which is now not needed even if assigning to the right
      thing.
      
      Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
      ee08f10d
  24. Nov 02, 2017
  25. Oct 17, 2017
    • Joshua Colp's avatar
      bridge_softmix: Reduce topology cloning and improve renegotiation. · 5d8c5179
      Joshua Colp authored
      As channels join and leave an SFU the bridge_softmix module
      needs to renegotiate to add and remove their streams from
      the other participants. Previously this was done by constructing
      the ideal stream topology every time but in the case of leave
      this was incomplete.
      
      This change makes it so bridge_softmix keeps an ideal stream
      topology for each channel and uses it when making changes. This
      ensures that when we request a renegotiation we are always
      certain that we are aiming for the best stream topology
      possible. In the case of a channel leaving this ensures that
      we try to have an existing participant fill their place if
      a participant has a fixed limit on the maximum number of video
      streams they allow.
      
      ASTERISK-27354
      
      Change-Id: I58070f421ddeadd2844a33b869b052630cf2e514
      5d8c5179
  26. Oct 13, 2017
    • Joshua Colp's avatar
      bridge_simple: Improve renegotiation success rate. · 7d51a79b
      Joshua Colp authored
      When making channels compatible the bridge_simple module
      will renegotiate one to better match the other. Some
      endpoints incorrectly terminate the call if this process
      fails.
      
      To better handle this scenario the audio streams present
      on the new requested topology will include any existing
      negotiated formats that happen to exist on the first
      valid audio stream. This ensures formats are persent that
      are known to be acceptable to the remote endpoint.
      
      ASTERISK-27259
      
      Change-Id: I8fc0cc03e8bcfd0be8302f13b9f32d8268977f43
      7d51a79b
  27. Sep 21, 2017
    • Joshua Colp's avatar
      bridge: Change participant SFU streams when source streams change. · f2985e31
      Joshua Colp authored
      Some endpoints do not like a stream being reused for a new
      media stream. The frame/jitterbuffer can rely on underlying
      attributes of the media stream in order to order the packets.
      When a new stream takes its place without any notice the
      buffer can get confused and the media ends up getting dropped.
      
      This change uses the SSRC change to determine that a new source
      is reusing an existing stream and then bridge_softmix renegotiates
      each participant such that they see a new media stream. This
      causes the frame/jitterbuffer to start fresh and work as expected.
      
      ASTERISK-27277
      
      Change-Id: I30ccbdba16ca073d7f31e0e59ab778c153afae07
      f2985e31
  28. Sep 20, 2017
    • Jean Aunis's avatar
      bridge : Fix one-way direct-media when early bridging with native_rtp · 6b7d5671
      Jean Aunis authored
      When two channels were early bridged in a native_rtp bridge, the RTP description
      on one side was not updated when the other side answered.
      This patch forbids non-answered channels to enter a native_rtp bridge, and
      triggers a bridge reconfiguration when an ANSWER frame is received.
      
      ASTERISK-27257
      
      Change-Id: If1aaee1b4ed9658a1aa91ab715ee0a6413b878df
      6b7d5671
  29. Aug 29, 2017
    • Richard Mudgett's avatar
      bridge_native_rtp.c: Fixup native_rtp_framehook() · 4650fc47
      Richard Mudgett authored
      * Fix framehook to test frame type for control frame.
      * Made framehook exit early if frame type is not a control frame.
      * Eliminated RAII_VAR in framehook.
      * Use switch instead of else-if ladder for control frame handling.
      
      Change-Id: Ia555fc3600bd85470e3c0141147dbe3ad07c1d18
      4650fc47
  30. Aug 22, 2017
  31. Aug 06, 2017
    • Joshua Colp's avatar
      bridge: Fix stream topology/participant locking and video misrouting. · 88c65f7c
      Joshua Colp authored
      This change fixes a few locking issues and some video misrouting.
      
      1. When accessing the stream topology of a channel the channel lock
      must be held to guarantee the topology remains valid.
      
      2. When a channel was joined to a bridge the bridge specific
      implementation for stream mapping was not invoked, causing video
      to be misrouted for a brief period of time.
      
      ASTERISK-27182
      
      Change-Id: I5d2f779248b84d41c5bb3896bf22ba324b336b03
      88c65f7c
Loading