Skip to content
Snippets Groups Projects
  1. Nov 26, 2017
    • Alexander Traud's avatar
      translate: Transcode siren14, speex32, silk24, and silk12 via slin16. · 58115e9c
      Alexander Traud authored
      When a format has no pre-recorded sound files, Asterisk has to transcode between
      formats. For this, Asterisk has a fixed translation table. If the pre-recorded
      sound files are not available in the same sample rate, Asterisk has not only to
      transcode but also to resample.
      
      Asterisk has pre-recorded files for SLN (8000 kHz) and SLN16 (16000 kHz).
      However before this change, Asterisk did not take the sample rate into account,
      because the translation paths to SLN and SLN16 got the same score/weight in the
      table. Consequently, you might have got narrow-band audio with siren14, speex32,
      silk24, and silk12 although those are (ultra) wide-band audio codecs.
      
      With this change, the distance in sample-rates is taken into account. Now on the
      Command-Line interface (CLI) 'core show channels', you should see:
      (slin@16000)->(slin@32000)->(speex@32000).
      
      ASTERISK-23735
      Reported by: Richard Kenner
      
      Change-Id: I9448295c1978be26f8633b6066395e7bbbe2e213
      58115e9c
  2. Nov 25, 2017
  3. Apr 26, 2017
    • Joshua Colp's avatar
      frame: Better handle interpolated frames. · 985a5fd7
      Joshua Colp authored
      Interpolated frames are frames which contain a number of
      samples but have no actual data. Audiohooks did not
      handle this case when translating an incoming frame into
      signed linear. It assumed that a frame would always contain
      media when it may not. If this occurs audiohooks will now
      immediately return and not act on the frame.
      
      As well for users of ast_trans_frameout the function has
      been changed to be a bit more sane and ensure that the data
      pointer on a frame is set to NULL if no data is actually
      on the frame. This allows the various spots in Asterisk that
      check for an interpolated frame based on the presence of a
      data pointer to work as expected.
      
      ASTERISK-26926
      
      Change-Id: I7fa22f631fa28d540722ed789ce28e84c7f8662b
      985a5fd7
  4. Jan 23, 2017
    • Lorenzo Miniero's avatar
      media: Add experimental support for RTCP feedback. · 1061539b
      Lorenzo Miniero authored
      This change adds experimental support for providing RTCP
      feedback information to codec modules so they can dynamically
      change themselves based on conditions.
      
      ASTERISK-26584
      
      Change-Id: Ifd6aa77fb4a7ff546c6025900fc2baf332c31857
      1061539b
  5. Oct 27, 2016
    • Corey Farrell's avatar
      Remove ASTERISK_REGISTER_FILE. · a6e5bae3
      Corey Farrell authored
      ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
      all traces of it.
      
      Previously exported symbols removed:
      * __ast_register_file
      * __ast_unregister_file
      * ast_complete_source_filename
      
      This also removes the mtx_prof static variable that was declared when
      MTX_PROFILE was enabled.  This variable was only used in lock.c so it
      is now initialized in that file only.
      
      ASTERISK-26480 #close
      
      Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
      a6e5bae3
  6. Oct 09, 2016
  7. Jul 17, 2016
  8. Jul 13, 2016
    • Kevin Harwell's avatar
      translate: explicit format destination not properly set · 63ac4c94
      Kevin Harwell authored
      If the destination format's name differed from the codec name then the
      translator's explict_dst field would be improperly set. In some circumstances
      it would end up setting it to a newly created format that has the same name
      as the codec when it actually needed to be the given destination codec.
      
      This could cause the translation path to use the wrong format. For instance,
      if an endpoint had specified 'myulaw' as a format the translator could end up
      using a 'ulaw' format (with whatever/default settings) instead. If the format
      attribute settings differed between the two then there may unexpected results
      during processing.
      
      This patch removes the name check when building the translation path. This
      should make it always set the translator's explicit_dst to the given destination
      format as long as the sample rate and types match.
      
      Change-Id: Iaf8a03831d68e657d89569d54b505074efbefab5
      63ac4c94
  9. Jun 10, 2016
  10. Jun 05, 2016
  11. Dec 08, 2015
  12. Nov 19, 2015
    • Alexander Traud's avatar
      translate: Provide translation modules the result of SDP negotiation. · 8ccb1d2b
      Alexander Traud authored
      Previously, a trancoding module did not have access to the joint but cached
      format. Therefore, the module did not have access to the attributes negotiated
      via SDP (line fmtp). Now, a translation module receives the joint format.
      
      ASTERISK-25545 #close
      
      Change-Id: Id6878a989b50573298dab115d3371ea369e1a718
      8ccb1d2b
  13. Sep 17, 2015
    • Alexander Traud's avatar
      translate: Fix transcoding while different in frame size. · 077adf48
      Alexander Traud authored
      When Asterisk translates between codecs, each with a different frame size (for
      example between iLBC 30 and Speex-WB), too large frames were created by
      ast_trans_frameout. Now, ast_trans_frameout is called with the correct frame
      length, creating several frames when necessary. Affects all transcoding modules
      which used ast_trans_frameout: GSM, iLBC, LPC10, and Speex.
      
      ASTERISK-25353 #close
      
      Change-Id: I2e229569d73191d66a4e43fef35432db24000212
      077adf48
  14. 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
  15. Apr 10, 2015
    • Richard Mudgett's avatar
      translate.c: Only select audio codecs to determine the best translation choice. · 0b805cb8
      Richard Mudgett authored
      Given a source capability of h264 and ulaw, a destination capability of
      h264 and g722 then ast_translator_best_choice() would pick h264 as the
      best choice even though h264 is a video codec and Asterisk only supports
      translation of audio codecs.  When the audio starts flowing, there are
      warnings about a codec mismatch when the channel tries to write a frame to
      the peer.
      
      * Made ast_translator_best_choice() only select audio codecs.
      
      * Restore a check in channel.c:set_format() lost after v1.8 to prevent
      trying to set a non-audio codec.
      
      This is an intermediate patch for a series of patches aimed at improving
      translation path choices for ASTERISK-24841.
      
      This patch is a complete enough fix for ASTERISK-21777 as the v11 version
      of ast_translator_best_choice() does the same thing.  However, chan_sip.c
      still somehow tries to call ast_codec_choose() which then calls
      ast_best_codec() with a capability set that doesn't contain any audio
      formats for the incoming call.  The remaining warning message seems to be
      a benign transient.
      
      ASTERISK-21777 #close
      Reported by: Nick Ruggles
      
      ASTERISK-24380 #close
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/4605/
      ........
      
      Merged revisions 434614 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 434615 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0b805cb8
  16. Mar 04, 2015
    • Matthew Jordan's avatar
      translate: Prevent invalid memory accesses on fast shutdown · 41ba8fd7
      Matthew Jordan authored
      When a 'core restart now' or 'core stop now' is executed and a channel is
      currently in a media operation, the translator matrix can be destroyed while a
      channel is currently blocked on getting the best translation choice
      (see ast_translator_best_choice). When the channel gets the mutex, the
      translation matrix now has invalid memory, and Asterisk crashes.
      
      This patch does two things:
      (1) We now only clean up the translation matrix on a graceful shutdown. In that
          case, there are no channels, and so there is no risk of this occurring.
      (2) We also now set the __matrix and __indextable to NULL. In some initial
          backtraces when this occurred, it looked as if there was a memory corruption
          occurring, and it wasn't until we determined that something had restarted
          Asterisk that the issue became clear. By setting these to NULL on shutdown,
          it becomes a bit easier to determine why a crash is occurring.
      
      Note that we could litter the code with NULL checks on the __matrix, but the
      act of making the translation matrix cleaned up on shutdown should preclude
      this issue from occurring in the first place, and this part of the code needs
      to be as fast as possible.
      
      Review: https://reviewboard.asterisk.org/r/4457/
      ........
      
      Merged revisions 432453 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432455 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      41ba8fd7
  17. Oct 21, 2014
  18. Sep 18, 2014
  19. Jul 20, 2014
  20. May 09, 2014
  21. Nov 22, 2013
  22. Oct 29, 2013
    • Matthew Jordan's avatar
      Remove some spammy debug messages; improve clarity of others · 076b29dd
      Matthew Jordan authored
      Debug messages aren't free. Even when the debug level is sufficiently low such
      that the messages are never evaluated, there is a cost to having to parse
      Asterisk logs that contain debug messages that (a) fail to convey sufficient
      information or (b) occur so frequently as to be next to meaningless. Based on
      having to stare at lots of DEBUG messages, this patch makes the following
      changes:
      
      * channel.c: When copying variables from a parent channel to a child channel,
        specify the channels involved. Do not log anything for a variable that is not
        inherited; the fact that it doesn't have an _ or __ already signifies that it
        won't be inherited.
      * pbx.c: Specify what function evaluation has occurred that created the result.
      * translate.c: Bump up the translator path messages to 10. I've never once had
        to use these debug messages, and for each format that is registered (on
        startup) and unregistered (on shutdown) the entire f^2 matrix is logged out.
        For short tests in the Asterisk Test Suite, this should make finding the
        actual test much easier.
      * xmldoc.c: The debug message that 'blah' is not found in the tree is expected.
        Often, description elements - which are not required - are not provided.
        This debug message adds no additional value, as it is not indicative of an
        error or helpful in debugging which element did not contain a 'blah' element
        as a child. If an element is supposed to contain a child element, then that
        XML tree should have failed validation in the first place.
      
      Review: https://reviewboard.asterisk.org/r/2966/
      ........
      
      Merged revisions 402150 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 402151 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 402154 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      076b29dd
  23. Oct 23, 2013
  24. Oct 15, 2013
  25. Aug 30, 2013
    • Kevin Harwell's avatar
      Fix various memory leaks · 16b8d0cb
      Kevin Harwell authored
      main/config.c - cleanup cache fie includes
      res/res_security_log.c - unregister logger level
      channesl/chan_sip.c - cleanup io context and notify_types
      main/translator.c - cleanup at shutdown
      main/named_acl.c - cleanup cli commands
      main/indications.c - ast_get_indication_tone() unref default_tone_zone if used
      
      (closes issues ASTERISK-22378)
      Reported by: Corey Farrell
      Patches:
           config_shutdown.patch uploaded by coreyfarrell (license 5909)
           res_security_log.patch uploaded by coreyfarrell (license 5909)
           chan_sip-11.patch uploaded by coreyfarrell (license 5909)
           indications_refleak.patch uploaded by coreyfarrell (license 5909)
           named_acl-cli_unreg-trunk.patch uploaded by coreyfarrell (license 5909)
           translate_shutdown.patch uploaded by coreyfarrell (license 5909)
      
      ........
      
      Merged revisions 398102 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 398103 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 398116 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      16b8d0cb
  26. Jan 01, 2013
  27. Jul 13, 2012
  28. Jun 15, 2012
    • Kevin P. Fleming's avatar
      Multiple revisions 369001-369002 · 166b4e2b
      Kevin P. Fleming authored
      ........
        r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
        
        Add support-level indications to many more source files.
        
        Since we now have tools that scan through the source tree looking for files
        with specific support levels, we need to ensure that every file that is
        a component of a 'core' or 'extended' module (or the main Asterisk binary)
        is explicitly marked with its support level. This patch adds support-level
        indications to many more source files in tree, but avoids adding them to
        third-party libraries that are included in the tree and to source files
        that don't end up involved in Asterisk itself.
      ........
        r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
        
        Add a script to enable finding source files without support-levels defined.
      ........
      
      Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      166b4e2b
  29. Mar 22, 2012
  30. Feb 23, 2011
  31. Feb 22, 2011
    • David Vossel's avatar
      Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd... · d760e81f
      David Vossel authored
      Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
      
      -Functional changes
      1. Dynamic global format list build by codecs defined in codecs.conf
      2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
      3. Negotiation of SILK attributes in chan_sip.
      4. SPEEX 32khz with translation
      5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
         using codec_resample.c
      6. Various changes to RTP code required to properly handle the dynamic format list
         and formats with attributes.
      7. ConfBridge now dynamically jumps to the best possible sample rate.  This allows
         for conferences to take advantage of HD audio (Which sounds awesome)
      8. Audiohooks are no longer limited to 8khz audio, and most effects have been
         updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
      9. codec_resample now uses its own code rather than depending on libresample.
      
      -Organizational changes
      Global format list is moved from frame.c to format.c
      Various format specific functions moved from frame.c to format.c
      
      Review: https://reviewboard.asterisk.org/r/1104/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d760e81f
  32. Feb 03, 2011
  33. Aug 12, 2010
    • David Vossel's avatar
      Merged revisions 282047 via svnmerge from · bbb32fe3
      David Vossel authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r282047 | dvossel | 2010-08-12 15:15:41 -0500 (Thu, 12 Aug 2010) | 35 lines
        
        improved translation paths for wideband codecs
        
        The problem I'm addressing is that Asterisk's current
        method of building the least cost translation paths
        between codecs does not take into account sample rate.
        For instance, it was possible for siren14 (a 32khz codec),
        to contain the a translation path to siren7 (a 16khz
        audio codec) that goes through slin at 8khz.  In this
        case Asterisk takes a 32khz codec, down samples it to
        8khz and then up samples it to 16khz which is terrible
        regardless if it is computationally less expensive.  This
        patch now builds translation paths that give priority to
        maintaining the best possible sample rate before taking
        into consideration computational cost.  This patch also
        adds cli commands to expose what translation paths are
        actually being used.
        
        Changes:
        1. Translation paths will never contain a step that changes
        the sample rate unless absolutely necessary.
        2. When choosing the best codec to make two channels compatible.
        Shared codecs with the highest sample rate are given priority.
        3. A new cli command to show all translation paths available
        for a specific codec 'core show translation paths [codec name]'
        has been added.
        4. 'core show translation' which displays the translation
        matrix now includes the new higher bit audio codecs in the table.
        5. 'core show channel [channel name]'  now displays the
        translation paths if translation is used.
        
        (closes issue #16841)
        Reported by: dvossel
        
        Review: https://reviewboard.asterisk.org/r/842/
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      bbb32fe3
  34. Jul 16, 2010
  35. Jun 03, 2010
  36. Dec 04, 2009
  37. Dec 01, 2009
  38. Nov 04, 2009
  39. Oct 21, 2009
Loading