Skip to content
Snippets Groups Projects
  1. May 01, 2015
    • Matt Jordan's avatar
      main/pbx: Improve performance of dialplan reloads with a large number of hints · 7ac28be0
      Matt Jordan authored
      The PBX core maintains two hash tables for hints: a container of the
      actual hints (hints), along with a container of devices that are watching that
      hint (hintdevices). When a dialplan reload occurs, each hint in the hints
      container is destroyed; this requires a lookup in the container of devices to
      find the device => hint mapping object. In the current code, this performs an
      ao2_callback, iterating over each of the device to hint objects in the
      hintdevices container. For a large number of hints, this is extremely
      expensive: dialplan reloads with 20000 hints could take several minutes
      in just this phase.
      
      This patch improves the performance of this step in the dialplan reloads
      by caching which devices are watching a hint on the hint object itself.
      Since we don't want to create a circular reference, we just cache the
      name of the device. This allows us to perform a smarter ao2_callback on
      the hintdevices container during hint removal, hashing on the name of the
      device and returning an iterator to the matching names. The overall
      performance improvement is rather large, taking this step down to a number of
      seconds as opposed to minutes.
      
      In addition, this patch also registers the hint containers in the PBX
      core with the astobj2 library. This allows for reasonable debugging to
      hash collisions in those containers.
      
      ASTERISK-25040 #close
      Reported by: Matt Jordan
      
      Change-Id: Iedfc97a69d21070c50fca42275d7b3e714e59360
      7ac28be0
  2. Apr 19, 2015
    • Matt Jordan's avatar
      main/pbx: Don't attempt to destroy a previously destroyed exten/priority tuple · 8e903b17
      Matt Jordan authored
      When a PBX registrar is unloaded, it will fail to remove its extension from
      the context root_table if a dialplan application used by that extension is
      still loaded. This can be the case for AGI, which can be unloaded after several
      of the standard PBX providers. Often, this is harmless; however, if the
      extension's priorities are removed during the failed unloading *and* the
      dialplan application later unregisters, it leaves a ticking timebomb for the
      next PBX provider that attempts to iterate over the extensions. When that
      occurs, the peer_table pointer on the extension will already be set to NULL.
      The current code does not check to see if the pointer is NULL before passing
      it to a hashtab function this is not NULL tolerant.
      
      Since it is possible for the peer_table to be NULL when we normally would not
      expect that to be the case, the solution in this patch is to simply skip over
      processing an extension's priorities if peer_table is NULL.
      
      Prior to this patch, the tests/pbx/callerid_match test would crash during
      module unload. With this patch, the test no longer crashes after running.
      
      ASTERISK-24774 #close
      Reported by: Corey Farrell
      
      Change-Id: I2bbeecb7e0f77bac303a1b9135e4cdb4db6d4c40
      8e903b17
  3. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  4. Mar 26, 2015
  5. Mar 13, 2015
  6. Jan 30, 2015
  7. Jan 19, 2015
  8. Jan 12, 2015
  9. Jan 09, 2015
    • Richard Mudgett's avatar
      AMI: Remove no longer used parameter from astman_send_listack(). · ef34a05f
      Richard Mudgett authored
      Follow-up issue to -r430435 from reviewboard review.
      
      ASTERISK-24049
      Review: https://reviewboard.asterisk.org/r/4315/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ef34a05f
    • Richard Mudgett's avatar
      AMI: Make AMI actions that generate event lists consistent. · 52a7cdb1
      Richard Mudgett authored
      * Made the following AMI actions use list API calls for consistency:
      Agents
      BridgeInfo
      BridgeList
      BridgeTechnologyList
      ConfbridgeLIst
      ConfbridgeLIstRooms
      CoreShowChannels
      DAHDIShowChannels
      DBGet
      DeviceStateList
      ExtensionStateList
      FAXSessions
      Hangup
      IAXpeerlist
      IAXpeers
      IAXregistry
      MeetmeList
      MeetmeListRooms
      MWIGet
      ParkedCalls
      Parkinglots
      PJSIPShowEndpoint
      PJSIPShowEndpoints
      PJSIPShowRegistrationsInbound
      PJSIPShowRegistrationsOutbound
      PJSIPShowResourceLists
      PJSIPShowSubscriptionsInbound
      PJSIPShowSubscriptionsOutbound
      PresenceStateList
      PRIShowSpans
      QueueStatus
      QueueSummary
      ShowDialPlan
      SIPpeers
      SIPpeerstatus
      SIPshowregistry
      SKINNYdevices
      SKINNYlines
      Status
      VoicemailUsersList
      
      * Incremented the AMI version to 2.7.0.
      
      * Changed astman_send_listack() to not use the listflag parameter and
      always set the value to "Start" so the start capitalization is consistent.
      i.e., The FAXSessions used "Start" while the rest of the system used
      "start".  The corresponding complete event always used "Complete".
      
      * Fixed ami_show_resource_lists() "PJSIPShowResourceLists" to output the
      AMI ActionID for all of its list events.
      
      * Fixed off-nominal AMI protocol error in manager_bridge_info(),
      manager_parking_status_single_lot(), and
      manager_parking_status_all_lots().  Use of astman_send_error() after
      responding to the original AMI action request violates the action response
      pattern by sending two responses.
      
      * Fixed minor protocol error in action_getconfig() when no requested
      categories are found.  Each line needs to be formatted as "Header: text".
      
      * Fixed off-nominal memory leak in manager_build_parked_call_string().
      
      * Eliminated unnecessary use of RAII_VAR() in ami_subscription_detail().
      
      ASTERISK-24049 #close
      Reported by: Jonathan Rose
      
      Review: https://reviewboard.asterisk.org/r/4315/
      ........
      
      Merged revisions 430434 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      52a7cdb1
  10. Dec 24, 2014
  11. Dec 22, 2014
    • Matthew Jordan's avatar
      presencestate: Allow channel drivers to provide presence state information · 0c38276d
      Matthew Jordan authored
      This patch adds the ability for channel drivers to supply presence information
      in a similar manner to device state. The patch does not provide any channel
      driver implementations, but it does provide the core infrastructure necessary
      for channel drivers to provide such information.
      
      The core handles multiple providers of presence state information. Ordering
      of presence state is as follows:
       INVALID < NOT_SET < AVAILABLE < UNAVAILABLE < CHAT < AWAY < XA < DND
      
      Each provider can trump the previous if it provides a presence state that
      supercedes a previous one.
      
      Review: https://reviewboard.asterisk.org/r/4050
      
      ASTERISK-24363 #close
      Reported by: Gareth Palmer
      patches:
        chan_presencestate-428146.patch uploaded by Gareth Palmer (License 5169)
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0c38276d
  12. Nov 12, 2014
  13. Aug 13, 2014
  14. Aug 07, 2014
    • Matthew Jordan's avatar
      pbx: Filter out pattern matching hints in responses sent to ExtensionStateList · 98af8fb7
      Matthew Jordan authored
      Hints that are a pattern match are technically stored in the hint container in
      the same fashion as concrete implementations of hints. The pattern matching
      hints, however, are not "real" in the sense that things can subscribe to them:
      rather, they are stored in the hints container so that when a subscription is
      made a "real" hint can be generated for the subscription if one does not yet
      exist. The extension state core takes care of this correctly by matching
      against non-pattern matching extensions prior to pattern matching extensions.
      
      Because of this, however, the ExtensionStateList AMI action was returning
      pattern matching hints when executed. These hints are meaningless from the
      perspective of AMI clients: their state will never change, they cannot be
      subscribed to, and events would never normally be generated from them. As such,
      we now filter these out of the response.
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      98af8fb7
  15. Aug 06, 2014
    • George Joseph's avatar
      pbx_lua: fix regression with global sym export and context clash by pbx_config. · 3e5ab6ca
      George Joseph authored
      ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
      pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
      set, was always force loaded before pbx_config.  Since I couldn't find any
      reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
      changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
      realize was that the symbols need to be exported not because Asterisk needs
      them but because any external Lua modules like luasql.mysql need the base
      Lua language APIs exported (ASTERISK-17279).
      
      Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
      context_merge was only merging includes, switches and ignore patterns if
      the context was already existing AND has extensions, or if the context was
      brand new.  If pbx_lua is loaded before pbx_config, the context will exist
      BUT pbx_lua, being implemented as a switch, will never place extensions in
      it, just the switch statement.  The result is that when pbx_config loads,
      it never merges the switch statement created by pbx_lua into the final
      context.
      
      This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
      an "else if" in context_merge that catches the case where an existing context
      has includes, switchs or ingore patterns but no actual extensions.
      
      ASTERISK-23818 #close
      Reported by: Dennis Guse
      Reported by: Timo Teräs
      Tested by: George Joseph
      Review: https://reviewboard.asterisk.org/r/3891/
      ........
      
      Merged revisions 420146 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 420147 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 420148 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      3e5ab6ca
  16. Jul 30, 2014
    • Kinsey Moore's avatar
      manager: Add state list commands · 485d0379
      Kinsey Moore authored
      This patch adds three new AMI commands:
       * ExtensionStateList (pbx.c) - list all known extension state hints
         and their current statuses. Events emitted by the list action are
         equivalent to the ExtensionStatus events.
       * PresenceStateList (res_manager_presencestate) - list all known
         presence state values. Events emitted are generated by the stasis
         message type, and hence are PresenceStateChange events.
       * DeviceStateList (res_manager_devicestate) - list all known device
         state values. Events emitted are generated by the stasis message
         type, and hence are DeviceStateChange events.
      
      Patch-by: Matt Jordan
      Review: https://reviewboard.asterisk.org/r/3799/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      485d0379
  17. Jul 24, 2014
    • Richard Mudgett's avatar
      accountcode: Slightly change accountcode propagation. · a2ce95d9
      Richard Mudgett authored
      The previous behavior was to simply set the accountcode of an outgoing
      channel to the accountcode of the channel initiating the call.  It was
      done this way a long time ago to allow the accountcode set on the SIP/100
      channel to be propagated to a local channel so the dialplan execution on
      the Local;2 channel would have the SIP/100 accountcode available.
      
      SIP/100 -> Local;1/Local;2 -> SIP/200
      
      Propagating the SIP/100 accountcode to the local channels is very useful.
      Without any dialplan manipulation, all channels in this call would have
      the same accountcode.
      
      Using dialplan, you can set a different accountcode on the SIP/200 channel
      either by setting the accountcode on the Local;2 channel or by the Dial
      application's b(pre-dial), M(macro) or U(gosub) options, or by the
      FollowMe application's b(pre-dial) option, or by the Queue application's
      macro or gosub options.  Before Asterisk v12, the altered accountcode on
      SIP/200 will remain until the local channels optimize out and the
      accountcode would change to the SIP/100 accountcode.
      
      Asterisk v1.8 attempted to add peeraccount support but ultimately had to
      punt on the support.  The peeraccount support was rendered useless because
      of how the CDR code needed to unconditionally force the caller's
      accountcode onto the peer channel's accountcode.  The CEL events were thus
      intentionally made to always use the channel's accountcode as the
      peeraccount value.
      
      With the arrival of Asterisk v12, the situation has improved somewhat so
      peeraccount support can be made to work.  Using the indicated example, the
      the accountcode values become as follows when the peeraccount is set on
      SIP/100 before calling SIP/200:
      
      SIP/100 ---> Local;1 ---- Local;2 ---> SIP/200
      acct: 100 \/ acct: 200 \/ acct: 100 \/ acct: 200
      peer: 200 /\ peer: 100 /\ peer: 200 /\ peer: 100
      
      If a channel already has an accountcode it can only change by the
      following explicit user actions:
      
      1) A channel originate method that can specify an accountcode to use.
      
      2) The calling channel propagating its non-empty peeraccount or its
      non-empty accountcode if the peeraccount was empty to the outgoing
      channel's accountcode before initiating the dial.  e.g., Dial and
      FollowMe.  The exception to this propagation method is Queue.  Queue will
      only propagate peeraccounts this way only if the outgoing channel does not
      have an accountcode.
      
      3) Dialplan using CHANNEL(accountcode).
      
      4) Dialplan using CHANNEL(peeraccount) on the other end of a local
      channel pair.
      
      If a channel does not have an accountcode it can get one from the
      following places:
      
      1) The channel driver's configuration at channel creation.
      
      2) Explicit user action as already indicated.
      
      3) Entering a basic or stasis-mixing bridge from a peer channel's
      peeraccount value.
      
      You can specify the accountcode for an outgoing channel by setting the
      CHANNEL(peeraccount) before using the Dial, FollowMe, and Queue
      applications.  Queue adds the wrinkle that it will not overwrite an
      existing accountcode on the outgoing channel with the calling channels
      values.
      
      Accountcode and peeraccount values propagate to an outgoing channel before
      dialing.  Accountcodes also propagate when channels enter or leave a basic
      or stasis-mixing bridge.  The peeraccount value only makes sense for
      mixing bridges with two channels; it is meaningless otherwise.
      
      * Made peeraccount functional by changing accountcode propagation as
      described above.
      
      * Fixed CEL extracting the wrong ie value for the peeraccount.  This was
      done intentionally in Asterisk v1.8 when that version had to punt on
      peeraccount.
      
      * Fixed a few places dealing with accountcodes that were reading from
      channels without the lock held.
      
      AFS-65 #close
      
      Review: https://reviewboard.asterisk.org/r/3601/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      a2ce95d9
  18. Jul 04, 2014
    • Matthew Jordan's avatar
      Remove many deprecated modules · 97834718
      Matthew Jordan authored
      Billing records are fair,
      To get paid is quite bright,
      You should really use ODBC;
      Good-bye cdr_sqlite.
      
      Microsoft did once push H.323,
      Hell, we all remember NetMeeting.
      But try to compile chan_h323 now
      And you will take quite a beating.
      
      The XMPP and SIP war was fierce,
      And in the distant fray
      Was birthed res_jabber/chan_jingle;
      But neither to stay.
      
      For everyone did care and chase what Google professed.
      "Free Internet Calling" was what devotees cried,
      But Google did change the specs so often
      That the developers were happy the day chan_gtalk died.
      
      And then there was that odd application
      Dedicated to the Polish tongue.
      app_saycountpl was subsumed by Say;
      One could say its bell was rung.
      
      To read and parse a file from the dialplan
      You could (I guess) use an application.
      app_readfile did fill that purpose, but I think
      A function is perhaps better in its creation.
      
      Barging is rude, I'm not sure why we do it.
      Inwardly, the caller will probably sigh.
      But if you really must do it,
      Don't use app_dahdibarge, use ChanSpy.
      
      We all despise the sound of tinny robots
      It makes our queues so cold.
      To control such an abomination
      It's better to not use Wait/SetMusicOnHold.
      
      It's often nice to know properties of a channel
      It makes our calls right
      We have a nice function called CHANNEL
      And so SIPCHANINFO is sent off into the night.
      
      And now things get odd;
      Apparently one could delimit with a colon
      Properties from the SIPPEER function!
      Commas are in; all others are done.
      
      Finally, a word on pipes and commas.
      We're sorry. We can't say it enough.
      But those compatibility options in asterisk.conf;
      To maintain them forever was just too tough.
      
      This patch removes:
      
      * cdr_sqlite
      * chan_gtalk
      * chan_jingle
      * chan_h323
      * res_jabber
      * app_saycountpl
      * app_readfile
      * app_dahdibarge
      
      It removes the following applications/functions:
      
      * WaitMusicOnHold
      * SetMusicOnHold
      * SIPCHANINFO
      
      It removes the colon delimiter from the SIPPEER function.
      
      Finally, it also removes all compatibility options that were configurable from
      asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems.
      
      Review: https://reviewboard.asterisk.org/r/3698/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      97834718
  19. Jul 03, 2014
  20. Jun 13, 2014
    • Matthew Jordan's avatar
      stasis: Reduce creation of channel snapshots to improve performance · 9cc1a8e8
      Matthew Jordan authored
      During some performance testing of Asterisk with AGI, ARI, and lots of Local
      channels, we noticed that there's quite a hit in performance during channel
      creation and releasing to the dialplan (ARI continue). After investigating
      the performance spike that occurs during channel creation, we discovered
      that we create a lot of channel snapshots that are technically unnecessary.
      This includes creating snapshots during:
       * AGI execution
       * Returning objects for ARI commands
       * During some Local channel operations
       * During some dialling operations
       * During variable setting
       * During some bridging operations
      And more.
      
      This patch does the following:
       - It removes a number of fields from channel snapshots. These fields were
         rarely used, were expensive to have on the snapshot, and hurt performance.
         This included formats, translation paths, Log Call ID, callgroup, pickup
         group, and all channel variables. As a result, AMI Status,
         "core show channel", "core show channelvar", and "pjsip show channel" were
         modified to either hit the live channel or not show certain pieces of data.
         While this is unfortunate, the performance gain from this patch is worth
         the loss in behaviour.
       - It adds a mechanism to publish a cached snapshot + blob. A large number of
         publications were changed to use this, including:
         - During Dial begin
         - During Variable assignment (if no AMI variables are emitted - if AMI
           variables are set, we have to make snapshots when a variable is changed)
         - During channel pickup
         - When a channel is put on hold/unhold
         - When a DTMF digit is begun/ended
         - When creating a bridge snapshot
         - When an AOC event is raised
         - During Local channel optimization/Local bridging
         - When endpoint snapshots are generated
         - All AGI events
         - All ARI responses that return a channel
         - Events in the AgentPool, MeetMe, and some in Queue
       - Additionally, some extraneous channel snapshots were being made that were
         unnecessary. These were removed.
       - The result of ast_hashtab_hash_string is now cached in stasis_cache. This
         reduces a large number of calls to ast_hashtab_hash_string, which reduced
         the amount of time spent in this function in gprof by around 50%.
      
      #ASTERISK-23811 #close
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/3568/
      ........
      
      Merged revisions 416211 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9cc1a8e8
  21. Jun 12, 2014
  22. Jun 11, 2014
  23. Jun 10, 2014
  24. Jun 08, 2014
  25. May 29, 2014
  26. May 28, 2014
    • Matthew Jordan's avatar
      Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messages · fb5690ce
      Matthew Jordan authored
      This patch addresses some aesthetic issues in Asterisk. These are all just
      minor tweaks to improve the look of the CLI when used in a variety of
      settings. Specifically:
       * A number of chatty verbose messages were removed or demoted to DEBUG
         messages. Verbose messages with a verbosity level of 5 or higher were -
         if kept as verbose messages - demoted to level 4. Several messages
         that were emitted at verbose level 3 were demoted to 4, as announcement
         of dialplan applications being executed occur at level 3 (and so the
         effects of those applications should generally be less).
       * Some verbose messages that only appear when their respective 'debug'
         options are enabled were bumped up to always be displayed.
       * Prefix/timestamping of verbose messages were moved to the verboser
         handlers. This was done to prevent duplication of prefixes when the
         timestamp option (-T) is used with the CLI.
       * Verbose magic is removed from messages before being emitted to
         non-verboser handlers. This prevents the magic in multi-line verbose
         messages (such as SIP debug traces or the output of DumpChan) from
         being written to files.
       * _Slightly_ better support for the "light background" option (-W) was
         added. This includes using ast_term_quit in the output of XML
         documentation help, as well as changing the "Asterisk Ready" prompt to
         bright green on the default background (which stands a better chance of
         being displayed properly than bright white).
      
      Review: https://reviewboard.asterisk.org/r/3547/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fb5690ce
  27. May 09, 2014
  28. Apr 18, 2014
    • Richard Mudgett's avatar
      Originated calls: Fix several originate call problems. · 51b6c496
      Richard Mudgett authored
      * Restore the reason value set by pbx_outgoing_attempt() to use
      AST_CONTROL_xxx values as all the consumers were expecting rather than
      cause codes.
      
      * Fixed the dial routines to set cause codes for more than just
      ast_request() so pbx_outgoing_attempt() reason codes will function.
      
      * Fix inconsistent locked_channel return status in pbx_outgoing_attempt().
      The chanel may not have been locked or the channel may have been a stale
      pointer.
      
      * Fixed the OutgoingSpoolFailed channel to run dialplan whenever the
      dialing fails for an originate exten and 1 < synchronous.
      
      * Fix incorrect ast_cond_wait() usage in pbx_outgoing_attempt().
      Indroduced by issue ASTERISK-22212 patch.
      
      * Made struct pbx_outgoing use the ao2 lock instead of its own lock for
      the cond wait mutex.  No sense in having two locks associated with the
      same struct when only one is needed.
      
      Review: https://reviewboard.asterisk.org/r/3421/
      ........
      
      Merged revisions 412581 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      51b6c496
  29. Apr 15, 2014
  30. Mar 07, 2014
    • Scott Griepentrog's avatar
      uniqueid: channel linkedid, ami, ari object creation with id's · 80ef9a21
      Scott Griepentrog authored
      Much needed was a way to assign id to objects on creation, and
      much change was necessary to accomplish it.  Channel uniqueids
      and linkedids are split into separate string and creation time
      components without breaking linkedid propgation.  This allowed
      the uniqueid to be specified by the user interface - and those
      values are now carried through to channel creation, adding the
      assignedids value to every function in the chain including the
      channel drivers. For local channels, the second channel can be
      specified or left to default to a ;2 suffix of first.  In ARI,
      bridge, playback, and snoop objects can also be created with a
      specified uniqueid.
      
      Along the way, the args order to allocating channels was fixed
      in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
      masquerade occurs.
      
      (closes issue ASTERISK-23120)
      Review: https://reviewboard.asterisk.org/r/3191/
      ........
      
      Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      80ef9a21
  31. Feb 22, 2014
  32. Feb 16, 2014
  33. Jan 31, 2014
    • Matthew Jordan's avatar
      CDRs: fix a variety of dial status problems, h/hangup handler creating CDRs · 66c46fba
      Matthew Jordan authored
      This patch fixes a number of small-ish problems that were noticed when
      witnessing the records that the FreePBX dialplan produces:
      (1) Mid-call events (as well as privacy options) have the ability to change the
          overall state of the Dial operation after the called party answers. This
          means that publishing the DialEnd event when the called party is premature;
          we have to wait for the execution of these subroutines to complete before
          we can signal the overall status of the DialEnd. This patch moves that
          publication and adds handlers for the mid-call events.
      (2) The AST_FLAG_OUTGOING channel flag is cleared if an after bridge goto
          datastore is detected. This flag was preventing CDRs from being recorded
          for all outbound channels that had a 'continue' option enabled on them by
          the Dial application.
      (3) The CDR engine now locks the 'Dial' application as being the CDR
          application if it detects that the current CDR has entered that app. This
          is similar to the logic that is done for Parking. In general, if we entered
          into Dial, then we want that CDR to record the application as such - this
          prevents pre-dial handlers, mid-call handlers, and other shenaniganry
          from changing the application value.
      (4) The CDR engine now checks for the AST_SOFTHANGUP_HANGUP_EXEC in more places
          to determine if the channel is in hangup logic or dead. In either case, we
          don't want to record changes in the channel.
      (5) The default option for "endbeforehexten" has been changed to "yes". In
          general, you don't want to see CDRs in the 'h' exten or in hangup logic.
          Since the semantics of that option changed in 12, it made sense to update
          the default value as well.
      (6) Finally, because we now have the ability to synchronize on the messages
          published to the CDR topic, on shutdown the CDR engine will now synchronize
          to the messages currently in flight. This helps to ensure that all
          in-flight CDRs are written before shutting down.
      
      (closes issue ASTERISK-23164)
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/3154
      ........
      
      Merged revisions 407084 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      66c46fba
  34. Jan 22, 2014
  35. Jan 14, 2014
    • Richard Mudgett's avatar
      verbosity: Fix performance of console verbose messages. · 828f339a
      Richard Mudgett authored
      The per console verbose level feature as previously implemented caused a
      large performance penalty.  The fix required some minor incompatibilities
      if the new rasterisk is used to connect to an earlier version.  If the new
      rasterisk connects to an older Asterisk version then the root console
      verbose level is always affected by the "core set verbose" command of the
      remote console even though it may appear to only affect the current
      console.  If an older version of rasterisk connects to the new version
      then the "core set verbose" command will have no effect.
      
      * Fixed the verbose performance by not generating a verbose message if
      nothing is going to use it and then filtered any generated verbose
      messages before actually sending them to the remote consoles.
      
      * Split the "core set debug" and "core set verbose" CLI commands to remove
      the per module verbose support that cannot work with the per console
      verbose level.
      
      * Added a silent option to the "core set verbose" command.
      
      * Fixed "core set debug off" tab completion.
      
      * Made "core show settings" list the current console verbosity in addition
      to the root console verbosity.
      
      * Changed the default verbose level of the 'verbose' setting in the
      logger.conf [logfiles] section.  The default is now to once again follow
      the current root console level.  As a result, using the AMI Command action
      with "core set verbose" could again set the root console verbose level and
      affect the verbose level logged.
      
      (closes issue AST-1252)
      Reported by: Guenther Kelleter
      
      Review: https://reviewboard.asterisk.org/r/3114/
      ........
      
      Merged revisions 405431 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 405432 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      828f339a
  36. Dec 19, 2013
    • Matthew Jordan's avatar
      app_cdr,app_forkcdr,func_cdr: Synchronize with engine when manipulating state · 7e9febbf
      Matthew Jordan authored
      When doing the rework of the CDR engine that pushed all of the logic into cdr.c
      and made it respond to changes in channel state over Stasis, we knew that
      accessing the CDR engine from the dialplan would be "slightly"
      non-deterministic. Dialplan threads would be accessing CDRs while Stasis
      threads would be updating the state of said CDRs - whereas in the past,
      everything happened on the dialplan threads. Tests have shown that "slightly"
      is in reality "very".
      
      This patch synchronizes things by making the dialplan applications/functions
      that manipulate CDRs do so over Stasis. ForkCDR, NoCDR, ResetCDR, CDR, and
      CDR_PROP now all use Stasis to send their requests over to the CDR engine,
      and synchronize on the channel Stasis topic via a subscription so that they
      return their values/control to the dialplan at the appropriate time.
      
      While going through this, the following changes were also made:
       * DISA, which can reset the CDR when a user successfully authenticates, now
         just uses the ResetCDR app to do this. This prevents having to duplicate
         the same Stasis synchronization logic in that application.
       * Answer no longer disables CDRs. It actually didn't work anyway - calling
         DISABLE on the channel's CDR doesn't stop the CDR from getting the Answer
         time - it just kills all CDRs on that channel, which isn't what the caller
         would intend.
      
      (closes issue ASTERISK-22884)
      (closes issue ASTERISK-22886)
      
      Review: https://reviewboard.asterisk.org/r/3057/
      ........
      
      Merged revisions 404294 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7e9febbf
  37. Dec 18, 2013
  38. Dec 16, 2013
Loading