Create a call for transfer or consultation

Method make.call
API version v4.0
Description Create a call for transfer or consultation
Return to list of methods

The method is available for use only after calling "hold.call", see section "Call State Diagram"

Request parameters

parameter
Name Type Required Valid values Description
access_token string yes Authentication session key
call_session_id number yes A unique call session identifier that can be received in a call response message methods start.informer_call, start.vnumber_call, start.scenario_call, start.employee_call, using the notification server or DATA API.
to string yes

The number of the subscriber to which we are calling. The number format must comply with the international standard E.164

Can be an internal number, external number, employee number, sip number
Message to be played to the subscriber specified in the to
to_message object no

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

The subscriber on hold will wait for an answer until the end of the message is heard
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 forplaying. The file to be played can be system or user. ID The 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.

Example request```json

{ "jsonrpc": "2.0", "method": "make.call", "id": "req1", "params": { "access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d", "call_session_id": 2354891, "to": "79260000000" } }

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

List of returned errors

Error text Error code Error mnemonics Description
This method can not be called in this state -32004 invalid_state The method can only be called after the hold.call
The character encoding must be UTF-8 -32602 character_encoding_not_allowed
The phone number does not exist or inactive -32602 no_active_phone_number The employee may not have active numbers

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