Documentation Index Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
The <MultiPartyCall> element creates or joins a multi-party call (MPC) with advanced features like participant roles, coach mode for supervisors, and individual hold/mute controls.
For simple conference bridges without roles, see Conference .
Basic Usage
< Response >
< MultiPartyCall role = "customer" maxDuration = "10000" >
my-mpc-name
</ MultiPartyCall >
</ Response >
Python
Node.js
Ruby
PHP
Java
.NET
Go
from plivo import plivoxml
response = plivoxml.ResponseElement()
response.add(plivoxml.MultiPartyCallElement(
content = 'my-mpc-name' ,
role = 'customer' ,
max_duration = 10000
))
print (response.to_string())
Participant Roles
Role Description CustomerThe customer being served AgentCustomer service representative SupervisorCan monitor/coach agents (coach mode) ai-agentAI agent connected via WebSocket streaming (see AI Agent Stream Attributes )
MPC-Level Attributes
These settings apply to the entire multi-party call:
Attribute Type Default Description maxDurationinteger 14400Max MPC duration in seconds (300-28800) maxParticipantsinteger 10Maximum participants (2-10) recordboolean falseRecord the MPC recordFileFormatstring mp3Recording format (mp3, wav) recordMinMemberCountinteger 1Min members to start recording (1 or 2) waitForAgentboolean falseWhen true, the MPC waits for an agent to join before starting. Customer participants hear wait music until an agent arrives recordCoachVoiceboolean - When true, includes the supervisor/coach voice in the call recording. When false, only agent and customer voices are recorded startRecordingAudioURL - URL to fetch XML instructions for audio to play when recording starts startRecordingAudioMethodstring GETHTTP method for startRecordingAudio URL. Values: GET, POST stopRecordingAudioURL - URL to fetch XML instructions for audio to play when recording stops stopRecordingAudioMethodstring GETHTTP method for stopRecordingAudio URL. Values: GET, POST
Hold Music
Attribute Type Description waitMusicUrlURL Music for participants waiting for MPC to start waitMusicMethodstring HTTP method for waitMusicUrl agentHoldMusicUrlURL Music for agents on hold agentHoldMusicMethodstring HTTP method for agent hold music customerHoldMusicUrlURL Music for customers on hold customerHoldMusicMethodstring HTTP method for customer hold music
Callbacks
Attribute Type Description statusCallbackUrlURL URL for MPC events statusCallbackMethodstring HTTP method (GET, POST) statusCallbackEventsstring Events to receive (see below) recordingCallbackUrlURL URL for recording events recordingCallbackMethodstring HTTP method for recording callback
Participant-Level Attributes
These settings apply to individual participants:
Attribute Type Default Description rolestring required Agent, Supervisor, or Customermuteboolean falseJoin muted holdboolean falseJoin on hold coachModeboolean trueSupervisor coach mode (supervisors only) stayAloneboolean falseStay if only participant startMpcOnEnterboolean trueStart MPC when joining endMpcOnExitboolean falseEnd MPC when leaving
Entry/Exit Sounds
Attribute Type Default Description enterSoundstring beep:1Sound on entry: none, beep:1, beep:2, or URL enterSoundMethodstring GETHTTP method for enterSound URL exitSoundstring beep:2Sound on exit: none, beep:1, beep:2, or URL exitSoundMethodstring GETHTTP method for exitSound URL
Actions
Attribute Type Description onExitActionUrlURL URL called when participant exits onExitActionMethodstring HTTP method (GET, POST) relayDTMFInputsboolean Transmit DTMF to other participants
AI Agent Stream Attributes
When role is set to ai-agent, use these attributes to connect an AI agent via WebSocket streaming.
Attribute Type Default Description aiAgentStreamServiceUrlURL - WebSocket URL for the AI agent audio stream service aiAgentStreamContentTypestring audio/x-l16;rate=8000Audio content type for the AI agent stream aiAgentStreamStatusCallbackUrlURL - URL for receiving AI agent stream status event callbacks aiAgentStreamStatusCallbackMethodstring POSTHTTP method for the AI agent status callback. Values: GET, POST aiAgentStreamSamplingRatestring - Audio sampling rate for the AI agent stream aiAgentStreamExtraHeadersobject {}Custom headers sent with the AI agent WebSocket connection
Examples
Supervisor Coach Mode
Supervisors with coachMode="true" can hear everyone but only agents hear them (customers cannot):
Supervisor joining:
< Response >
< MultiPartyCall role = "Supervisor" coachMode = "true" >
support-call-123
</ MultiPartyCall >
</ Response >
Agent joining:
< Response >
< MultiPartyCall role = "Agent" startMpcOnEnter = "true" >
support-call-123
</ MultiPartyCall >
</ Response >
Customer joining:
< Response >
< MultiPartyCall role = "Customer" >
support-call-123
</ MultiPartyCall >
</ Response >
MPC Recording
< Response >
< MultiPartyCall
role = "Agent"
record = "true"
recordFileFormat = "mp3"
recordingCallbackUrl = "https://example.com/recording-ready/" >
recorded-call
</ MultiPartyCall >
</ Response >
Recording Events
MPCRecordingInitiated
MPCRecordingPaused
MPCRecordingResumed
MPCRecordingCompleted
MPCRecordingFailed
On Exit Action
Continue call flow after leaving MPC:
< Response >
< MultiPartyCall
role = "Customer"
onExitActionUrl = "https://example.com/post-call-survey/"
onExitActionMethod = "POST" >
support-call
</ MultiPartyCall >
</ Response >
Custom Hold Music
< Response >
< MultiPartyCall
role = "Agent"
agentHoldMusicUrl = "https://example.com/agent-hold.xml"
customerHoldMusicUrl = "https://example.com/customer-hold.xml"
waitMusicUrl = "https://example.com/wait-music.xml" >
call-center-mpc
</ MultiPartyCall >
</ Response >
Hold music URLs must return XML with Play, Speak, or Wait elements.
Status Callback Events
Configure which events to receive with statusCallbackEvents:
Value Events Included mpc-state-changesMPCInitialized, MPCStart, MPCEnd participant-state-changesParticipantJoin, ParticipantExit, ParticipantMute, ParticipantUnmute, ParticipantHold, ParticipantUnhold, ParticipantCoachModeStart, ParticipantCoachModeStop participant-speak-eventsParticipantSpeakStart, ParticipantSpeakStop participant-digit-input-eventsParticipantDigitInput add-participant-api-eventsAddParticipantByAPIActionInitiated, AddParticipantByAPIActionCompleted participant-audio-eventsParticipantAudioStart, ParticipantAudioStop — triggered when audio from a participant starts or stops
< MultiPartyCall
statusCallbackUrl = "https://example.com/mpc-events/"
statusCallbackEvents = "mpc-state-changes,participant-state-changes,participant-speak-events" >
my-mpc
</ MultiPartyCall >
Status Callback Parameters
Parameter Description EventNameEvent that triggered callback EventTimestampWhen the event occurred MPCUUIDUnique MPC identifier MPCNameFriendly MPC name MemberIDParticipant identifier ParticipantRoleAgent, Supervisor, or Customer ParticipantCallUUIDParticipant’s call UUID ParticipantCoachModeWhether in coach mode MPCDurationTotal MPC duration (on end) MPCBilledDurationBilled duration MPCBilledAmountCost in USD
On Exit Parameters
Parameter Description MPCUUIDMPC identifier MPCFriendlyNameMPC name MemberIDParticipant ID ParticipantCallUUIDCall UUID ParticipantJoinTimeWhen participant joined ParticipantEndTimeWhen participant left ParticipantRoleParticipant’s role
Conference vs Multi-party Call
Feature Conference Multi-party Call Max participants 20 10 Participant roles No Yes (Agent, Customer, Supervisor, AI Agent) Coach mode No Yes Individual hold/mute No Yes API control Limited Full Use case Simple meetings Call centers, support