aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/event_defs.h
AgeCommit message (Collapse)AuthorFilesLines
2009-07-11Add an API for reporting security events, and a security event logging module.russell1-38/+59
This commit introduces the security events API. This API is to be used by Asterisk components to report events that have security implications. A simple example is when a connection is made but fails authentication. These events can be used by external tools manipulate firewall rules or something similar after detecting unusual activity based on security events. Inside of Asterisk, the events go through the ast_event API. This means that they have a binary encoding, and it is easy to write code to subscribe to these events and do something with them. One module is provided that is a subscriber to these events - res_security_log. This module turns security events into a parseable text format and sends them to the "security" logger level. Using logger.conf, these log entries may be sent to a file, or to syslog. One service, AMI, has been fully updated for reporting security events. AMI was chosen as it was a fairly straight forward service to convert. The next target will be chan_sip. That will be more complicated and will be done as its own project as the next phase of security events work. For more information on the security events framework, see the documentation generated from doc/tex/. "make asterisk.pdf" Review: https://reviewboard.asterisk.org/r/273/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@206021 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26Merge the new Channel Event Logging (CEL) subsystem.russell1-9/+149
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: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-03Add 'bitflags'-style information elements to event frameworkkpfleming1-0/+2
This patch add a new payload type for information elements, a set of bit flags. The payload is transported as a 32-bit unsigned integer but when matching is performed between events and subscribers, the matching is done by using a bitwise AND instead of numeric value comparison. Review: http://reviewboard.asterisk.org/r/242/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191919 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-10Merge some more changes from team/russell/eventsrussell1-15/+42
This commit pulls in a batch of improvements and additions to the event API. Changes include: - the ability to dynamically build a subscription. This is useful if you're building a subscription based on something you receive from the network, or from options in a configuration file. - Add tables of event types and IE types and the corresponding string representation for implementing text based protocols that use these events, for showing events on the CLI, reading configuration that references event information, among other things. - Add a table that maps IE types and the corresponding payload type. - an API call to get the total size of an event - an API call to get all events from the cache that match a subscription - a new IE payload type, raw, which I used for transporting the Entity ID in my code for handling distributed device state. - Code improvements to reduce code duplication - Include the Entity ID of the server that originated the event in every event - an additional event type, DEVICE_STATE_CHANGE, to help facilitate distributed device state. DEVICE_STATE is a state change on one server, DEVICE_STATE_CHANGE is the aggregate device state change across all servers. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121555 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29Add API calls for iterating through an event. This should allow events to ↵file1-0/+1
have multiple information elements (while there was nothing preventing it before you could not actually access any except the first one). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81334 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-09Fix a problem that I had introduced into MWI handling. I had ignoredrussell1-0/+6
the mailbox context. Now, all related MWI event dealings pay attention to the context as well. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-01Merge major changes to the way device state is passed around Asterisk. The tworussell1-5/+21
places that cared about device states were app_queue and the hint code in pbx.c. The changes include converting it to use the Asterisk event system, as well as other efficiency improvements. * app_queue: This module used to register a callback into devicestate.c to monitor device state changes. Now, it is just a subscriber to Asterisk events with the type, device state. * pbx.c hints: Previously, the device state processing thread in devicestate.c would call ast_hint_state_changed() each time the state of a device changed. Then, that code would go looking for all the hints that monitor that device, and call their callbacks. All of this blocked the device state processing thread. Now, the hint code is a subscriber of Asterisk events with the type, device state. Furthermore, when this code receives a device state change event, it queues it up to be processed by another thread so that it doesn't block one of the event processing threads. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66958 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-31Issue #9842 - Doxygen updates by snuffy. Thanks!oej1-1/+1
(Committed from Media Plaza in Utrecht, Netherlands - Open Source VoIP conference) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66705 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-28Merge changes from team/russell/eventsrussell1-0/+120
This set of changes introduces a new generic event API for use within Asterisk. I am still working on a way for events to be shared between servers, but this part is ready and can already be used inside of Asterisk. This set of changes introduces the first use of the API, as well. I have restructured the way that MWI (message waiting indication) is handled. It is now event based instead of polling based. For example, if there are a bunch of SIP phones subscribed to mailboxes, then chan_sip will not have to constantly poll the mailboxes for changes. app_voicemail will generate events when changes occur. See UPGRADE.txt and CHANGES for some more information on the effects of these changes from the user perspective. For developer information, see the text in include/asterisk/event.h. As always, additional feedback is welcome on the asterisk-dev mailing list. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62292 f38db490-d61c-443f-a65b-d21fe96a405b