Skip to content
Snippets Groups Projects
  1. Jan 07, 2016
  2. Jan 06, 2016
  3. Jan 05, 2016
  4. Jan 04, 2016
    • George Joseph's avatar
      voicemail: Move app_voicemail / res_mwi_external conflict to runtime · 6d18fe15
      George Joseph authored
      The menuselect conflict between app_voicemail and res_mwi_external
      makes it hard to package 1 version of Asterisk.  There no actual
      build dependencies between the 2 so moving this check to runtime
      seems like a better solution.
      
      The ast_vm_register and ast_vm_greeter_register functions in app.c
      were modified to return AST_MODULE_LOAD_DECLINE instead of -1 if there
      is already a voicemail module registered. The modules' load_module
      functions were then modified to return DECLINE instead of -1 to the
      loader.  Since -1 is interpreted by the loader as AST_MODULE_LOAD_FAILURE,
      the modules were incorrectly causing Asterisk to stop so this needed
      to be cleaned up anyway.
      
      Now you can build both and use modules.conf to decide which voicemail
      implementation to load.
      
      The default menuselect options still build app_voicemail and not
      res_mwi_external but if both ARE built, res_mwi_external will load
      first and become the voicemail provider unless modules.conf rules
      prevent it.  This is noted in CHANGES.
      
      Change-Id: I7d98d4e8a3b87b8df9e51c2608f0da6ddfb89247
      6d18fe15
    • Corey Farrell's avatar
      main/pbx: Move variable routines to pbx_variables.c. · 5ee5c373
      Corey Farrell authored
      This is the third patch in a series meant to reduce the bulk of pbx.c.
      This moves channel and global variable routines to their own source.
      
      Change-Id: Ibe8fb4647db11598591d443a99e3f99200a56bc6
      5ee5c373
    • Richard Mudgett's avatar
      app_dial: Immediately exit dial if the caller is already hung up. · f88b9520
      Richard Mudgett authored
      If a caller hangs up before dial is executed within an AGI then the AGI
      has likely eaten all queued frames before executing the dial in DeadAGI
      mode.  With the caller hung up and no pending frames from the caller's
      read queue, dial would not know that the call has hung up until a called
      channel answers.  It is rather annoying to whoever just answered the
      non-existent call.
      
      Dial should not continue execution in DeadAGI mode, hangup handlers, or
      the h exten.
      
      * Added a check early in dial to abort dialing if the caller has hungup.
      
      ASTERISK-25307 #close
      Reported by: David Cunningham
      
      Change-Id: Icd1bc0764726ef8c809f76743ca008d0f102f418
      f88b9520
    • Matt Jordan's avatar
    • Matt Jordan's avatar
  5. Jan 02, 2016
    • Matt Jordan's avatar
      main/cdr: Allow setting properties on a finalized CDR if it is the last one · e9dd1636
      Matt Jordan authored
      Prior to this patch, we explicitly disallowed setting any properties on a
      finalized CDR. This seemed like a good idea at the time; in practice, it was
      more restrictive.
      
      There are weird and strange scenarios where setting a property on a finalized
      CDR is definitely wrong. For example, we may Fork a CDR, finalizing the
      previous one, then change a property. In said case, the old CDR is supposed
      to now be 'immutable' (so to speak), and should not be updated. From the
      perspective of the code, a forked CDR that is finalized is just finalized.
      Hence why we decided these should not be updated.
      
      In practice, it is much more common to want to set a property on a CDR in
      the h extension or in a hangup handler. Disallowing a common scenario to make
      an esoteric behaviour work isn't good. This patch fixes this by allowing
      callers to set a property IF we are the last CDR in the chain. This preserves
      the finalized CDR if it was forked, while allowing the more common case to
      function.
      
      ASTERISK-25458 #close
      
      Change-Id: Icf3553c607b9f561152a41e6d8381d594ccdf4b9
      e9dd1636
    • Matt Jordan's avatar
      main/cdr: Set the end time on a CDR if endbeforehexten is Yes · 153547a9
      Matt Jordan authored
      Prior to this patch, the CDR engine attempted to set the end time on a CDR
      that was executing hangup logic and with endbeforehexten set to Yes by
      calling a function that inspects the properties on the Party A snapshot to
      determine if we are ready to set the end time. That always failed. This is
      because a Party A snapshot is not updated for CDRs that are executing hangup
      logic with endbeforehexten=Yes.
      
      Instead of calling a function that looks at the Party A snapshot, we just
      simply set the end time on the CDR. This is safe to call multiple times, and is
      safe to call at this point as we know that (a) we are executing hangup logic,
      and (b) we are supposed to set the end time at this point.
      
      ASTERISK-25458
      
      Change-Id: I0c27b493861f9c13c43addbbb21257f79047a3b3
      153547a9
  6. Jan 01, 2016
    • Corey Farrell's avatar
      main/pbx: Move custom function routines to pbx_functions.c. · f9bfc245
      Corey Farrell authored
      This is the second patch in a series meant to reduce the bulk of pbx.c.
      This moves custom function management routines to their own source.
      
      Change-Id: I34a6190282f781cdbbd3ce9d3adeac3c3805e177
      f9bfc245
    • Matt Jordan's avatar
    • Rodrigo Ramírez Norambuena's avatar
      Happy new year 2016. · 3fd528dd
      Rodrigo Ramírez Norambuena authored
      Change-Id: I22d3c90f6f27df82e915bbf81c1d91221f7a945e
      3fd528dd
    • Matt Jordan's avatar
    • Matt Jordan's avatar
      res_pjsip_history: Add a module that provides PJSIP history for debugging · 9cdf3ec1
      Matt Jordan authored
      This patch adds a new module, res_pjsip_history, that provides a slightly
      better way of debugging SIP message traffic on a busy Asterisk system. The
      existing mechanisms all rely on passively dumping a SIP message to the CLI.
      While this is perfectly fine for logging purposes and well controlled
      environments, on many installations, the amount of SIP messages Asterisk
      receives will quickly swamp the CLI. This makes it difficult to view/capture
      those messages that you want to diagnose in real time.
      
      This patch provides another way of handling this. When enabled, the module
      will store SIP message traffic in memory. This traffic can then be queried
      at leisure.
      
      In order to make the querying useful, a CLI command has been implemented,
      'pjsip show history', that supports a basic expression syntax similar to
      SQL or other query languages. A small number of useful fields have been
      added in this initial patch; additional fields can easily be added in
      later improvements. Those fields are:
       - number: The entry index in the history
       - timestamp: The time the message was recieved
       - addr: The source/destination address of the message
       - sip.msg.request.method: The request method
       - sip.msg.call-id: The Call-ID header
      
      Note - this is a resurrection of the module initially proposed on Review Board
      here: https://reviewboard.asterisk.org/r/4053/
      
      Change-Id: I39bd74ce998e99ad5ebc0aab3e84df3a150f8e36
      9cdf3ec1
  7. Dec 31, 2015
  8. Dec 28, 2015
    • Joshua Colp's avatar
      410c5ee0
    • Matt Jordan's avatar
    • Joshua Colp's avatar
      test_time: Provide a timeout when waiting. · a05bb258
      Joshua Colp authored
      The test_timezone_watch unit test is written to expect a
      condition to be signaled when the inotify daemon thread runs.
      There exists a small window where the test_timezone_watch
      thread can signal the inotify daemon thread while it is not
      reading on the underlying file descriptor. If this occurs
      the test_timezone_watch thread will wait indefinitely for a
      signal that will never arrive.
      
      This change adds a timeout to the condition so it will return
      regardless after a period of time.
      
      Change-Id: Ifed981879df6de3d93acd3ee0a70f92546517390
      a05bb258
    • Matt Jordan's avatar
      tests/test_stasis_endpoints: Remove expected duplicate events · 96b32e03
      Matt Jordan authored
      The cache_clear test was written to expect duplicate Stasis messages
      sent from the technology endpoint to the all caching topic. This patch
      fixes the test to no longer expect these duplicate messages.
      
      ASTERISK-25137
      
      Change-Id: I58075d70d6cdf42e792e0fb63ba624720bfce981
      96b32e03
    • Dade Brandon's avatar
      res_http_websocket.c: prevent avoidable disconnections caused by write errors · 3bddcc02
      Dade Brandon authored
      Updated ast_websocket_write to encode the entire frame in to one
      write operation, to ensure that we don't end up with a situation
      where the websocket header has been sent, while the body can not
      be written.
      
      Previous to August's patch in commit b9bd3c14, certain network
      conditions could cause the header to be written, and then the
      sub-sequent body to fail - which would cause the next successful
      write to contain a new header, and a new body (resulting in
      the peer receiving two headers - the second of which would be
      read as part of the body for the first header).
      
      This was patched to have both write operations individually fail
      by closing the websocket.
      
      In a case available to the submitter of this patch, the same
      body which would consistently fail to write, would succeed
      if written at the same time as the header.
      
      This update merges the two operations in to one, adds debug messages
      indicating the reason for a websocket connection being closed during
      a write operation, and clarifies some variable names for code legibility.
      
      Change-Id: I4db7a586af1c7a57184c31d3d55bf146f1a40598
      3bddcc02
    • George Joseph's avatar
      endpoint/stasis: Eliminate duplicate events on endpoint status change · 22db16fa
      George Joseph authored
      
      When an endpoint is created, its messages are forwarded to both the tech
      endpoint topic and the all endpoints topic. This is done so that various
      parties interested in endpoint messages can subscribe to just the tech
      endpoint and receive all messages associated with that particular technology,
      as opposed to subscribing to the all endpoints topic. Unfortunately, when the
      tech endpoint is created, it also forwards all of its messages to the all
      topic. This results in duplicate messages whenever an endpoint publishes its
      messages.
      
      This patch resolves the duplicate message issue by creating a new function
      for Stasis caching topics, stasis_cp_sink_create. In most respects, this acts
      as a normal caching topic, save that it no longer forwards messages it receives
      to the all endpoints topic. This allows it to act as an aggregation "sink",
      while preserving the necessary caching behaviour.
      
      ASTERISK-25137 #close
      Reported-by: Vitezslav Novy
      
      ASTERISK-25116 #close
      Reported-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      Tested-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      
      Change-Id: Ie47784adfb973ab0063e59fc18f390d7dd26d17b
      22db16fa
    • Matt Jordan's avatar
      b4b4a952
    • Matt Jordan's avatar
    • Joshua Colp's avatar
    • Corey Farrell's avatar
      Remove res_jabber file that was left behind. · 6b08f01c
      Corey Farrell authored
      Change-Id: I9d88fac0394d5bbaff0900a2ee911c4e4478846b
      6b08f01c
  9. Dec 25, 2015
    • Dade Brandon's avatar
      chan_sip.c: fix websocket_write_timeout default value · 6dc21bbf
      Dade Brandon authored
      websocket_write_timeout was not being set to its default value
      during sip config reload, which meant that prior to this commit,
      1) the default value of 100 was not used, unless an invalid value
      (or 1) was specified in sip.conf for websocket_write_timeout, and
      2) if the websocket_write_timeout directive was removed from sip.conf
      without a full restart of asterisk, then the previous value would
      continue to be used indefinitely.
      
      This essentially lead to a 0ms write timeout (the first write attempt
      in ast_careful_fwrite must have succeeded) in websocket write requests
      from chan_sip, unless websocket_write_timeout was explicitely set in sip.conf.
      
      Changes to websocket_write_timeout still only apply to new websocket
      sessions, after the sip reload -- timeouts on existing sessions are
      not adjusted during sip reload.
      
      Change-Id: Ibed3816ed29cc354af6564c5ab3e75eab72cb953
      6dc21bbf
  10. Dec 24, 2015
    • Richard Mudgett's avatar
      bridge_basic.c: Fix GOTO_ON_BLINDXFR · 8eb5da06
      Richard Mudgett authored
      Use of GOTO_ON_BLINDXFR would not work at all.  The target location would
      never be executed by the transferring channel.
      
      * Made feature_blind_transfer() call ast_bridge_set_after_go_on() with
      valid context, exten, and priority parameters from the transferring
      channel.
      
      * Renamed some feature_blind_transfer() local variables for clarity.
      
      ASTERISK-25641 #close
      Reported by Dmitry Melekhov
      
      Change-Id: I19bead9ffdc4aee8d58c654ca05a198da1e4b7ac
      8eb5da06
Loading