How to set own value on CHAN_START event in CEL table?

Hello,

When a call arrives, the CHAN_START event is generated in the CEL table, how can I insert data into this event in the UserField?

Or how to change any field in a given event?

Thank you.

By using a database trigger. The idea of CEL is to have fixed formats, that can be combined with post processing. If you want to add extra information, use a user defined event.

use a user defined event
What exactly do you mean? Can You have an example? Thank you.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_CELGenUserEvent

There is a usage example in Reporting and statistics — XiVO Solutions documentation However the interpretation of the extra field is dependent on the particular software product, and there is no requirement that it contain delimiter characters.

There is also an example in a recent version of Asterisk the Definitive Guide, but not one for which the text is freely available online.

Call UserEvent() in your dialplan… you might end up loving this function.

I don’t think UserEvent produces any CEL output. It is described as generating AMI and stasis events.

Probably referring to CELGenUserEvent[1].

[1] Asterisk 18 Application_CELGenUserEvent - Asterisk Project - Asterisk Project Wiki

Hello, I resolved my issue. I created trigger in the CEL table

CREATE TRIGGER cel_before_insert BEFORE INSERT ON cel FOR EACH ROW BEGIN
IF NEW.eventtype = ‘CHAN_START’ AND NEW.exten = ‘7470942440’ THEN
BEGIN
SET NEW.userfield = ‘gg55555555fff’;
END;
END IF;
END;