Skip to content

Make call

Make call for transfer or consulting

Method make.call
API version v4.0
Description Make call for transfer or consulting
Go back to List of methods

The method can only be used after a "hold.call" call. Refer to the "Diagram of call statuses" section.

Parameters of a request

Title Type Required Valid value Description
access_token string yes Authentication session key
call_session_id number yes Unique ID of call session, that you can get in a reply message after calling the methods start.informer_call, start.vnumber_call, start.scenario_call, start.employee_call, using a notification server or REST API.
to string yes

Number od a subscriber you're reaching for. Format should comply with the international standart E.164

. It can be an extension number, an external number, a number of an employee or a sip number
A message that's to be played for a subscriber from the parameter to
to_message object no

Defines parameters of a message, that's to be played for a subscriber from the parameter to_message.

A subscriber on hold will listen to the message till the end while waiting for reply.
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.

Example of a request

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

Example of a reply

{
  "jsonrpc": "2.0",
  "id": "req1",
  "result": {
    "data": {
      "success": "true"
    }
  }
}

List of returning errors

Text of error Code of error Mnemonics of error Description
This method can not be called in this state -32004 invalid_state Method can be called only after the hold.call method
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 Employee may not have active numbers

Refer to List of errors common for all methods