From 452f0eeb57ba8f6f9fc4737fa96a05a2b0d8e91b Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Wed, 21 Jan 2015 13:27:13 +0000 Subject: AMI: Add documentation for the missing Cdr/CEL events. This patch adds AMI event documentation for the Cdr and CEL AMI events. Note that while these events do share fields with each other and with other channel related events, they do not contain all of the fields in a standard channel snapshot, nor is the description of the fields identical. As such, the patch opts for documentation for each field, for each event. Review: https://reviewboard.asterisk.org/r/4350/ ASTERISK-24671 #close Reported by: Dan Jenkins git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@430862 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- cdr/cdr_manager.c | 126 ++++++++++++++++++++++++++++++++++++++++++ cel/cel_manager.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 286 insertions(+) diff --git a/cdr/cdr_manager.c b/cdr/cdr_manager.c index 97e51e1fc..4fd5fdf61 100644 --- a/cdr/cdr_manager.c +++ b/cdr/cdr_manager.c @@ -38,6 +38,132 @@ core ***/ +/*** DOCUMENTATION + + + Raised when a CDR is generated. + + + The account code of the Party A channel. + + + The Caller ID number associated with the Party A in the CDR. + + + The dialplan extension the Party A was executing. + + + The dialplan context the Party A was executing. + + + The Caller ID name associated with the Party A in the CDR. + + + The channel name of the Party A. + + + The channel name of the Party B. + + + The last dialplan application the Party A executed. + + + + The parameters passed to the last dialplan application the + Party A executed. + + + + The time the CDR was created. + + + + The earliest of either the time when Party A answered, or + the start time of this CDR. + + + + + The time when the CDR was finished. This occurs when the + Party A hangs up or when the bridge between Party A and + Party B is broken. + + + + The time, in seconds, of EndTime - StartTime. + + + The time, in seconds, of AnswerTime - StartTime. + + + The final known disposition of the CDR. + + + The channel was not answered. This is the default disposition. + + + The channel attempted to dial but the call failed. + + The congestion setting in cdr.conf can result + in the AST_CAUSE_CONGESTION hang up cause or the + CONGESTION dial status to map to this disposition. + + + + + The channel attempted to dial but the remote party was busy. + + + The channel was answered. The hang up cause will no longer + impact the disposition of the CDR. + + + The channel attempted to dial but the remote party was congested. + + + + + A flag that informs a billing system how to treat the CDR. + + + This CDR should be ignored. + + + This CDR contains valid billing data. + + + This CDR is for documentation purposes. + + + + + A unique identifier for the Party A channel. + + + + A user defined field set on the channels. If set on both the Party A + and Party B channel, the userfields of both are concatenated and + separated by a ;. + + + + + + The Cdr event is only raised when the + cdr_manager backend is loaded and registered with + the CDR engine. + + + + This event can contain additional fields depending on the configuration + provided by cdr_manager.conf. + + + + + + ***/ + #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") diff --git a/cel/cel_manager.c b/cel/cel_manager.c index f0d081c8d..b3ff6a5de 100644 --- a/cel/cel_manager.c +++ b/cel/cel_manager.c @@ -33,6 +33,166 @@ core ***/ +/*** DOCUMENTATION + + + Raised when a Channel Event Log is generated for a channel. + + + + The name of the CEL event being raised. This can include + both the system defined CEL events, as well as user defined + events. + + + All events listed here may not be raised, depending + on the configuration in cel.conf. + + + + A channel was created. + + + A channel was terminated. + + + A channel answered. + + + A channel was hung up. + + + A channel entered a bridge. + + + A channel left a bridge. + + + A channel entered into a tracked application. + + + A channel left a tracked application. + + + A channel was parked. + + + A channel was unparked. + + + A channel initiated a blind transfer. + + + A channel initiated an attended transfer. + + + A channel initated a call pickup. + + + A channel is being forwarded to another destination. + + + The linked ID associated with this channel is being retired. + + + A Local channel optimization has occurred. + + + A user defined type. + + + This event is only present if show_user_defined + in cel.conf is True. Otherwise, + the user defined event will be placed directly in the + EventName field. + + + + + + + The channel's account code. + + + The Caller ID number. + + + The Caller ID name. + + + The Caller ID Automatic Number Identification. + + + The Caller ID Redirected Dialed Number Identification Service. + + + The Caller ID Dialed Number Identifier. + + + The dialplan extension the channel is currently executing in. + + + The dialplan context the channel is currently executing in. + + + The dialplan application the channel is currently executing. + + + The arguments passed to the dialplan Application. + + + The time the CEL event occurred. + + + A flag that informs a billing system how to treat the CEL. + + + This event should be ignored. + + + This event contains valid billing data. + + + This event is for documentation purposes. + + + + + The unique ID of the channel. + + + The linked ID of the channel, which ties this event to other related channel's events. + + + + A user defined field set on a channel, containing arbitrary + application specific data. + + + + + If this channel is in a bridge, the channel that it is in + a bridge with. + + + + + If this channel is in a bridge, the accountcode of the + channel it is in a bridge with. + + + + + Some events will have event specific data that accompanies the CEL record. + This extra data is JSON encoded, and is dependent on the event in + question. + + + + + + ***/ + #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -- cgit v1.2.3