Skip to content

Start informer call

Informer call

Method start.informer_call
API version v4.0
Description Informer call with an option to play a media file for a subscriber or transmit a text message. After the message is played, the call ends automatically.
Go back to list of methods

After the message is played to a subscriber, the call ends.

Parameters of a request

Title Type Required Valid value Description
access_token string yes Authentication session key
virtual_phone_number string yes

Virtual number, rented by client. Format should comply with the international standart E.164 (for example, 74993720692). Is always used as a caller's number when dialing a number of a contact. You can access virtual numbers via REST API method - Receiving a list of virtual numbers.

external_id string no Unique ID, that can be used to connect an event of a call with an outside system.
dtmf_string string no 0-9, *, # Assigns DTMF, that will be sent to a contact. You can specify timeout for when the DTMF symbol is going to be sent by using a symbol . = '1 second'. Example: .12.1..4, i.e. the number 12 will be sent in 1 second, a number 1 will be sent in another second, and than a number 4 will be sent in 2 seconds.
direction string no in, out Default value is in.
Defines the direction of a call: in - Incoming call, out - Outgoing call.
contact string yes

Number of a subscriber you're reaching for. Format should comply with the international standart E.164 (for example, 79091234567). You can also use SIP number of an employee.

Extension numbers of employees are not supported.
dialing_timeout number no up to 120 seconds Default value is 30. Waiting time to receive a reply from a contact. If there is no reply, the call ends. Waiting time in in seconds.
A message to be played for a contact
contact_message object yes

Defines parameters of a message that's to be played for a contact.

type string yes media, tts

Defines type of a message: media is a media file or tts is a text for voice synthesis service Text-to-Speech.

value string yes

If the field type has media in it, ID of a media file to be played is used as value. The file can be both system and user. You can access media file ID via REST API - Receiving a list of user files, Receiving a list of system files.

If the field type has tts in it, text for voice synthesis is used as value.

Length of a TTS message depends on your service plan or a limit.

Parameters of a reply

Title Type Required Description
call_session_id number yes Call session unique ID

Example of a request

{
  "jsonrpc": "2.0",
  "method": "start.informer_call",
  "id": "req1",
  "params": {
    "access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d",
    "virtual_phone_number": "74993720692",
    "external_id": "34rty567",
    "dtmf_string": "..1.2.3",
    "direction": "in",
    "dialing_timeout": 25,
    "contact": "79260000000",
    "contact_message": {
      "type": "tts",
      "value": "Test message"
    }
  }
}

Example of a reply

{
  "jsonrpc": "2.0",
  "id": "req1",
  "result": {
    "data": {
      "call_session_id": 1238694
    }
  }
}

List of returning errors

Text of error Code of error Mnemonics of error Description
The maximum length of Text-to-Speech message is {tts_message_max_length}. The length of your message is {sent_tts_message_length} -32602 tts_text_exceeded The length of your message exceeded the limits of your service plan
The media file with id {media_file_id} not found -32602 media_file_not_found
Virtual phone number {virtual_phone_number} not found. It is not your virtual phone number. -32007 virtual_phone_number_not_found Virtual number does not belong to a client
Parameter contact can not contain own virtual phone number -32602 own_virtual_phone_number_not_allowed Calls to own virtual numbers are not allowed
The contact {contact} has been found in the blacklist -32602 contact_in_blacklist
The character encoding must be UTF-8 -32602 character_encoding_not_allowed

Refer to List of errors common for all methods