Skip to content
Snippets Groups Projects
  1. Jul 22, 2015
    • Mark Michelson's avatar
    • Mark Michelson's avatar
      Local channels: Do not block control -1 payloads. · 0b7148e2
      Mark Michelson authored
      Control frames with a -1 payload are used as a special signal to stop
      playtones generators on channels. This indication is sent both by
      app_dial as well as by ast_answer() when a call is answered in case any
      tones were being generated on a calling channel.
      
      This control frame type was made to stop traversing local channel pairs
      as an optimization, because it was thought that it was unnecessary to
      send these indications, and allowing such unnecessary control frames to
      traverse the local channels would cause the local channels to optimize
      away less quickly.
      
      As it turns out, through some special magic dialplan code, it is
      possible to have a tones being played on a non-local channel, and it is
      important for the local channel to convey that the tones should be
      stopped. The result of having tones continue to be played on the
      non-local channel is that the tones play even once the channel has been
      bridged. By not blocking the -1 control frame type, we can ensure that
      this situation does not happen.
      
      ASTERISK-25250 #close
      Reported by Etienne Lessard
      
      Change-Id: I0bcaac3d70b619afdbd0ca8a8dd708f33fd2f815
      0b7148e2
    • Joshua Colp's avatar
      audiohook: Read the correct number of samples based on audiohook format. · e5fe8d40
      Joshua Colp authored
      Due to changes in audiohooks to support different sample rates the
      underlying storage of samples is in the format of the audiohook
      itself and not of the format being requested. This means that if a
      channel is using G722 the samples stored will be at 16kHz. If
      something subsequently reads from the audiohook at a format which
      is not the same sample rate as the audiohook the number of samples
      needs to be adjusted.
      
      Given the following example:
      1. Channel writing into audiohook at 16kHz (as it is using G722).
      2. Chanspy reading from audiohook at 8kHz.
      
      The original code would read 160 samples from the audiohook for
      each 20ms of audio. This is incorrect. Since the audio in the
      audiohook is at 16kHz the actual number needing to be read is 320.
      Failure to read this much would cause the audiohook to reset
      itself constantly as the buffer became full.
      
      This change adjusts the requested number of samples by determining
      the duration of audio requested and then calculating how many
      samples that would be in the audiohook format.
      
      ASTERISK-25247 #close
      
      Change-Id: Ia91ce516121882387a315fd8ee116b118b90653d
      e5fe8d40
  2. Jul 20, 2015
  3. Jul 19, 2015
  4. Jul 17, 2015
  5. Jul 16, 2015
    • Richard Mudgett's avatar
      strings.h: Fix issues with escape string functions. · b34c4528
      Richard Mudgett authored
      Fixes for issues with the ASTERISK-24934 patch.
      
      * Fixed ast_escape_alloc() and ast_escape_c_alloc() if the s parameter is
      an empty string.  If it were an empty string the functions returned NULL
      as if there were a memory allocation failure.  This failure caused the AMI
      VarSet event to not get posted if the new value was an empty string.
      
      * Fixed dest buffer overwrite potential in ast_escape() and
      ast_escape_c().  If the dest buffer size is smaller than the space needed
      by the escaped s parameter string then the dest buffer would be written
      beyond the end by the nul string terminator.  The num parameter was really
      the dest buffer size parameter so I renamed it to size.
      
      * Made nul terminate the dest buffer if the source string parameter s was
      an empty string in ast_escape() and ast_escape_c().
      
      * Updated ast_escape() and ast_escape_c() doxygen function description
      comments to reflect reality.
      
      * Added some more unit test cases to /main/strings/escape to cover the
      empty source string issues.
      
      ASTERISK-25255 #close
      Reported by: Richard Mudgett
      
      Change-Id: Id77fc704600ebcce81615c1200296f74de254104
      b34c4528
    • Richard Mudgett's avatar
      parking_applications.c: Fix ast_verb() line terminator. · 097c15ac
      Richard Mudgett authored
      Change-Id: I8797238c71563e243c48c6145b4f1ae58f91f775
      097c15ac
    • Richard Mudgett's avatar
      res_parking: Fix crash if ATTENDEDTRANSFER set empty before Park. · 8b620c55
      Richard Mudgett authored
      setup_park_common_datastore() was assuming that a non-NULL string returned
      for the ATTENDEDTRANSFER and BLINDTRANSFER channel variables are not empty
      strings.  Things got crashy as a result.
      
      * Made setup_park_common_datastore() treat the channel variable values the
      same whether they are NULL or empty for ATTENDEDTRANSFER and
      BLINDTRANSFER.
      
      ASTERISK-25254 #close
      Reported by: Richard Mudgett
      
      Change-Id: I9a9c174b33f354f35f82cc6b7cea8303adbaf9c2
      8b620c55
    • Richard Mudgett's avatar
      res_pjsip_session.c: Extract sip_session_defer_termination_stop_timer(). · 4af24ec7
      Richard Mudgett authored
      Change-Id: I9e115dee74bd72e06081d0ee73ecdeb886caa5fb
      4af24ec7
    • Richard Mudgett's avatar
      res_pjsip_session.c: Add some helpful comments and minor tweaks. · 71b3bcf5
      Richard Mudgett authored
      Change-Id: I742aeeaf5f760593f323a00fb691affe22e35743
      71b3bcf5
    • Richard Mudgett's avatar
      res_pjsip_session.c: Fix off nominal crash potential in debug message. · 53c91737
      Richard Mudgett authored
      Change-Id: I09928297927ee85f7655289acee3a586816466bc
      53c91737
  6. Jul 15, 2015
  7. Jul 14, 2015
    • Richard Mudgett's avatar
      res_pjsip_session.c: Fix crash on call disconnect. · 1b666549
      Richard Mudgett authored
      The crash fix for ASTERISK-25183 backported some code from master to try
      to make sure that a BYE response is processed by the same serializer used
      by the BYE request.  The identified race condition causing that backport
      was the BYE request code had not finished processing after sending the BYE
      before the BYE response came in for processing under a different thread.
      Unfortunately, there is still a race condition.  Now the race condition is
      between destroying the call session's serializer in
      ast_taskprocessor_unreference() and using ast_taskprocessor_get() to get a
      reference to the serializer for a BYE response.  Even worse, the new race
      condition is a design limitation of the taskprocessor implementation that
      didn't matter in versions before v12.  Back then, taskprocessors were only
      destroyed when a module unloaded.  Now res_pjsip can destroy them when a
      call ends.
      
      However, as noted on the ASTERISK-25183 commit,
      session_inv_on_state_changed() is disassociating the dialog from the
      session when the invite dialog state becomes PJSIP_INV_STATE_DISCONNECTED.
      This is a tad too soon because our BYE request transaction has not
      completed yet.
      
      * Split session_end() that is called by session_inv_on_state_changed() to
      hold off session destruction until the BYE transaction timeout occurs or a
      failed initial INVITE transaction timeout occurs in
      session_inv_on_tsx_state_changed().
      
      ASTERISK-25201 #close
      Reported by: Matt Jordan
      
      Change-Id: Iaf8dc8485fd8392a2a3ee4ad3b7f7f04a0dcc961
      1b666549
    • Benjamin Ford's avatar
      ARI: Added new functionality to reload a single module. · 9d458b83
      Benjamin Ford authored
      An http request can be sent to reload an Asterisk module. If the
      module can not be reloaded or is not already loaded, an error
      response will be returned.
      
      The command "curl -v -u user:pass -X PUT 'http://localhost:8088
      /ari/asterisk/modules/{moduleName}'" (or something similar, based
      on configuration) can be run in the terminal to access this new
      functionality.
      
      For more information, see:
      https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource
      
      * Added new ARI functionality
      * Asterisk modules can be reloaded through http requests
      
      ASTERISK-25173
      
      Change-Id: I289188bcae182b2083bdbd9ebfffd50b62f58ae1
      9d458b83
    • Mark Michelson's avatar
    • Matt Jordan's avatar
Loading