Automatic speech recognition rules for recorded conversations (asrrule)

Description

Rule for applying automatic recognition of a telephone conversation into text.
Applied after the conversation ends at the set time.
Works only when a connection to the recognition service is configured in the master domain (settings.record_asr_options).

In one telephone conversation, participants may belong to different domains.
The recognition decision process consists of
(1) Determining the call participants and their domains and preparing search parameters.
(2) Determining the recognition rule in the initiator’s domain.
(3) For a cross-domain call, determining the recognition rule in the called subscriber’s domain.
(4) Making the recognition decision based on a positive recording decision in at least one of the domains.
(5) Generating an event in each domain configured for recording and recognition.
By default, conversations are not sent for recognition.

Limitations

  • The collection is unavailable in the master domain.

Fields

Entity structure
{
  "id": uuid,
  "priority": int,
  "dir": str,
  "fromnumber": str,
  "tonumber": str,
  "crossdomain": str,
  "asr": intbool,
  "schedule": str,
  "periods": array<object>,
  "opts": {
    "title": str,
    "comment": str
  }
  "ext": {
    "ct": date,
    "lwt": date
  }
}
Table 1. Fields
Specification Description

Field: id
Mode: inout
Type: uuid
Default: generated

Identifier. Can be specified at creation, otherwise generated by the system.

Field: priority
Mode: in
Type: int
Default: required

Priority. A lower value means higher priority.

Field: dir
Mode: in
Type: str
Default: "*"

Filter by call direction.

Field: fromnumber
Mode: in
Type: str
Default: "*"

Call initiator number filter mask.
Filter operation modes.

Field: tonumber
Mode: in
Type: str
Default: "*"

Called subscriber number filter mask.
Filter operation modes.

Field: crossdomain
Mode: in
Type: str
Default: "*"

Other domain filter mask.
Applied only when servicing cross-domain calls.
Filter operation modes.

Field: asr
Mode: in
Type: intbool
Default: required

Action determinant.
1 – recognize, 0 – do not recognize.
If a cross-domain call finds different actions in both domains, recognition is performed but does not enter the domain that refused recognition.

Field: schedule
Mode: in
Type: str
Default: "all"

Field: periods
Mode: in
Type: array<object>
Default: empty

Activity interval during the week.
Applied when schedule = custom.
Each list element covers a specific segment within the week: from a time on a specific day of the week to a time on another specific day of the week.
The overall schedule is formed from the set of these segments.
Weekly schedule list element.

Field: opts
Mode: in
Type: object
Compound field

Field: opts.title
Mode: in
Type: str
Default: empty

Arbitrary title

Field: opts.comment
Mode: in
Type: str
Default: empty

Arbitrary comment

Field: ext
Mode: inout
Type: object
Compound field

Allows extending the compound with arbitrary keys and values

Field: ext.ct
Mode: out
Type: date
Default: generated

Object creation time

Field: ext.lwt
Mode: out
Type: date
Default: generated

Time of last modification of the object

Call direction filter options

Table 2. Call direction filter options
Value Description

"inner"

The rule can be applied only to intra-domain calls where both parties are subscribers of the current domain

"incoming"

The rule can be applied only to cross-domain calls where the called party is a subscriber of the current domain

"outgoing"

The rule can be applied only to cross-domain calls where the initiating party is a subscriber of the current domain

"*"

The rule can be applied to all calls where at least one party is a subscriber of the current domain

Filter operation modes

Table 3. Filter operation modes
Mode Description

Per-character

The value being checked is passed through the filter character by character.
The following special characters and combinations can be used:

  • X – any character;

  • ? – any character;

  • * – all remaining characters;

  • {F} and {f} – the entire From username value;

  • {T} and {t} – the entire To username value;

  • {E} and {e} – empty value.

If one of the service characters must be specified as a target, it should be enclosed in square brackets, e.g. [X].

For example, XX[X] – any three-character value with the character X at the end.

Regex

The Pattern template is applied to the source value.

Structure of the regex template value:
/reg/Pattern1.

For example,- value: "302"
- mask: "/reg/0"
- result: true.

  • value: "302"

  • mask: "/reg/^0$"

  • result: false.

  • value: "302"

  • mask: "/reg/^302$"

  • result: true.

  • value: "302"

  • mask: "/reg/^(301|302|305)$"

  • result: true.

All standard regular expression rules can be used when forming Pattern templates.

Range

"The value being checked is an integer and falls within the specified range of numeric values.

Structure of the dia template value:
/dia/FromValue+N - matches N+1 values from FromValue to FromValue+N.

For example,- value: "302"
- mask: "/dia/300+10"
- result: true.

Work schedule

Table 4. Work schedule
Value Description

"all"

The rule is always available for application

"disabled"

The rule is never available for application

"work"

The rule is available for application only during working hours

"non-work"

The rule is available for application only outside working hours

"custom"

The rule defines an individual availability schedule in the periods field

Weekly schedule list element

Table 5. Weekly schedule list element
Field Value Description

daystart

1 – 7

Day of week when the segment starts (1 – Mon, 7 – Sun)

daystop

1 – 7

Day of week when the segment ends (1 – Mon, 7 – Sun)

timestart

0 – 1440

Start time of the segment within the day, in minutes

timestop

0 – 1440

End time of the segment within the day, in minutes

See also

Logical roles

  • b2b applies recognition rules.

  • mware services the recognition queue.