Skip to content
Snippets Groups Projects
  1. Jul 31, 2015
    • Ashley Sanders's avatar
      ARI: Channels added to Stasis application during WebSocket creation ... · fe804b09
      Ashley Sanders authored
      Prior to ASTERISK-24988, the WebSocket handshake was resolved before Stasis
      applications were registered. This was done such that the WebSocket would be
      ready when an application is registered. However, by creating the WebSocket
      first, the client had the ability to make requests for the Stasis application
      it thought had been created with the initial handshake request. The inevitable
      conclusion of this scenario was the cart being put before the horse.
      
      ASTERISK-24988 resolved half of the problem by ensuring that the applications
      were created and registered with Stasis prior to completing the handshake
      with the client. While this meant that Stasis was ready when the client
      received the green-light from Asterisk, it also meant that the WebSocket was
      not yet ready for Stasis to dispatch messages.
      
      This patch introduces a message queuing mechanism for delaying messages from
      Stasis applications while the WebSocket is being constructed. When the ARI
      event processor receives the message from the WebSocket that it is being
      created, the event processor instantiates an event session which contains a
      message queue. It then tries to create and register the requested applications
      with Stasis. Messages that are dispatched from Stasis between this point and
      the point at which the event processor is notified the WebSocket is ready, are
      stashed in the queue. Once the WebSocket has been built, the queue's messages
      are dispatched in the order in which they were originally received and the
      queue is concurrently cleared.
      
      ASTERISK-25181 #close
      Reported By: Matt Jordan
      
      Change-Id: Iafef7b85a2e0bf78c114db4c87ffc3d16d671a17
      fe804b09
  2. Jul 24, 2015
    • Joshua Colp's avatar
      pjsip: Add rtp_timeout and rtp_timeout_hold endpoint options. · 309dd2a4
      Joshua Colp authored
      This change adds support for the 'rtp_timeout' and 'rtp_timeout_hold'
      endpoint options. These allow the channel to be hung up if RTP
      is not received from the remote endpoint for a specified number of
      seconds.
      
      ASTERISK-25259 #close
      
      Change-Id: I3f39daaa7da2596b5022737b77799d16204175b9
      309dd2a4
    • Joshua Colp's avatar
    • Mark Michelson's avatar
      res_pjsip: Add rtp_keepalive to sample config file. · a0c31c7a
      Mark Michelson authored
      Change-Id: I5f62d0c5684f8b2335f9f8ac2d79ee04fbdafb19
      a0c31c7a
    • Mark Michelson's avatar
      Local channels: Alternate solution to ringback problem. · d97bed46
      Mark Michelson authored
      Commit 54b25c80 solved an issue where a
      specific scenario involving local channels and a native local RTP bridge
      could result in ringback still being heard on a calling channel even
      after the call is bridged.
      
      That commit caused many tests in the testsuite to fail with alarming
      consequences, such as not sending DialBegin and DialEnd events, and
      giving incorrect hangup causes during calls.
      
      This commit reverts the previous commit and implements and alternate
      solution. This new solution involves only passing AST_CONTROL_RINGING
      frames across local channels if the local channel is in AST_STATE_RING.
      Otherwise, the frame does not traverse the local channels. By doing
      this, we can ensure that a playtones generator does not get started on
      the calling channel but rather is started on the local channel on which
      the ringing frame was initially indicated.
      
      ASTERISK-25250 #close
      Reported by Etienne Lessard
      
      Change-Id: I3bc87a18a38eb2b68064f732d098edceb5c19f39
      d97bed46
  3. Jul 23, 2015
  4. Jul 22, 2015
    • Mark Michelson's avatar
    • Joshua Colp's avatar
      audiohook: Use manipulated frame instead of dropping it. · 1cc99ba8
      Joshua Colp authored
      Previous changes to sample rate support in audiohooks accidentally
      removed code responsible for allowing the manipulate audiohooks
      to work. Without this code the manipulated frame would be dropped
      and not used. This change restores it.
      
      ASTERISK-25253 #close
      
      Change-Id: I3ff50664cd82faac8941f976fcdcb3918a50fe13
      1cc99ba8
    • 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
  5. Jul 20, 2015
  6. Jul 19, 2015
  7. Jul 17, 2015
  8. 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
  9. Jul 15, 2015
Loading