import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

response = client.multi_party_calls.stop(uuid='uuid')
print(response)
HTTP Status Code: 204

You can trigger this request to end an ongoing MPC

API Endpoint

DELETE
https://api.plivo.com/v1/Account/{Auth Id}/MultiPartyCall/name_{mpc_name}/

For participant call legs that were added to the MPC using the <MultipartyCall> XML element:

  • If onExitActionUrl is not specified: the participants will be disconnected and the call will proceed to the next element in the XML document.
  • If onExitActionUrl is specified: the participants will be disconnected and the call will proceed to the XML document returned by the onExitActionUrl.

For participant call legs that were added to the MPC using the Add Participant API:

  • If on_exit_action_url is not specified: MPC will be terminated with the hangup cause “Multiparty Call Ended” (hangup cause code 4020) and hangup cause will be API Request.
  • If on_exit_action_url is specified: the participants will be disconnected and the call will proceed to the XML document returned by the on_exit_action_url.

Arguments

No arguments need to be passed.

Returns

Returns an acknowledgement that the MPC has ended.

import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

response = client.multi_party_calls.stop(uuid='uuid')
print(response)
HTTP Status Code: 204