summaryrefslogtreecommitdiff
path: root/include/asterisk/cel.h
AgeCommit message (Collapse)Author
2017-03-30CEL: Remove header declarations of non-existant functions.Corey Farrell
ast_cel_alloc and ast_cel_destroy do not exist in code, remove them from the headers. Change-Id: I99ce848e2e109e7d61771559f559b9e57973e45c
2015-04-09clang compiler warnings: Fix autological comparisonsMatthew Jordan
This fixes autological comparison warnings in the following: * chan_skinny: letohl may return a signed or unsigned value, depending on the macro chosen * func_curl: Provide a specific cast to CURLoption to prevent mismatch * cel: Fix enum comparisons where the enum can never be negative * enum: Fix comparison of return result of dn_expand, which returns a signed int value * event: Fix enum comparisons where the enum can never be negative * indications: tone_data.freq1 and freq2 are unsigned, and hence can never be negative * presencestate: Use the actual enum value for INVALID state * security_events: Fix enum comparisons where the enum can never be negative * udptl: Don't bother to check if the return value from encode_length is less than 0, as it returns an unsigned int * translate: Since the parameters are unsigned int, don't bother checking to see if they are negative. The cast to unsigned int would already blow past the matrix bounds. * res_pjsip_exten_state: Use a temporary value to cache the return of ast_hint_presence_state * res_stasis_playback: Fix enum comparisons where the enum can never be negative * res_stasis_recording: Add an enum value for the case where the recording operation is in error; fix enum comparisons * resource_bridges: Use enum value as opposed to -1 * resource_channels: Use enum value as opposed to -1 Review: https://reviewboard.asterisk.org/r/4533 ASTERISK-24917 Reported by: dkdegroot patches: rb4533.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434469 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 434470 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-27Restore usefulness of the CEL Peer fieldKinsey Moore
This change makes the CEL peer field useful again for BRIDGE_ENTER and BRIDGE_EXIT events and fills the field with a comma-separated list of all channels in the bridge other than the channel that is entering or exiting the bridge. Review: https://reviewboard.asterisk.org/r/2840/ (closes issue ASTERISK-22393) ........ Merged revisions 399912 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22Make CEL behavior conform to the documentationKinsey Moore
This modifies the behavior of the CEL engine to conform to documented behavior for Asterisk 12 as defined on the wiki https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CEL+Specification The primary changes deal with removal of the peer field from function calls since it is no longer directly relevant to the bridging system and removal of the layer of CDR-like business logic that was providing a partial emulation of Asterisk 11 CEL functionality. With this change, there is no longer a distinction between "bridges" and "conferences" and all participation changes are denoted with bridge enter and bridge exit messages. This updates the CEL unit tests to handle these changes and simplifies some of the macros used in the process. This also fixes a segfault when attempting to ref a configuration that failed to load. Review: https://reviewboard.asterisk.org/r/2788/ (issue ASTERISK-21567) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-17Refactor CEL to avoid using the event system coreKinsey Moore
This removes usage of the event system for CEL backend data distribution and strips unused pieces out of the event system. Review: https://reviewboard.asterisk.org/r/2732/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20Add CEL local optimization record typeKinsey Moore
This adds a new CEL event type, AST_CEL_LOCAL_OPTIMIZE, to represent local channel optimizations. Local channel optimizations were one of several things conveyed by the now defunct BRIDGE_UPDATE event type. This also adds a unit test to test generation of this new CEL event. Review: https://reviewboard.asterisk.org/r/2676/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-20Add transfer support to CELKinsey Moore
This adds CEL support for blind and attended transfers and call pickup. During the course of adding this functionality I noticed that CONF_ENTER, CONF_EXIT, and BRIDGE_TO_CONF events are particularly useless without a bridge identifier, so I added that as well. This adds tests for blind transfers, several types of attended transfers, and call pickup. The extra field in CEL records now consists of a JSON blob whose fields are defined on a per-event basis. Review: https://reviewboard.asterisk.org/r/2658/ (closes issue ASTERISK-21565) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-02Add CEL unit tests and do some cleanupKinsey Moore
This adds several unit tests for CEL functionality and provides the requisite framework for creating additional unit tests. This also cleans up some reference leaks that were occurring in Stasis-Core message callback code. Review: https://reviewboard.asterisk.org/r/2646/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25CEL refactoring cleanupKinsey Moore
This change removes AST_CEL_BRIDGE_UPDATE since it should no longer be used because masquerade situations are now accounted for in other ways. This also refactors usage of AST_CEL_FORWARD to be produced by a Dial message which has been extended with a "forward" field. (closes issue ASTERISK-21566) Review: https://reviewboard.asterisk.org/r/2635/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-19Pull CEL linkedid manipulation into cel.cKinsey Moore
This finishes moving all CEL linkedid tracking entirely within cel.c since that is now possible with channel snapshots. This also removes another CEL linkedid manipulation function from cel.h that has already been internalized and is neither called nor available to link against. Review: https://reviewboard.asterisk.org/r/2632/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-17Update Asterisk's CDRs for the new bridging frameworkMatthew Jordan
This patch is the initial push to update Asterisk's CDR engine for the new bridging framework. This patch guts the existing CDR engine and builds the new on top of messages coming across Stasis. As changes in channel state and bridge state are detected, CDRs are built and dispatched accordingly. This fundamentally changes CDRs in a few ways. (1) CDRs are now *very* reflective of the actual state of channels and bridges. This means CDRs track well with what an actual channel is doing - which is useful in transfer scenarios (which were previously difficult to pin down). It does, however, mean that CDRs cannot be 'fooled'. Previous behavior in Asterisk allowed for CDR applications, channels, and other properties to be spoofed in parts of the code - this no longer works. (2) CDRs have defined behavior in multi-party scenarios. This behavior will not be what everyone wants, but it is a defined behavior and as such, it is predictable. (3) The CDR manipulation functions and applications have been overhauled. Major changes have been made to ResetCDR and ForkCDR in particular. Many of the options for these two applications no longer made any sense with the new framework and the (slightly) more immutable nature of CDRs. There are a plethora of other changes. For a full description of CDR behavior, see the CDR specification on the Asterisk wiki. (closes issue ASTERISK-21196) Review: https://reviewboard.asterisk.org/r/2486/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13Refactor CEL bridge events on top of Stasis-CoreKinsey Moore
This pulls bridge-related CEL event triggers out of the code in which they were residing and pulls them into cel.c where they are now triggered by changes in bridge snapshots. To get access to the Stasis-Core parking topic in cel.c, the Stasis-Core portions of parking init have been pulled into core Asterisk init. This also adds a new CEL event (AST_CEL_BRIDGE_TO_CONF) that indicates a two-party bridge has transitioned to a multi-party conference. The reverse cannot occur in CEL terms even though it may occur in actuality and two party bridges which receive a AST_CEL_BRIDGE_TO_CONF will be treated as multi-party conferences for the duration of the bridge. Review: https://reviewboard.asterisk.org/r/2563/ (closes issue ASTERISK-21564) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-22Fix race condition for CEL LINKEDID_END eventTerry Wilson
This patch fixes to situations that could cause the CEL LINKEDID_END event to be missed. 1) During a core stop gracefully, modules are unloaded when ast_active_channels == 0. The LINKDEDID_END event fires during the channel destructor. This means that occasionally, the cel_* module will be unloaded before the channel is destroyed. It seemed generally useful to wait until the refcount of all channels == 0 before unloading, so I added a channel counter and used it in the shutdown code. 2) During a masquerade, ast_channel_change_linkedid is called. It calls ast_cel_check_retire_linkedid which unrefs the linkedid in the linkedids container in cel.c. It didn't ref the new linkedid. Now it does. Review: https://reviewboard.asterisk.org/r/1900/ ........ Merged revisions 367292 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 367299 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@367309 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-26Merged revisions 337974 via svnmerge from Richard Mudgett
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r337974 | rmudgett | 2011-09-26 14:35:23 -0500 (Mon, 26 Sep 2011) | 37 lines Merged revisions 337973 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r337973 | rmudgett | 2011-09-26 14:30:39 -0500 (Mon, 26 Sep 2011) | 30 lines Fix deadlock when using dummy channels. Dummy channels created by ast_dummy_channel_alloc() should be destoyed by ast_channel_unref(). Using ast_channel_release() needlessly grabs the channel container lock and can cause a deadlock as a result. * Analyzed use of ast_dummy_channel_alloc() and made use ast_channel_unref() when done with the dummy channel. (Primary reason for the reported deadlock.) * Made app_dial.c:dial_exec_full() not call ast_call() holding any channel locks. Chan_local could not perform deadlock avoidance correctly. (Potential deadlock exposed by this issue. Secondary reason for the reported deadlock since the held lock was part of the deadlock chain.) * Fixed some uses of ast_dummy_channel_alloc() not checking the returned channel pointer for failure. * Fixed some potential chan=NULL pointer usage in func_odbc.c. Protected by testing the bogus_chan value. * Fixed needlessly clearing a 1024 char auto array when setting the first char to zero is enough in manager.c:action_getvar(). (closes issue ASTERISK-18613) Reported by: Thomas Arimont Patches: jira_asterisk_18613_v1.8.patch (license #5621) patch uploaded by rmudgett Tested by: Thomas Arimont ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-23Merged revisions 283230 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r283230 | russell | 2010-08-23 08:23:12 -0500 (Mon, 23 Aug 2010) | 7 lines Make the AST_CEL_AMA enum match up with the AST_CDR_ ama flag values. Really, having 2 enums for this is silly and error prone, demonstrated by the crash that I hit because there was an assumption in the code that the values in each matched up. However, this is a quick fix to get them to match up so it will work. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-19Add a todo item for CEL.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@282798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-21Change all refererences to 1.6.3 to be 1.8, since that will be the next ↵Kevin P. Fleming
feature release git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@235904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26Merge the new Channel Event Logging (CEL) subsystem.Russell Bryant
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3