Skip to content
Snippets Groups Projects
  1. Sep 06, 2016
  2. Sep 04, 2016
  3. Sep 02, 2016
  4. Sep 01, 2016
    • zuul's avatar
    • Joshua Colp's avatar
    • Michael Kuron's avatar
      app_mp3: Use correct buffer size and the same sample rate as the channel · 48fd4c81
      Michael Kuron authored
      Previously, the buffer used for MP3 streamed from HTTP servers had a size of
      1 MB. For 8 kHz mono audio at 16 bit resolution, such a buffer covers about 1
      minute. Only when the buffer is full does audio start to play.
      For MP3 files streamed from a server, that is usually not a big deal as long as
      the connection to the server is fast enough to supply that much data within a
      second or two. For MP3 live streams however, it takes 1 minute to download 1
      minute of audio, so without this change, app_mp3 wasn't really usable for MP3
      live streams.
      This commit changes the buffer size so that it covers 6 seconds of an MP3 file
      streamed from a server and 0.5 seconds of an MP3 live stream. The latter is
      identified by the use of a .m3u file extension.
      
      app_mp3 so far only supported 8 kHz audio.
      Now it always runs at the sample rate of the channel.
      
      ASTERISK-26085 #close
      
      Change-Id: Id1ee274733cd804a0edecf7450329b72f1235af0
      48fd4c81
  5. Aug 30, 2016
    • Alexei Gradinari's avatar
      res_pjsip: qualify/unqualify added/deleted realtime endpoints · faf9bdeb
      Alexei Gradinari authored
      If the PJSIP endpoint's AOR with the permanent contact
      was deleted from the realtime storage the res_pjsip module
      continues trying to qualify this contact.
      The error 'Unable to find an endpoint to qualify contact'
      appeares every 'qualify_frequency' seconds.
      This patch deletes this contact in this case.
      
      The PJSIP endpoint's AOR with the permanent contact
      is never qualified if it is added to realtime storage
      after asterisk started.
      This patch adds qualifying for the AOR's permanent contacts
      on the first handling of this AOR.
      
      ASTERISK-26319 #close
      
      Change-Id: Ib93dded9121edb113076903d1aa95402f799f8fe
      faf9bdeb
    • zuul's avatar
      e7d06a80
  6. Aug 29, 2016
    • zuul's avatar
      e91fc62f
    • zuul's avatar
    • zuul's avatar
    • zuul's avatar
    • Mark Michelson's avatar
      res_pjsip: Default endpoints to the "offline" status. · c98a047e
      Mark Michelson authored
      A recent change attempted to optimize startup by not updating contact
      status. Instead, code responsible for qualifying contacts updates the
      status as it becomes known. The code even accounts for contacts/AORs
      that are not set to be qualified.
      
      The problem, though, is when there are no contacts associated with an
      endpoint. A common case is when an endpoint is set to register its
      contacts but has not done so yet. In this case, prior to registration,
      the endpoint's device state will appear to be "not in use" and hints
      associated with that device will appear to be "idle". In actuality, the
      device state and hint should both appear as "unavailable". The reason
      for the failure is that the optimization change made all persistent
      endpoint states set to "unknown".
      
      The fix here is to change the hard-coded "unknown" to be "offline"
      instead. The default state will be offline until the qualifying code
      determines that the contact is actually online. This way, if there are
      no contacts at all, then the state stays as offline, and device state
      and hints appear correctly.
      
      ASTERISK-26269 #close
      Reported by nappsoft
      
      Change-Id: Ie99b84169393983453076f5e9c0d35ff313a456a
      c98a047e
    • Etienne Lessard's avatar
      pbx.c: Prevent infinite recursion in manager_show_dialplan_helper. · 5e075857
      Etienne Lessard authored
      Previously, if context A was including context B and context B was including
      context A, i.e. if there was a circular dependency between contexts, then
      calling manager_show_dialplan_helper could lead to an infinite recursion,
      resulting in a crash.
      
      This commit applies the same solution as the one implemented in the
      show_dialplan_helper function. The manager_show_dialplan_helper and
      show_dialplan_helper functions contain lots of code in common, but the former
      was missing the "infinite recursion avoidance" code.
      
      ASTERISK-26226 #close
      
      Change-Id: I1aea85133c21787226f4f8442253a93000aa0897
      5e075857
  7. Aug 27, 2016
  8. Aug 26, 2016
  9. Aug 25, 2016
    • Richard Mudgett's avatar
      res_pjsip: Cache global config options. · ea929d76
      Richard Mudgett authored
      We may check a global config option hundreds of times a second or more.
      Asking sorcery for the global configuration from the config files backend
      involves several allocations and container traversals.  Using realtime
      without a memory cache is a lot worse because you have to lookup in the
      realtime database each time to reconstitute the sorcery object.  With a
      memory cache for realtime, there is about the same amount of overhead as
      for config files.  Either way, it is still fairly expensive to access the
      sorcery object that much.
      
      * Cache the global config options so we can access them faster.  You must
      now always perform a res_pjsip reload to change the global options.
      
      Change-Id: Ice16c7a4cbca4614da344aaea21a072b86263ef7
      ea929d76
    • Richard Mudgett's avatar
      res_fax: Fix deadlock in ast_channel_get_t38_state(). · 5eb6cb96
      Richard Mudgett authored
      ast_channel_get_t38_state() calls ast_channel_queryoption() with
      AST_OPTION_T38_STATE.  If the passed in channel is a local channel then a
      deadlock can happen if a channel lock is held when called.
      
      * Made ast_channel_get_t38_state() callers not hold a channel lock before
      calling.
      
      * Update ast_channel_get_t38_state() doxygen to note that no channel locks
      can be held when calling the function.
      
      ASTERISK-26203 #close
      Reported by: Etienne Lessard
      
      ASTERISK-24822 #close
      Reported by: David Brillert
      
      ASTERISK-22732 #close
      Reported by: Richard Mudgett
      
      Change-Id: I49fd76fa9af628b4198009b5c0b82c8b03681214
      5eb6cb96
    • Richard Mudgett's avatar
      res_fax: Fix deadlock setting FAXMODE channel variable. · 277a2d66
      Richard Mudgett authored
      ASTERISK-25980 added the FAXMODE channel variable to res_fax.c.
      Unfortunately, it also introduced a deadlock potential because
      set_channel_variables() which sets FAXMODE can be called during a
      masquerade.  The ast_channel_get_t38_state() which gets the value used to
      set FAXMODE cannot be called with the channel locked.  As a result, local
      channels can deadlock because of how they must acquire the locks necessary
      to operate.
      
      The intent of FAXMODE is for dialplan to know how a fax was transferred
      after the fax completes.  However, the previous patch sets FAXMODE to the
      channel's current T.38 state AFTER the fax has completed and where T.38
      may have already disconnected.
      
      * Set FAXMODE based upon T.38 negotiations exchanged either with the fax
      applications or the fax framehooks.
      
      ASTERISK-26203
      Reported by: Etienne Lessard
      
      ASTERISK-24822
      Reported by: David Brillert
      
      ASTERISK-22732
      Reported by: Richard Mudgett
      
      Change-Id: Id525747254b64c1efe8b1b5973d52ff9719c2ae1
      277a2d66
    • Richard Mudgett's avatar
      res_fax.c: Fix deadlock in fax_gateway_indicate_t38(). · edca14c8
      Richard Mudgett authored
      fax_gateway_indicate_t38() calls ast_indicate_data() which cannot be
      called with any channel locks already held.  A deadlock can happen if the
      function is operating on a local channel.
      
      * Made fax_gateway_indicate_t38() unlock the channel before calling
      ast_indicate_data() since fax_gateway_indicate_t38() is always called with
      the channel locked.
      
      * Made fax_gateway_indicate_t38() return void since nothing cared about
      its return value.
      
      ASTERISK-26203
      Reported by: Etienne Lessard
      
      ASTERISK-24822
      Reported by: David Brillert
      
      ASTERISK-22732
      Reported by: Richard Mudgett
      
      Change-Id: I701ff2d26c5fc23e0d5a48a3fd98759a9fd09407
      edca14c8
    • Richard Mudgett's avatar
      res_fax.c: Add chan locked precondition comments. · 141cd428
      Richard Mudgett authored
      Change-Id: Ic10ae434536bbf7fb7055d6ab36cc50b8748a4e7
      141cd428
    • Richard Mudgett's avatar
      ast_framehook_detach() must be called with the channel locked. · b86771d1
      Richard Mudgett authored
      The framehook container could become corrupted if the channel lock is not
      held before calling.
      
      Change-Id: If0a1c7ba0484ed3a191106a7516526b905952584
      b86771d1
    • Richard Mudgett's avatar
      ast_framehook_attach() must be called with the channel locked. · 5744f434
      Richard Mudgett authored
      The framehook container could become corrupted if the channel lock is not
      held before calling.
      
      Change-Id: I1a6b957a1f7b899eb29a186915f8cccab886a438
      5744f434
    • chrisderock's avatar
      app_macro: Consider '~~s~~' as a macro start extension. · 93b7533d
      chrisderock authored
      As described in issue ASTERISK-26282 the AEL parser creates macros with
      extension '~~s~~'.  app_macro searches only for extension 's' so the
      created extension cannot be found.  with this patch app_macro searches for
      both extensions and performs the right extension.
      
      ASTERISK-26282 #close
      
      Change-Id: I939aa2a694148cc1054dd75ec0c47c47f47c90fb
      93b7533d
    • varnav's avatar
      chan_iax2: Set plaintext auth to deprecated as per ASTERISK-22820 · d2e03c25
      varnav authored
      Starting from draft 2 of RFC 5456 (October 23, 2006) plaintext auth
      is not supported in IAX2 protocol. Please refer to section 8.6.13 of
      RFC 5456.
      
      But plaintext auth is still supported by Asterisk implementation of IAX2.
      This support should be dropped.
      
      Patch, based on asterisk-dev discussion, adds deprecation warning on
      startup if 'auth' is set to 'plaintext', changes default values of
      'auth' from 'md5, plaintext' to 'md5'.
      
      Patch is safe in terms of backwards compatibility, will work even if
      remote peers have auth=plaintext and we have defaults.
      
      auth=plaintext setting will remain deprecated in Asterisk 14 and 15,
      and IAX2 plaintext support will be removed in Asterisk 16.
      
      ASTERISK-22820 #close
      
      Change-Id: I5d2f3830cb57645604818f87518916e8a5c317bf
      d2e03c25
Loading