Platform integration
Phone and voice
- CategoryPlatform
Overview
The v2 voice engine runs on Twilio's Voice JS SDK with WebRTC and the Opus codec, so the agent's browser leg joins a private Twilio conference and the customer is dialed in on the PSTN. Opus survives packet loss and jitter, which is where the retired v1 engine (μ-law audio piped over a WebSocket from the server) used to chop and drop. The v2 engine runs per tenant on an account-level feature flag; accounts without it fall back to the v1 path.
What MessageMind can do with it
- Place an outbound WebRTC call from the inbox: the browser joins a private Twilio conference first, then MessageMind dials the customer and bridges the two legs.
- Pick inbound calls up on the connected number through MessageMind's inbound call path (the v2 browser SDK is outbound only; inbound calls route to the AI or your routing rules, not to a browser ring).
- Send DTMF keypad tones mid-call so an agent can walk a customer's IVR without leaving the call window.
- Dial a third phone number into the same conference as a three-way call, without a cold transfer.
- Start and stop call recording mid-call; MessageMind downloads the final recording from Twilio and copies it into its own storage against the call log.
- Set Temporarily Unavailable Hours on the number (up to 12 months ahead) to pause call pickup for a specific window without touching your regular call hours.
Requirements
- A Twilio connection on /channels/twilio (bring-your-own Account SID and Auth Token, or a number bought inside MessageMind), with at least one voice-capable number on the account.
- The inbox voice-call permission on the user who places the call (Settings, Team).
- Browser microphone permission granted on the MessageMind origin when the call window opens.
- The MessageMind server reachable on a public HTTPS URL; Twilio refuses the TwiML Application callbacks on localhost or non-HTTPS origins.
Authentication and permissions
- Mechanism
- A short-lived browser access token (one-hour TTL, refreshed transparently during long calls) minted per signed-in user, used by the Twilio Voice JS SDK to connect the browser leg into the private per-call conference. The token points at a per-tenant TwiML Application that MessageMind creates on the connected Twilio account the first time a call is placed.
- Credentials
- The underlying credentials are the Twilio Account SID and Auth Token stored for the tenant on /channels/twilio. On first call MessageMind creates an API Key and a TwiML Application on that same Twilio account; the API Key signs the browser access token, and the TwiML Application points Twilio at MessageMind's voice webhooks (outbound call TwiML, agent status, recording status).
Available data and actions
Reads
- The live Twilio capability flags for the connected account, used to decide whether voice is actually available before opening the call window.
- The list of phone numbers on the connected Twilio account, used to validate the caller ID on every outbound call.
- Regulatory bundle status for numbers that require one, so a number under review cannot be picked as the caller ID.
Writes
- A new outbound call dialed from one of your Twilio numbers once the agent's browser leg has joined the conference.
- A hangup command that ends every remaining leg of the conference on request.
- DTMF tones redirected into the customer leg mid-call.
- A recording started on the customer leg, stopped on request, with the resulting audio file copied from Twilio into MessageMind's own storage against the call log.
AI agent use cases
- Call a customer back from the inbox on the same business number they already text, so the call and the chat history sit on one contact.
- Walk an automated IVR by typing the keypad tones mid-call without picking up a desk phone.
- Pull a specialist colleague into a live customer call as a third leg without a cold transfer.
- Record a sensitive call for the file and keep the audio against the contact's history for later review.
- Pause inbound call pickup for a known closure window (holidays, offsite) by scheduling Temporarily Unavailable Hours months ahead, without touching regular call hours.
Configuration
- Temporarily Unavailable Hours accept a window up to 12 months ahead; your regular call hours resume automatically once the window ends.
- Call recording is opt-in per call. A recording can be started and stopped once mid-call, after which it cannot be restarted on the same call; the finalised audio is downloaded from Twilio and stored by MessageMind against the call log.
- A US number used for SMS from the same Twilio account also requires an A2P 10DLC brand and campaign registration in /channels/twilio/a2p before US SMS traffic will flow; this is an SMS gate rather than a voice gate, but it applies to the same number.
- Voice capacity is shared fairly across tenants on the connected Twilio account; a sustained burst from one tenant does not starve another.
Example workflows
Place an outbound call from the inbox
- The agent opens a contact in the inbox, clicks Call, picks one of the connected Twilio numbers as the caller ID, and optionally enables record.
- MessageMind validates the from-number against the Twilio account, mints a short-lived browser access token, and opens a private conference for this call.
- The browser connects to Twilio over WebRTC using the Voice JS SDK and the Opus codec, and the agent leg joins the conference first.
- MessageMind dials the customer on the PSTN and bridges them into the same conference once the agent leg is in.
- If record was enabled, Twilio starts recording the customer leg on answer; the agent can also start or stop the recording mid-call from the call window.
- On hang up, MessageMind ends every remaining leg, downloads the final recording from Twilio, copies it into its own storage, and writes the call log entry linked to the recording.
Limitations
- The MessageMind server has to be reachable on a public HTTPS URL; a localhost or non-HTTPS origin blocks the TwiML Application callbacks and the whole voice setup refuses to arm.
- Outbound call volume is bounded by Twilio's per-account concurrency and rate limits; sustained bursts above those limits are throttled by Twilio, not by MessageMind.
- A US number used for SMS from the same Twilio account is gated behind A2P 10DLC: without an approved brand and campaign in /channels/twilio/a2p, US carriers rate-limit or block SMS from that number even though voice on the same number is unaffected.
- A WebRTC call needs a working browser microphone; if the user denies the mic prompt the call window shows 'Microphone blocked' and the call does not place.
Troubleshooting
The call window shows 'Microphone blocked' and the call never places.
The browser denied mic access on the MessageMind origin. Click the site-settings icon in the URL bar, allow the microphone, reload the dashboard, and start the call again.
Starting a call fails with a setup error about the server URL or the TwiML Application.
The MessageMind server is not reachable on a public HTTPS origin, so Twilio cannot be pointed at a valid callback URL and the per-tenant TwiML Application cannot be created. Deploy MessageMind on a public HTTPS URL before using voice; localhost will not work.
An outbound call is rejected with an invalid-from error, or the chosen number is greyed out in the caller ID picker.
The caller ID has to be a voice-capable number already attached to the connected Twilio account (and, if the country requires one, with its regulatory bundle approved). Pick a different number on /channels/twilio, or add a voice-capable number to the Twilio account first.