Skip to content
Snippets Groups Projects
  1. Aug 20, 2015
  2. Aug 19, 2015
    • Richard Mudgett's avatar
      rtp_engine.c: Extract rtp_codecs_payload_replace_rx(). · 38854a9f
      Richard Mudgett authored
      ASTERISK-25166
      Reported by: Kevin Harwell
      
      ASTERISK-17410
      Reported by: Boris Fox
      
      Change-Id: I34e23bf5b084c8570f9c3e6ccd19b95fe85af239
      38854a9f
    • Richard Mudgett's avatar
      rtp_engine.c: Initial split of payload types into rx and tx mappings. · 1a549ed1
      Richard Mudgett authored
      There are numerous problems with the current implementation of the RTP
      payload type mapping in Asterisk.  It uses only one mapping structure to
      associate payload types to codecs.  The single mapping is overkill if all
      of the payload type values are well known values.  Dynamic payload type
      mappings do not work as well with the single mapping because RFC3264
      allows each side of the link to negotiate different dynamic mappings for
      what they want to receive.  Not only could you have the same codec mapped
      for sending and receiving on different payload types you could wind up
      with the same payload type mapped to different codecs for each direction.
      
      1) An independent payload type mapping is needed for sending and
      receiving.
      
      2) The receive mapping needs to keep track of previous mappings because of
      the slack to when negotiation happens and current packets in flight using
      the old mapping arrive.
      
      3) The transmit mapping only needs to keep track of the current negotiated
      values since we are sending the packets and know when the switchover takes
      place.
      
      * Needed to create ast_rtp_codecs_payload_code_tx() and make some callers
      use the new function because ast_rtp_codecs_payload_code() was used for
      mappings in both directions.
      
      * Needed to create ast_rtp_codecs_payloads_xover() for cases where we need
      to pass preferred codec mappings to the peer channel for early media
      bridging or when we need to prefer the offered mapping that RFC3264 says
      we SHOULD use.
      
      * ast_rtp_codecs_payloads_xover() and ast_rtp_codecs_payload_code_tx() are
      the only new public functions created.  All the others were only used for
      the tx or rx mapping direction so the function doxygen now reflects which
      direction the function operates.
      
      * chan_mgcp.c: Removed call to ast_rtp_codecs_payloads_clear() as doing
      that makes no sense when processing an incoming SDP.  We would be wiping
      out any mappings that we set for the possible outgoing SDP we sent
      earlier.
      
      ASTERISK-25166
      Reported by: Kevin Harwell
      
      ASTERISK-17410
      Reported by: Boris Fox
      
      Change-Id: Iaf6c227bca68cb7c414cf2fd4108a8ac98bd45ac
      1a549ed1
    • Mark Michelson's avatar
      aacb46b5
    • Mark Michelson's avatar
    • Mark Michelson's avatar
    • Mark Michelson's avatar
    • Richard Mudgett's avatar
      ari/ari_websockets.c: Fix ast_debug parameter type mismatch. · 21d419e4
      Richard Mudgett authored
      This is a type mismatch fix of the debugging commit
      c63316ee made to find out why
      a testsuite test was failing only on one of the continuous
      integration build agents.
      
      Change-Id: Iba34f6e87cec331f6ac80e4daff6476ea6f00a75
      21d419e4
    • Scott Griepentrog's avatar
      contrib: script install_prereq should install sqlite3 · 53e2a6a8
      Scott Griepentrog authored
      Asterisk needs the sqlite 3 library, which is package
      sqlite-devel in CentOS. By adding this package to the
      script, a problem with configure failing is resolved.
      
      ASTERISK-25331 #close
      Reported by: Kevin Harwell
      
      Change-Id: I90efaf6a01914fea03f21e5cdbd91c348f44b0ec
      53e2a6a8
    • Matt Jordan's avatar
    • Matt Jordan's avatar
  3. Aug 18, 2015
  4. Aug 17, 2015
  5. Aug 14, 2015
    • Mark Michelson's avatar
      res_pjsip_sdp_rtp: Restore removed NULL check. · 5a857115
      Mark Michelson authored
      When sending an RTP keepalive, we need to be sure we're not dealing with
      a NULL RTP instance. There had been a NULL check, but the commit that
      added the rtp_timeout and rtp_hold_timeout options removed the NULL
      check.
      
      Change-Id: I2d7dcd5022697cfc6bf3d9e19245419078e79b64
      5a857115
  6. Aug 13, 2015
  7. Aug 12, 2015
  8. Aug 11, 2015
    • Matt Jordan's avatar
      res/res_format_attr_silk: Expose format attributes to other modules · a87e2dd2
      Matt Jordan authored
      This patch adds the .get callback to the format attribute module, such
      that the Asterisk core or other third party modules can query for the
      negotiated format attributes.
      
      Change-Id: Ia24f55cf9b661d651ce89b4f4b023d921380f19c
      a87e2dd2
    • Richard Mudgett's avatar
      chan_dahdi.c: Flush the DAHDI write buffer after starting DTMF. · 87c92d2a
      Richard Mudgett authored
      Pressing DTMF digits on a phone to go out on a DAHDI channel can result in
      the digit not being recognized or even heard by the peer.
      
      Phone -> Asterisk -> DAHDI/channel
      
      Turns out the DAHDI behavior with DTMF generation (and any other generated
      tones) is exposed by the "buffers=" setting in chan_dahdi.conf.  When
      Asterisk requests to start sending DTMF then DAHDI waits until its write
      buffer is empty before generating any samples for the DTMF tones.  When
      Asterisk subsequently requests DAHDI to stop sending DTMF then DAHDI
      immediately stops generating the DTMF samples.  As a result, the more
      samples there are in the DAHDI write buffer the shorter the time DTMF
      actually gets sent on the wire.  If there are more samples in the write
      buffer than the time DTMF is supposed to be sent then no DTMF gets sent on
      the wire.  With the "buffers=12,half" setting and each buffer representing
      20 ms of samples then the DAHDI write buffer is going to contain around
      120 ms of samples.  For DTMF to be recognized by the peer the actual sent
      DTMF duration needs to be a minimum of 40 ms.  Therefore, the intended
      duration needs to be a minimum of 160 ms for the peer to receive the
      minimum DTMF digit duration to recognize it.
      
      A simple and effective solution to work around the DAHDI behavior is for
      Asterisk to flush the DAHDI write buffer when sending DTMF so the full
      duration of DTMF is actually sent on the wire.  When someone is going to
      send DTMF they are not likely to be talking before sending the tones so
      the flushed write samples are expected to just contain silence.
      
      * Made dahdi_digit_begin() flush the DAHDI write buffer after requesting
      to send a DTMF digit.
      
      ASTERISK-25315 #close
      Reported by John Hardin
      
      Change-Id: Ib56262c708cb7858082156bfc70ebd0a220efa6a
      87c92d2a
    • Richard Mudgett's avatar
      chan_dahdi.c: Lock private struct for ast_write(). · b9b957d4
      Richard Mudgett authored
      There is a window of opportunity for DTMF to not go out if an audio frame
      is in the process of being written to DAHDI while another thread starts
      sending DTMF.  The thread sending the audio frame could be past the
      currently dialing check before being preempted by another thread starting
      a DTMF generation request.  When the thread sending the audio frame
      resumes it will then cause DAHDI to stop the DTMF tone generation.  The
      result is no DTMF goes out.
      
      * Made dahdi_write() lock the private struct before writing to the DAHDI
      file descriptor.
      
      ASTERISK-25315
      Reported by John Hardin
      
      Change-Id: Ib4e0264cf63305ed5da701188447668e72ec9abb
      b9b957d4
    • Richard Mudgett's avatar
      res_pjsip.c: Fix crash from corrupt saved SUBSCRIBE message. · f3f5b45d
      Richard Mudgett authored
      If the saved SUBSCRIBE message is not parseable for whatever reason then
      Asterisk could crash when libpjsip tries to parse the message and adds an
      error message to the parse error list.
      
      * Made ast_sip_create_rdata() initialize the parse error rdata list.  The
      list is checked after parsing to see that it remains empty for the
      function to return successful.
      
      ASTERISK-25306
      Reported by Mark Michelson
      
      Change-Id: Ie0677f69f707503b1a37df18723bd59418085256
      f3f5b45d
    • Alexander Traud's avatar
      chan_sip: Fix negotiation of iLBC 30. · 991d4da1
      Alexander Traud authored
      iLBC 20 was advertised in a SIP/SDP negotiation. However, only iLBC 30 is
      supported. Removes "a=fmtp:x mode=y" from SDP. Because of RFC 3952 section 5,
      only iLBC 30 is negotiated now.
      
      ASTERISK-25309 #close
      
      Change-Id: I92d724600a183eec3114da0ac607b994b1a793da
      991d4da1
  9. Aug 10, 2015
    • Matt Jordan's avatar
      main/format: Add an API call for retrieving format attributes · e188192a
      Matt Jordan authored
      Some codecs that may be a third party library to Asterisk need to have
      knowledge of the format attributes that were negotiated. Unfortunately,
      when the great format migration of Asterisk 13 occurred, that ability
      was lost.
      
      This patch adds an API call, ast_format_attribute_get, to the core
      format API, along with updates to the unit test to check the new API
      call. A new callback is also now available for format attribute modules,
      such that they can provide the format attribute values they manage.
      
      Note that the API returns a void *. This is done as the format attribute
      modules themselves may store format attributes in any particular manner
      they like. Care should be taken by consumers of the API to check the
      return value before casting and dereferencing. Consumers will obviously
      need to have a priori knowledge of the type of the format attribute as
      well.
      
      Change-Id: Ieec76883dfb46ecd7aff3dc81a52c81f4dc1b9e3
      e188192a
    • Joshua Colp's avatar
      Merge "Replace htobe64 with htonll" · feffafbd
      Joshua Colp authored
      feffafbd
Loading