Skip to content
Snippets Groups Projects
  1. Aug 19, 2015
  2. Aug 18, 2015
  3. Aug 17, 2015
  4. 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
  5. Aug 13, 2015
  6. Aug 12, 2015
  7. 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
  8. 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
    • Joshua Colp's avatar
      ff36b548
  9. Aug 08, 2015
  10. Aug 07, 2015
  11. Aug 06, 2015
    • Scott Emidy's avatar
      ARI: Deleting log channels · f19c4930
      Scott Emidy authored
      An http request can be sent to delete a log channel
      in Asterisk.
      
      The command "curl -v -u user:pass -X DELETE 'http://localhost:8088
      /ari/asterisk/logging/mylog'" can be run in the terminal
      to access the newly implemented functionally for ARI.
      
      * Able to delete log channels using ARI
      
      ASTERISK-25252
      
      Change-Id: Id6eeb54ebcc511595f0418d586ff55914bc3aae6
      f19c4930
    • Mark Michelson's avatar
      res_pjsip_pubsub: More accurately persist packet. · 382334cc
      Mark Michelson authored
      The pjsip_rx_data structure has a pkt_info.packet field on it that is
      the packet that was read from the transport. For datagram transports,
      the packet read from the transport will correspond to the SIP message
      that arrived. For streamed transports, however, it is possible to read
      multiple SIP messages in one packet.
      
      In a recent case, Asterisk crashed on a system where TCP was being used.
      This is because at some point, a read from the TCP socket resulted in a
      200 OK response as well as an incoming SUBSCRIBE request being stored in
      rdata->pkt_info.packet. When the SUBSCRIBE was processed, the
      combination 200 OK and SUBSCRIBE was saved in persistent storage. Later,
      a restart of Asterisk resulted in the crash because the persistent
      subscription recreation code ended up building the 200 OK response
      instead of a SUBSCRIBE request, and we attempted to access
      request-specific data.
      
      The fix here is to use the pjsip_msg_print() function in order to
      persist SUBSCRIBE requests. This way, rather than using the raw socket
      data, we use the parsed SIP message that PJSIP has given us. If we
      receive multiple SIP messages from a single read, we will be sure only
      to save off the relevant SIP message. There also is a safeguard put in
      place to make sure that if we do end up reconstructing a SIP response,
      it will not cause a crash.
      
      ASTERISK-25306 #close
      Reported by Mark Michelson
      
      Change-Id: I4bf16f7b76a2541d10b55de82bcd14c6e542afb2
      382334cc
    • Joshua Colp's avatar
Loading