Disconnect leg
End a conversation with an individual participant
| Method |
disconnect.leg |
| API version |
v4.0 |
| Description |
The method allows you to disconnect individual participants in a conversation. The unique identifier of each conversation participant can be obtained using the list.calls method or the notification server. |
| Return to list of methods |
Disconnecting the contact leg (see the start.employee_call, start.scenario_call, start.informer_call, start.vnumber_call methods) causes the entire call session to end.
Request parameters
| Name |
Type |
Required |
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. |
| leg_id |
number |
yes |
A unique identifier for a conversation participant, which can be obtained through the notification server. |
Example request
{
"jsonrpc": "2.0",
"method": "disconnect.leg",
"id": "req1",
"params": {
"access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d",
"call_session_id": 2875654,
"leg_id": 9875
}
}
Example response
{
"jsonrpc": "2.0",
"id": "req1",
"result": {
"data": {
"success": "true"
}
}
}
List of returned errors
| Error text |
Error code |
Mnemonics |
Description |
| The call leg was not found |
-32602 |
leg_not_found |
|
See also the section "List of errors common for all methods".