Alert (alertcall)

Description

Deferred alert to a set of address book subscribers.
Initiates dialing numbers and auto-servicing in an IVR script. The script determines whether the alert succeeded. The script result determines whether the subscriber needs to be called again.

Limitations

  • The collection is unavailable in the master domain.

  • Can be changed only before dialing starts.

  • Contains current aggregated statistics on alert results in its data.

Fields

Entity structure
{
  "id": uuid,
  "code": str,
  "name": str,
  "dtstart": date,
  "dtstop": date,
  "ivrscriptcode": str,
  "mediafile": str,
  "groups": array<str>,
  "abonents": array<int>,
  "opts": {
    "comment": str,
    "site": str,
    "trunkcount": int,
    "attemptcount": int,
    "attempttimeoutsec": int,
    "callerid": str,
    "callername": str,
    "calltimeout": int,
    "status": str,
    "statresults": object,
    "dtstarted": str,
    "dtstopped": 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: code
Mode: in
Type: str
Default: required

Code. Used to associate with other entities.

Field: name
Mode: in
Type: str
Default: required

Name

Field: dtstart
Mode: in
Type: date | str_empty
Default: str_empty

Automatic activation time in UTC.
RFC3339 format.
To activate the alert, set the time in the past.

Field: dtstop
Mode: in
Type: date | str_empty
Default: str_empty

Automatic deactivation time in UTC.
RFC3339 format.
For the alert to be activated, the set time must not be in the past.

Field: ivrscriptcode
Mode: in
Type: str
Default: required

Alert script code.
It effectively implements the alert type, for example:
- "with confirmation" – the alert confirmation component in the script is placed after DTMF reading, - "call back if less than …​ was listened to" – the alert confirmation component in the script is placed after a timeout during background playback, - "do not call again if the script started and began playback" – the alert confirmation component is placed at the very beginning of the script.

Field: mediafile
Mode: in
Type: str
Default: empty

Name of the audio file to play to subscribers.
Substituted by the alert support script; intended to simplify alert configuration without editing scripts.
The file must first be placed in the alert files directory (directly or via API).

Field: groups
Mode: in
Type: array<str>
Default: empty

List of codes of address book contact groups (the code field) to alert. Required if abonents is not specified.

Field: abonents
Mode: in
Type: array<int>
Default: empty

List of numeric identifiers of address book contacts (the autokey field) to alert. Required if groups is not specified.

Field: opts
Mode: in
Type: object
Compound field

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

Arbitrary comment

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

Service site

Field: opts.trunkcount
Mode: in
Type: int
Default: 1

Maximum number of trunks for the alert

Field: opts.attemptcount
Mode: in
Type: int
Default: 1

Maximum number of attempts per subscriber

Field: opts.attempttimeoutsec
Mode: in
Type: int
Default: 10

Pause after a failed subscriber call, in seconds

Field: opts.callerid
Mode: in
Type: str
Default: "100"

Number/username of the initiator when calling subscribers (SIP)

Field: opts.callername
Mode: in
Type: str
Default: "AlertMachine"

Display name of the initiator when calling subscribers (SIP)

Field: opts.calltimeout
Mode: in
Type: int
Default: 30

Subscriber call timeout

Field: opts.status
Mode: out
Type: str
Default: "planned"

Alert state

Field: opts.statresults
Mode: out
Type: object
Default: — 

Alert results.

Example:
{
  "answered":1,
  "approved":1,
  "finished":2,
  "incall":0,
  "indelay":1,
  "new":0,
  "prepared":0,
  "total":3
}
  • answered – number of subscribers who answered.

  • approved – number of subscribers who confirmed.

  • finished – number of finished subscribers.

  • incall – number of subscribers being serviced.

  • indelay – number of subscribers waiting for a retry call.

  • new – number of subscribers waiting for the first call.

  • prepared – number of subscribers ready for a call.

  • total – total number of subscribers in the alert list.

Field: opts.dtstarted
Mode: out
Type: str
Default: — 

Report on the alert start time

Field: opts.dtstopped
Mode: out
Type: str
Default: — 

Report on the alert completion time

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

See also

Logical roles