Events stored in the master domain streaming DB
Location path
| Path in the build directory | Description |
|---|---|
|
|
|
Overview
A set of assets filtering events and their field composition between generation in the system and sending to subscribers and brokers.
Based on metadata files:
-
generated events are filtered;
-
the field composition of generated events is filtered.
The list and description of event classes, event types, and their fields are available in the section.
Class and event type composition descriptor (events.json)
List of event classes and the event types contained in them.
Each event class listed must have a separate directory in the events folder, inside which for each event type of that class there must be a file describing the event field composition.
[
{
"class": str,
"events": array<str>
},
...
]
-
class– event class name. -
events– list of event type names included in the class.
events.json example
Lists all master domain event classes and the event types included in them
[
{
"class": "callevents",
"events": [
"call_asr",
"call_rec_links",
"dlg_binding",
"dlg_call",
"dlg_dead",
"dlg_init",
"dlg_pickup",
"dlg_start",
"dlg_stop",
"fork_answer",
"fork_cancel",
"fork_preanswer",
"fork_redirect",
"fork_start",
"fork_stop",
"hold",
"invite",
"media_migrate_done",
"rec_info",
"records_moved",
"refer",
"replaces_invite",
"replaces_refer",
"route",
"route_feature",
"route_fin",
"route_redirect",
"route_referred",
"route_replacing",
"route_dead",
"unhold",
"user_redirect"
],
"partition": {
"cdr": {
"fields": [
"invitedt"
],
"template": "datemonth"
}
}
},
{
"class": "confevents",
"events": [
"call_attach",
"call_detach",
"conf_dead",
"conf_init",
"conf_rec_links",
"conf_start",
"conf_stop",
"fork_answer",
"fork_preanswer",
"fork_start",
"fork_stop"
]
}
]
Event type field descriptor
Event class directory. Named after the class. Contains descriptor files for all event types of the class, their fields, and value types in the DB. File names correspond to event type names.
{
"class": str,
"type": str,
"fields": [
{
"name": str,
"type": "varchar" | "bigserial" | "timestamp" | "uuid" | "integer",
"required": true | false
},
...
]
}
-
class– event class name (duplicate of the directory name). -
type– event type name (duplicate of the file name). -
fields– list of fields stored in the DB (essentially the table structure):-
name– event field name and simultaneously the DB table column name. -
type– value type of the column in the DB table. -
required– field required flag (defaultfalse). -
default– default value (for fields withrequired = false)
-
Example
Example file for the callevents.dlg_start event type, location /callevents/dlg_start.json.
{
"class": "callevents",
"type": "dlg_start",
"fields": [
{ "name": "id", "type": "bigserial" },
{ "name": "acallid", "type": "varchar", "required":true },
{ "name": "dialogid", "type": "varchar" },
{ "name": "alocaluri", "type": "varchar" },
{ "name": "alocaltag", "type": "varchar" },
{ "name": "aremoteuri", "type": "varchar" },
{ "name": "bcallid", "type": "varchar" },
{ "name": "blocaluri", "type": "varchar" },
{ "name": "blocaltag", "type": "varchar" },
{ "name": "bremoteuri", "type": "varchar" },
{ "name": "usemedia", "type": "bool" },
{ "name": "mgc", "type": "varchar" },
{ "name": "msid", "type": "varchar" },
{ "name": "reclinks", "type": "varchar" },
{ "name": "isrec", "type": "boolean" },
{ "name": "invitets", "type": "bigint" },
{ "name": "eventts", "type": "timestamp" },
{ "name": "acallidhash", "type": "bigint" },
{ "name": "dialogidhash", "type": "bigint" },
{ "name": "cid", "type": "uuid" },
{ "name": "invitedt", "type": "timestamp"},
{ "name": "aremoteparty", "type": "varchar" },
{ "name": "aremotecontact", "type": "varchar" },
{ "name": "bremotecontact", "type": "varchar" },
{ "name": "ausername", "type": "varchar" },
{ "name": "adomain", "type": "varchar" },
{ "name": "adisplayname", "type": "varchar" },
{ "name": "anetworkaddr", "type": "varchar" },
{ "name": "acallednum", "type": "varchar" },
{ "name": "arepresentative", "type": "varchar" },
{ "name": "aouter", "type": "boolean" },
{ "name": "aprovidercode", "type": "varchar" },
{ "name": "busername", "type": "varchar" },
{ "name": "bdomain", "type": "varchar" },
{ "name": "bdisplayname", "type": "varchar" },
{ "name": "bnetworkaddr", "type": "varchar" },
{ "name": "bouter", "type": "boolean" },
{ "name": "bprovidercode", "type": "varchar" },
{ "name": "anumber", "type": "varchar" },
{ "name": "bnumber", "type": "varchar" },
{ "name": "ctxscridm", "type": "varchar" },
{ "name": "ctxscridd", "type": "varchar" },
{ "name": "relates", "type": "varchar" }
]
}