Make call
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 the "Call state diagram" section.
Request parameters
| 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 obtained in the response of the start.informer_call, start.vnumber_call, start.scenario_call, and start.employee_call methods, using the notification server or the DATA API. | ||
| to | string | yes |
The number of the subscriber to whom we are calling. The number format must comply with the international E.164 standard. Note: can be an internal number, external number, employee number, or SIP number. |
||
Message to be played to the subscriber specified in the to parameter |
|||||
| to_message | object | no |
Defines the parameters of the message that needs to be played to the subscriber specified in the Note: the subscriber on hold will wait for an answer until the message has finished playing. |
||
| type | string | yes | media, tts |
Defines the message type: |
|
| value | string | yes |
If the If the Note: the length of the TTS message is regulated by the tariff plan and the established limit. |
||
Example request
{
"jsonrpc": "2.0",
"method": "make.call",
"id": "req1",
"params": {
"access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d",
"call_session_id": 2354891,
"to": "79260000000"
}
}
Example response
{
"jsonrpc": "2.0",
"id": "req1",
"result": {
"data": {
"success": "true"
}
}
}
List of returned errors
| Error text | Error code | Mnemonics | Description |
|---|---|---|---|
| This method cannot be called in this state | -32004 | invalid_state |
The method can only be called after hold.call |
| The character encoding must be UTF-8 | -32602 | character_encoding_not_allowed |
|
| The phone number does not exist or is inactive | -32602 | no_active_phone_number |
The employee may not have active numbers |
See also the section "List of errors common for all methods".