Skip to content
Snippets Groups Projects
  1. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  2. Apr 10, 2015
    • Richard Mudgett's avatar
      chan_pjsip/res_pjsip/bridge_softmix/core: Improve translation path choices. · c499cabf
      Richard Mudgett authored
      With this patch, chan_pjsip/res_pjsip now sets the native formats to the
      codecs negotiated by a call.
      
      * The changes in chan_pjsip.c and res_pjsip_sdp_rtp.c set the native
      formats to include all the negotiated audio codecs instead of only the
      initial preferred audio codec and later the currently received audio
      codec.
      
      * The audio frame handling in channel.c:ast_read() is more streamlined and
      will automatically adjust to changes in received frame formats.  The new
      policy is to remove translation and pass the new frame format to the
      receiver except if the translation was to a signed linear format.  A more
      long winded version is commented in ast_read() along with some caveats.
      
      * The audio frame handling in channel.c:ast_write() is more streamlined
      and will automatically adjust any needed translation to changes in the
      frame formats sent.  Frame formats sent can change for many reasons such
      as a recording is being played back or the bridged peer changed the format
      it sends.  Since it is a normal expectation that sent formats can change,
      the codec mismatch warning message is demoted to a debug message.
      
      * Removed the short circuit check in
      channel.c:ast_channel_make_compatible_helper().  Two party bridges need to
      make channels compatible with each other.  However, transfers and moving
      channels among bridges can result in otherwise compatible channels having
      sub-optimal translation paths if the make compatible check is short
      circuited.  A result of forcing the reevaluation of channel compatibility
      is that the asterisk.conf:transcode_via_slin and codecs.conf:genericplc
      options take effect consistently now.  It is unfortunate that these two
      options are enabled by default and negate some of the benefits to the
      changes in channel.c:ast_read() by forcing translation through signed
      linear on a two party bridge.
      
      * Improved the softmix bridge technology to better control the translation
      of frames to the bridge.  All of the incoming translation is now normally
      handled by ast_read() instead of splitting any translation steps between
      ast_read() and the slin factory.  If any frame comes in with an unexpected
      format then the translation path in ast_read() is updated for the next
      frame and the slin factory handles the current frame translation.
      
      This is the final patch in a series of patches aimed at improving
      translation path choices.  The other patches are on the following reviews:
      https://reviewboard.asterisk.org/r/4600/
      https://reviewboard.asterisk.org/r/4605/
      
      ASTERISK-24841 #close
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/4609/
      ........
      
      Merged revisions 434671 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c499cabf
    • Richard Mudgett's avatar
      bridge_softmix.c,channel.c: Minor code simplification and cleanup. · 6f1a7fe0
      Richard Mudgett authored
      * Made code easier to follow in bridge_softmix.c:analyse_softmix_stats()
      and made some debug messages more helpful.
      
      * Made some debug and warning messages more helpful in
      channel.c:set_format().
      
      Review: https://reviewboard.asterisk.org/r/4607/
      ........
      
      Merged revisions 434617 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      6f1a7fe0
  3. Apr 09, 2015
  4. Apr 08, 2015
    • Richard Mudgett's avatar
      Bridging: Eliminate the unnecessary make channel compatible with bridge operation. · 09df34d8
      Richard Mudgett authored
      When a channel enters the bridging system it is first made compatible with
      the bridge and then the bridge technology makes the channel compatible
      with the technology.  For all but the DAHDI native and softmix bridge
      technologies the make channel compatible with the bridge step is an
      effective noop because the other technologies allow all audio formats.
      For the DAHDI native bridge technology it doesn't matter because it is not
      an initial bridge technology and chan_dahdi allows only one native format
      per channel.  For the softmix bridge technology, it is a noop at best and
      harmful at worst because the wrong translation path could be setup if the
      channel's native formats allow more than one audio format.
      
      This is an intermediate patch for a series of patches aimed at improving
      translation path choices.
      
      * Removed code dealing with the unnecessary step of making the channel
      compatible with the bridge.
      
      ASTERISK-24841
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/4600/
      ........
      
      Merged revisions 434424 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      09df34d8
  5. Feb 24, 2015
  6. Feb 11, 2015
  7. Jan 06, 2015
  8. Nov 09, 2014
    • Matthew Jordan's avatar
      bridge_native_rtp: Fix T.38 issues with remote bridges · 9a1ab5d5
      Matthew Jordan authored
      After r425242 the fax/sip/directmedia_reinvite_t38 test started failing due to
      the surviving channel not being re-INVITEd back from T.38 to audio. This patch
      fixes that bug - a deeper explanation of what happened follows.
      
      When two RTP channels are in a native bridge, the bridging layer will
      investigate each via the get_rtp_info glue callback. This callback returns the
      native bridge preference of the channel *at that moment in time* (that part is
      key). At different points during the bridging, the native bridging layer will
      inform the RTP capable channels of the status of the bridge via the update_peer
      glue callback.
      
      In a T.38 scenario with audio direct media, the sequence of events will often
      look like the following:
       * SIP/A and SIP/B both have audio and enter a native bridge.
       * Asterisk re-INVITEs audio between SIP/A and SIP/B directly (via an
         update_peer callback).
       * SIP/A sends a re-INVITE to T.38, which causes Asterisk to send a re-INVITE
         to T.38 to SIP/B. Assuming everyone 200 OKs the process, the UDPTL stack
         receives UDPTL packets in Asterisk from both endpoints. From the perspective
         of the channels, we are now in a local bridge for T.38, even though we are
         technically still in a remote bridge in bridge_native_rtp. (YAY!)
       * When one side hangs up, bridge_native_rtp is told to stop bridging. It then
         re-evaluates the channels and asks them how they are bridged - and since
         T.38 is enabled, they reply with a Local bridge (which is correct), but is
         wrong because the audio portion is still technically in a remote bridge.
       * Asterisk releases the surviving channel, whose audio is *not* re-INVITED
         back to Asterisk as bridge_native_rtp incorrectly assumes that it was in a
         local bridge.
      
      Ironically, prior to r425242, this used to work mostly due to a fluke in the
      bridging layer.
      
      The purpose of the get_rtp_info callback shouldn't be modified: it should tell
      the bridging layer what kind of bridge the channel prefers at that moment in
      time. If you have T.38 enabled, that *must* be a local bridge, as the UDPTPL
      stack must be in the media path. As such, this patch does not modify that
      part of the code.
      
      However, we have to tell the channels to re-evaluate themselves when they come
      out of a native bridge, since we can no longer trust the get_rtp_info callbacks
      when the native bridge is being stopped. Something else may have changed in the
      channels, and they may now be lying to us. As such, this patch makes it so that
      we unilaterally tell the channels that they are no longer bridged via the
      update_peer callback. This is actually what the channels expect anyway: code in
      both chan_sip and chan_pjsip's callbacks look at the T.38 state and - if they
      were in T.38 - send a re-INVITE to get the audio back to Asterisk.
      
      Review: https://reviewboard.asterisk.org/r/4157/
      ........
      
      Merged revisions 427582 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 427583 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9a1ab5d5
  9. Oct 28, 2014
  10. Oct 17, 2014
  11. Oct 10, 2014
  12. Sep 18, 2014
  13. Jul 20, 2014
  14. Jul 18, 2014
  15. Jun 08, 2014
  16. Jun 01, 2014
  17. May 28, 2014
    • Matthew Jordan's avatar
      Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messages · fb5690ce
      Matthew Jordan authored
      This patch addresses some aesthetic issues in Asterisk. These are all just
      minor tweaks to improve the look of the CLI when used in a variety of
      settings. Specifically:
       * A number of chatty verbose messages were removed or demoted to DEBUG
         messages. Verbose messages with a verbosity level of 5 or higher were -
         if kept as verbose messages - demoted to level 4. Several messages
         that were emitted at verbose level 3 were demoted to 4, as announcement
         of dialplan applications being executed occur at level 3 (and so the
         effects of those applications should generally be less).
       * Some verbose messages that only appear when their respective 'debug'
         options are enabled were bumped up to always be displayed.
       * Prefix/timestamping of verbose messages were moved to the verboser
         handlers. This was done to prevent duplication of prefixes when the
         timestamp option (-T) is used with the CLI.
       * Verbose magic is removed from messages before being emitted to
         non-verboser handlers. This prevents the magic in multi-line verbose
         messages (such as SIP debug traces or the output of DumpChan) from
         being written to files.
       * _Slightly_ better support for the "light background" option (-W) was
         added. This includes using ast_term_quit in the output of XML
         documentation help, as well as changing the "Asterisk Ready" prompt to
         bright green on the default background (which stands a better chance of
         being displayed properly than bright white).
      
      Review: https://reviewboard.asterisk.org/r/3547/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fb5690ce
  18. May 19, 2014
  19. May 18, 2014
    • Matthew Jordan's avatar
      bridge_native_rtp/bridge_channel: Fix direct media issues due to frame hook · 17ff4d92
      Matthew Jordan authored
      This patch fixes issues with direct media bridges that occur after a blind
      transfer. These issues were caught by the (currently failing)
      pjsip/transfers/blind_transfer/caller_direct_media test.
      
      The test currently fails primarily for two reasons:
      (1) When Bob and Charlie (the transfer target and the transfer destination)
          enter a bridge together, the framehook remains on the transfer target
          channel until both channels are in the bridge. As it consumes voice frames,
          the initial bridge type is a simple bridge. The framehook is removed when
          both channels are in the bridge; however, this does not currently cause the
          bridging framework to re-evaluate the bridge. This patch adds a
          AST_SOFTHANGUP_UNBRIDGE poke to the transfer target channel when a
          framehook is removed so the bridge can re-evaluate itself.
      
      (2) When a channel leaves a native RTP bridge, it may be leaving due to being
          hung up. Sending a re-INVITE to a channel that is about to be hung up is
          not nice - in fact, there's a good chance we'll send the BYE request before
          the channel has had a chance to send back a 200 OK. To be somewhat nicer,
          this patch adds a function to channel.h that allows the bridging framework
          to query for exactly why a channel is leaving a bridge via the channel's
          soft hangup flags. This allows it to only send the re-INVITE if there's a
          chance the channel will survive the native bridging experience.
      
      Review: https://reviewboard.asterisk.org/r/3535/
      ........
      
      Merged revisions 414122 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      17ff4d92
  20. May 11, 2014
  21. May 10, 2014
  22. May 09, 2014
  23. Apr 15, 2014
  24. Mar 17, 2014
    • Mark Michelson's avatar
      Fix stuck channel in ARI through the introduction of synchronous bridge actions. · d44aefee
      Mark Michelson authored
      Playing back a file to a channel in an ARI bridge would attempt to wait until
      the playback concluded before returning. The method used involved signaling the
      waiting thread in the ARI custom playback function.
      
      The problem with this is that there were some corner cases that were not accounted for:
      * If a bridge channel could not be found, then we never would attempt the playback but
        would still attempt to wait for the playback to complete.
      * If the bridge playfile action failed to queue, we would still attempt to wait for the
        playback to complete.
      * If the bridge playfile action were queued but some circumstance caused the playback
        not to occur (the bridge dies, the channel is removed from the bridge), then we would
        never be notified.
      
      The solution to this is to move the waiting logic into the bridge code. A new bridge
      API function is added to queue a synchronous action on a bridge. The waiting thread
      is notified when the queued frame has been freed, either due to an error occurring
      or due to successful playback. As a failsafe, the waiting thread has a 10 minute
      timeout just in case there is a frame leak somewhere.
      
      Review: https://reviewboard.asterisk.org/r/3338
      ........
      
      Merged revisions 410673 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d44aefee
  25. Mar 05, 2014
  26. Dec 13, 2013
  27. Oct 29, 2013
  28. Oct 11, 2013
    • Richard Mudgett's avatar
      Softmix: Fix crash when switching from softmix to another bridge technology. · 0ddcee5a
      Richard Mudgett authored
      The crash is caused by a race condition when switching between native RTP
      and softmix bridging technologies.  In this situation, the bridging
      technology is switched from native RTP to softmix, and then back to native
      RTP fast enough that the softmix private data gets destroyed before the
      softmix mixing thread gets started.
      
      Thanks to Kinsey Moore for the crash analysis.
      
      * Fix race condition when starting the softmix mixing thread and switching
      to another bridge technology.
      
      (closes issue ASTERISK-22678)
      Reported by: John Bigelow
      Patches:
            jira_asterisk_22678_v12.patch (license #5621) patch uploaded by rmudgett
      Tested by: John Bigelow
      ........
      
      Merged revisions 400849 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0ddcee5a
  29. Oct 03, 2013
  30. Sep 27, 2013
  31. Sep 18, 2013
  32. Aug 23, 2013
  33. Aug 22, 2013
  34. Aug 21, 2013
    • Richard Mudgett's avatar
      Fix several interrelated issues dealing with the holding bridge technology. · d213dfa3
      Richard Mudgett authored
      * Added an option flags parameter to interval hooks.  Interval hooks now
      can specify if the callback will affect the media path or not.
      
      * Added an option flags parameter to the bridge action custom callback.
      The action callback now can specify if the callback will affect the media
      path or not.
      
      * Made the holding bridge technology reexamine the participant idle mode
      option whenever the entertainment is restarted.
      
      * Fixed app_agent_pool waiting agents needlessly starting and stopping MOH
      every second by specifying the heartbeat interval hook as not affecting
      the media path.
      
      * Fixed app_agent_pool agent alert from restarting the MOH after the alert
      beep.  The agent entertainment is now changed from MOH to silence after
      the alert beep.
      
      * Fixed holding bridge technology to defer starting the entertainment.  It
      was previously a mixture of immediate and deferred.
      
      * Fixed holding bridge technology to immediately stop the entertainment.
      It was previously a mixture of immediate and deferred.  If the channel
      left the bridging system, any deferred stopping was discarded before
      taking effect.
      
      * Miscellaneous holding bridge technology rework coding improvements.
      
      Review: https://reviewboard.asterisk.org/r/2761/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d213dfa3
  35. Aug 15, 2013
Loading