Overview
Conference is the foundation of contact center call handling. The key insight: every call that might need a transfer should start as a Conference, not a direct <Dial>. A Conference supports hold, transfer, coaching, and recording — a direct Dial does not.
Contact center best practice: Every multi-agent call should use Conference, not direct Dial.
Prerequisites
- Twilio account with a voice-capable phone number — see
twilio-account-setup TWILIO_ACCOUNT_SIDandTWILIO_AUTH_TOKEN— seetwilio-iam-auth-setup- SDK:
pip install twilio/npm install twilio - For agent routing: TaskRouter — see
twilio-taskrouter-routing
Quickstart
Step 1 — Put the inbound caller into a Conference
When a call comes in, place the caller into a named Conference room.
Python (Flask)
Node.js (Express)
Step 2 — Connect an agent to the same Conference
After TaskRouter assigns a worker, dial the agent into the conference:
Security: Never interpolate untrusted user input into inline
twiml=strings. Use the SDK'sVoiceResponsebuilder for any dynamic content.
Python
Node.js
Key Patterns
Warm Transfer
Put caller on hold → dial new agent into Conference → original agent briefs new agent → original agent drops.
Python
Cold Transfer
Simpler — just redirect the caller to a new agent without briefing.
Python
Hold vs Mute
Critical distinction: Hold plays music. Mute just silences. Using mute when you mean hold exposes agent-side conversations to the caller.
Coaching (Supervisor Whisper)
Supervisor joins the Conference and can speak to the agent only — the caller cannot hear the supervisor.
Python
Node.js
Coach behavior:
- Supervisor hears both caller and agent
- Supervisor can speak to agent only (caller cannot hear)
- Coach audio is NOT captured in conference recording — record separately if needed
- To switch from coach to barge (speak to everyone), update the participant
Supervisor Barge
Supervisor joins and speaks to everyone — useful for escalation or takeover.
Participant Management
Gotchas
1. Conference Requires 2+ Participants to "Exist"
A Conference with only one participant is in a waiting state. The single participant hears hold music. API calls to the Conference may behave unexpectedly until a second participant joins.
2. Coach Audio Not in Recording
Conference recordings capture the main audio mix only. Coach/whisper audio is NOT recorded. If you need to record coaching sessions for QA, add a separate recording on the supervisor's call leg.
3. endConferenceOnExit Behavior
If endConferenceOnExit=True for any participant, the conference ends when they leave — dropping all other participants. Set this carefully:
- Caller: Usually
False(so agents can wrap up) - Agent: Usually
False(so caller can be transferred) - Supervisor: Always
False
4. Conference Name Is Account-Scoped
Conference names must be unique within your account at any given time. Use a unique identifier (like CallSid) in the name to prevent collisions:
CANNOT
- Cannot use
<Gather>inside a Conference — DTMF goes into the audio mix, not a handler. Gather before joining the conference. - Cannot rely on speaker events for app logic — Speaker events fire too frequently to be actionable in real-time routing.
- Cannot get post-flight participant data from REST API — Completed conferences return empty participant lists. Use Voice Insights for historical data.
- Coach audio is NOT in the conference recording — Supervisor whisper audio is excluded from the recorded mix. Record the supervisor's call leg separately if needed.
- Cannot filter Insights list endpoint by
processing_state— Must fetch by Conference SID directly. - Cannot use PII in
friendlyName— Compliance requirement, not just a suggestion. - Cannot create a conference with 0 call legs and get Insights data — Insights requires at least 1 participant call attempt.
- Cannot poll Insights immediately after conference end — Takes 15-30+ minutes for data to appear, even for
in_progressstate. - Cannot exceed 250 participants per conference — Hard limit
- Cannot pre-add phone numbers to a conference — Participants must be active calls
- Cannot use a private URL for hold music — Hold music URL must be publicly accessible
- Cannot get per-participant recordings from conference recording — Recording is per-conference (mono mixed). Use dual-channel recording for QA — see
twilio-call-recordings
Next Steps
- Route calls to agents:
twilio-taskrouter-routing - Record calls:
twilio-call-recordings - IVR before conferencing:
twilio-voice-twiml - AI agent with escalation:
twilio-voice-conversation-relay