Information call

Method start.informer_call
API version v4.0
Description Information call with the ability to play a file or text message to the subscriber. After the message has finished playing, the call ends automatically.
Return to list of methods

After the message has finished playing to the subscriber, the call ends.

Request parameters

Name Type Required Valid values Description
access_token string yes Authentication session key
virtual_phone_number string yes

Virtual number rented by the client. The number format must comply with international E.164 standard (for example, 74993720692). Always used as the caller number when calling to the number specified in the contact parameter. Virtual numbers can be obtained using REST Method API - Getting a list of virtual numbers

virtual_phone_usage_rule string no

Rules for using a virtual number. Allows you to dynamically change the virtual number when calling. If the number is suitable, that satisfies the selected rule is not found, the number specified in the virtual_phone_number parameter will be used. Valid parameter values:

  • fixed - Fixed
  • fixed_for_numa - Fixed for subscriber
  • random - Random
  • regional_random - Regional random
  • regional_fixed_for_numa - Regional fixed line for the subscriber

The default rule is Фиксированный. Other rules are available when the component is connected Автоматическое управление номерами.

external_id string no A unique identifier that can be used to associate a call event with an external system.
dtmf_string string no 0-9, *, # Specifies the DTMF that will be sent to the subscriber specified in the contact parameter. C Using the symbol . = '1 second' you can set a timeout after which the DTMF symbol will be sent. Example: .12.1..4, i.e. after 1 second the number 12 will be sent, then after 1 second the number 1 will be sent and after 2 seconds the number 4.
direction string no in, out The default value is in.
Determines the direction of the call in - Incoming call, out - Outgoing call.
contact string yes

The number of the subscriber to which the call is made. The number format must match international standard E.164 (for example, 79091234567). The employee's SIP number can also be specified as a number.

Employee extension numbers are not supported.
dialing_timeout number no up to 120 seconds The default value is 30. Waiting time for a response from the number specified in the contact parameter, if no response is received, the call ends. The time is specified in seconds.
Message to be played to the subscriber specified in the parameter contact
contact_message object yes

Defines the parameters of the message that needs to be played to the subscriber specified in the contact parameter.

type string yes media, tts

Defines the message type. media - file or tts - text for the Text-to-Speech speech synthesis service.

value string yes

If the type field has the value media, then the file identifier for playing. The file to be played can be system or user. IdentifierThe file to be played can be obtained using the DATA API - Getting a list of user files, Getting a list of system files

If the type field has the value tts, then the text is taken as the value to synthesize it into voice message.

The length of the TTS message is regulated by the tariff plan and the established limit.

Response parameters

Title Type Required Description
call_session_id number yes Unique call session identifier

Example request```json

{ "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": "Тестовое сообщение" } } }

#### Sample answer```json
{
  "jsonrpc": "2.0",
  "id": "req1",
  "result": {
    "data": {
      "call_session_id": 1238694
    }
  }
}

List of returned errors

Error text Error code Error mnemonics 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 Message length has exceeded the permissible limit set by the tariff 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 If you use a virtual number that does not belong to the client
Parameter contact can not contain own virtual phone number -32602 own_virtual_phone_number_not_allowed Calling your own virtual number is prohibited
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

See also section "List of errors common to all methods"