[asterisk-dev] [Code Review] [updated] This patch implements CEL in trunk.

Matthew Nicholson mnicholson at digium.com
Tue Apr 28 16:02:19 CDT 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/239/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

CEL stands for Channel Event Logging.

(It's big, so brace yourself!)

It's like the Manager interface, but a little
more specialized to report events that would
be used to form CDRs or call activity logs.
It logs to a set of backends much like CDR's
do. Higher performance event loggers can be
written on the CEL base, that would provide
better thruput for generating higher-level
event-based logging, like CDR's.

It's based in turn on Russell's event facility,
and expands on its base, and shares in its
advantages. For instance, the 
ast_event_subscribe() func has been modified
to accept a "name" argument for the subscription,
for CLI viewing.

It also introduces a new channel field, the
'linkedid' field, that has 'viral' properties;
when two channels interact, the oldest linkedid
value of the two will override the younger. The 
linkedID field starts being set to the uniqueID 
field. All the channel drivers 'new' routines will
also now accept a linkedid argument, in the
which, if provided, will override the linkedid
field. This would happen, for instance, in the
Dial() app, when a peer channel is created 
for the purpose of a call. From it's creation,
that peer channel will have the same linkedid
as the calling channel.

The linkedid field will be generated (by default)
on all CEL logged events, and can be used to tie
multi-legged calls and perhaps even call trees
formed by 3-ways and transfers.

Brian Degenhardt of SwitchVox formed a snazzy
real-time call logging facility using the CEL
text logging backends.

Analogs to the CDR backends were formed for
CEL event logging. It's been a while since they
were originally formed, and they may profit 
from an overhaul to re-derive them from the 
CDR backends. The TDS backend has been
recently re-derived, as the old version no
longer compiles against the newer TDS libs.
The odbc_adaptive interface has not been
adapted for CEL, but this is always an option
for the future.

hangupsource is also now being recorded into
a channel field by that name.

A long and perhaps tedious design doc about
CEL is in doc/cel-doc.tex

I added 'peeraccount', and 'linkedid' to the
existing CDR code; these may be useful to
folks who want to continue arranging deck chairs
on the CDR Titanic.

Peeraccount: when two channels are bridged,
they each update their peeraccount field with
the accountcode of their partner in their
respective 'peeraccount' channel fields.
The CDR field is updated, and a new manager
event is generated. The peeraccount info
is reported in CEL events.


Although reviewers may have issues of their own,
my major questions are these:

1. Should I just eliminate the cel-csv interface,
and let everyone use the cel-custom interface if
they want text logging?

2. Should I bring in the odbc-adaptive stuff?

3. Should I re-derive all the backends from
the cdr backends as they exist today?

4. Are the current tracked events sufficient
for CDR generation which I'm specifying
now in team/murf/RFCs?

(copied from http://reviewboard.digium.com/r/105 )
This version of the patch has been updated for the latest version of trunk as of 2009-04-28.


Diffs
-----

  /trunk/apps/app_meetme.c 190942 
  /trunk/apps/app_followme.c 190942 
  /trunk/apps/app_confbridge.c 190942 
  /trunk/apps/app_dial.c 190942 
  /trunk/apps/app_directed_pickup.c 190942 
  /trunk/apps/app_chanisavail.c 190942 
  /trunk/apps/app_celgenuserevent.c PRE-CREATION 
  /trunk/CHANGES 190942 
  /trunk/Makefile 190942 
  /trunk/apps/app_minivm.c 190942 
  /trunk/apps/app_parkandannounce.c 190942 
  /trunk/apps/app_queue.c 190942 
  /trunk/apps/app_voicemail.c 190942 
  /trunk/bridges/bridge_builtin_features.c 190942 
  /trunk/cdr/cdr_sqlite.c 190942 
  /trunk/cel/Makefile PRE-CREATION 
  /trunk/cel/cel_adaptive_odbc.c PRE-CREATION 
  /trunk/cel/cel_custom.c PRE-CREATION 
  /trunk/cel/cel_manager.c PRE-CREATION 
  /trunk/cel/cel_pgsql.c PRE-CREATION 
  /trunk/cel/cel_radius.c PRE-CREATION 
  /trunk/cel/cel_sqlite.c PRE-CREATION 
  /trunk/cel/cel_sqlite3_custom.c PRE-CREATION 
  /trunk/cel/cel_tds.c PRE-CREATION 
  /trunk/channels/chan_agent.c 190942 
  /trunk/channels/chan_alsa.c 190942 
  /trunk/channels/chan_bridge.c 190942 
  /trunk/channels/chan_console.c 190942 
  /trunk/channels/chan_dahdi.c 190942 
  /trunk/channels/chan_gtalk.c 190942 
  /trunk/channels/chan_h323.c 190942 
  /trunk/channels/chan_iax2.c 190942 
  /trunk/channels/chan_jingle.c 190942 
  /trunk/channels/chan_local.c 190942 
  /trunk/channels/chan_mgcp.c 190942 
  /trunk/channels/chan_misdn.c 190942 
  /trunk/channels/chan_nbs.c 190942 
  /trunk/channels/chan_oss.c 190942 
  /trunk/channels/chan_phone.c 190942 
  /trunk/channels/chan_sip.c 190942 
  /trunk/channels/chan_skinny.c 190942 
  /trunk/channels/chan_unistim.c 190942 
  /trunk/channels/chan_usbradio.c 190942 
  /trunk/channels/chan_vpb.cc 190942 
  /trunk/configs/cel.conf.sample PRE-CREATION 
  /trunk/configs/cel_adaptive_odbc.conf.sample PRE-CREATION 
  /trunk/configs/cel_custom.conf.sample PRE-CREATION 
  /trunk/configs/cel_manager.conf.sample PRE-CREATION 
  /trunk/configs/cel_odbc.conf.sample PRE-CREATION 
  /trunk/configs/cel_pgsql.conf.sample PRE-CREATION 
  /trunk/configs/cel_sqlite3_custom.conf.sample PRE-CREATION 
  /trunk/configs/cel_tds.conf.sample PRE-CREATION 
  /trunk/doc/cel-doc.tex PRE-CREATION 
  /trunk/doc/celdriver.tex PRE-CREATION 
  /trunk/funcs/func_cdr.c 190942 
  /trunk/funcs/func_channel.c 190942 
  /trunk/funcs/func_odbc.c 190942 
  /trunk/include/asterisk/cdr.h 190942 
  /trunk/include/asterisk/cel.h PRE-CREATION 
  /trunk/include/asterisk/channel.h 190942 
  /trunk/include/asterisk/event.h 190942 
  /trunk/include/asterisk/event_defs.h 190942 
  /trunk/include/asterisk/utils.h 190942 
  /trunk/main/Makefile 190942 
  /trunk/main/asterisk.c 190942 
  /trunk/main/cdr.c 190942 
  /trunk/main/cel.c PRE-CREATION 
  /trunk/main/channel.c 190942 
  /trunk/main/cli.c 190942 
  /trunk/main/devicestate.c 190942 
  /trunk/main/dial.c 190942 
  /trunk/main/event.c 190942 
  /trunk/main/features.c 190942 
  /trunk/main/logger.c 190942 
  /trunk/main/manager.c 190942 
  /trunk/main/pbx.c 190942 
  /trunk/res/res_agi.c 190942 

Diff: http://reviewboard.digium.com/r/239/diff


Testing
-------

bmd has built a reporting system using it; I have run
several simple tests to ensure updating with merges
hasn't broken it, and made appropriate fixes.


Thanks,

Matthew




More information about the asterisk-dev mailing list