Skip to content

Disconnect leg

Disconnecting a leg of a call

Method disconnect.leg
API version v4.0
Description Method allows you to disconnect various legs of a call. You can access ID for each leg via the list.calls method or a notification server
Go back to List of methods

Disconnecting a contact (refer to the methods start.employee_call, start.scenario_call, start.informer_call, start.vnumber_call) leads to ending the whole call session

Parameters of a request

Title Type Required Description
access_token string yes Authentication session key
call_session_id number yes Unique ID of a 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, via a notification server or REST API.
leg_id number yes Unique ID of a call's leg that you can access via a notification server.

Parameters of a request

{
  "jsonrpc": "2.0",
  "method": "disconnect.leg",
  "id": "req1",
  "params": {
    "access_token": "2fRN4g217ca0b4224a67988aff3e584f91964a692045415f36fa66146f5a3c1ae1f6093d",
    "call_session_id": 2875654,
    "leg_id": 9875
  }
}

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
The call's leg not found -32602 leg_not_found

Refer to List of errors common for all methods