- CategoryChannels
- AuthAccount credentials
Same Twilio connection as SMS. Walk through bringing your own account or buying a number from inside MessageMind.
Overview
Phone calls run on the same Twilio connection as SMS: pick "I already have a phone number" (bring your own Twilio or Telnyx account) or "I need a new phone number" (buy inside MessageMind, from $1/month) on /channels/twilio. From the Inbox, the Call button opens a WebRTC call window: your browser joins a private Twilio conference, MessageMind dials the customer in, and both legs meet. The v2 engine uses Twilio's Voice JS SDK with WebRTC and Opus so audio holds up on lossy or high-latency networks.
What MessageMind can do with it
- Place an outbound call from the browser to a customer's phone, using one of your connected numbers as the caller ID.
- WebRTC audio (Twilio Voice JS SDK with Opus) in the v2 engine, so calls stay clean on lossy or high-latency networks that choked the legacy v1 (μ-law over WebSocket) engine.
- Send DTMF keypad tones from the call window so you can navigate the customer's IVR mid-call.
- Add another phone number as a third leg into the live call (dial-in a colleague) without a cold transfer.
- Start and stop call recording mid-call; the recording is stored as an audio file against the call log for replay from the inbox.
- Set Temporarily Unavailable Hours for the number (up to 12 months ahead) when you cannot take calls, without changing your regular call hours.
Requirements
- A Twilio connection on /channels/twilio (bring-your-own Account SID + Auth Token, or a number bought inside MessageMind), with at least one voice-capable number.
- The MessageMind server reachable on a public HTTPS URL; localhost or non-HTTPS origins block the voice setup (Twilio refuses the TwiML App callbacks).
- The voice feature on your plan (gated per account; the UI falls back to the legacy call path if it is off).
- A user signed into MessageMind with the inbox voice-call permission.
- Browser microphone permission granted when the call window opens.
How to connect
- Connect Twilio on /channels/twilio (see the SMS page for the two paths: bring your own Twilio account, or buy a number inside MessageMind). Make sure at least one voice-capable number is selected.
- If you went bring-your-own, no further step is needed: MessageMind creates the per-tenant API Key and TwiML Application on your Twilio account the first time you start a call, so Twilio knows which webhook to call back.
- In the dashboard, grant the voice-call permission to the users who should be able to place calls (Settings, Team).
- Open the Inbox, pick a contact, and click Call. Allow the microphone when the browser asks. The call window opens, your browser joins Twilio's conference, and the customer is dialed in.
- Optional: open /channels/twilio to the connected number and configure Voice Call Settings, including Temporarily Unavailable Hours when you want to pause call pickup for a specific window.
Authentication and permissions
- Mechanism
- Twilio Account SID and Auth Token for the tenant's own Twilio subaccount. On the first call MessageMind creates an API Key and a TwiML Application on that same account; those credentials are then stored and reused.
- Credentials
- Account SID and Auth Token are used for the Twilio REST API and webhook signature verification. The auto-created API Key signs the short-lived browser access token (1 hour TTL) that the voice SDK uses to connect to Twilio. The TwiML Application points Twilio at the MessageMind webhook URLs for outbound calls, agent status and recording status.
Available data and actions
Reads
- The list of Twilio phone numbers on the connected account, used to validate the caller ID on every outbound call.
- Live call status callbacks for the customer leg, the agent leg and any added participant.
- Recording status callbacks and the recording file itself, downloaded from Twilio over Basic Auth with your Account SID and Auth Token.
Writes
- A short-lived browser access token minted for the signed-in user's voice SDK session.
- A new outbound call to the customer dialed from one of your Twilio numbers, placed only once the agent's browser leg has joined the conference.
- DTMF tones redirected into the customer leg mid-call.
- A dial to an additional phone number joined into the same call conference.
- A call recording created on the customer leg, stopped on request, with the resulting mp3 copied into MessageMind's own storage against the call log.
- A call log entry on terminal status, carrying the Twilio call SID and the recording key when one was produced.
AI agent use cases
- Call a customer from the inbox using the same business number they already text, so the call shows the full chat history alongside it.
- Reach an IVR by sending the keypad tones the menu asks for without leaving the call window.
- Pull a colleague into a live call as a third leg without a cold transfer.
- Record a call for the file and keep the audio against the contact's history for playback or review.
Configuration
- Call recording is opt-in per call via the record toggle when the call is started.
- A recording can be started mid-call and stopped once; once stopped it cannot be restarted on the same call.
- The browser voice token expires after an hour; the SDK refreshes it transparently during a long call.
Example workflows
Place an outbound call with optional recording
- The agent chooses the customer, picks one of the connected Twilio numbers as the caller ID, and optionally enables record.
- MessageMind validates the from-number against the Twilio account and opens a private conference for this call.
- The browser connects to Twilio over WebRTC; the agent leg joins the conference first.
- MessageMind then dials the customer on the PSTN and bridges them into the same conference.
- If record was enabled, Twilio starts recording the customer leg on answer.
- On hang up, MessageMind ends every remaining leg, downloads the final recording, uploads it to its own storage, and writes the call log entry linked to the recording.
Add a third person to a live call
- During the call the agent enters a second phone number to pull in.
- MessageMind refuses duplicates and the customer's own number, then dials the new number into the same conference.
- The new participant hears the call once they answer; their status is reported into the call window.
- When any leg hangs up, MessageMind ends the other legs and finalises the call log.
Limitations
- Outbound only from the browser (v2 engine). The voice SDK token does not accept inbound calls to the browser; inbound calls to the Twilio number route to the AI or your routing rules, not to a browser ring.
- 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.
- The caller ID must be one of the numbers on the connected Twilio account. MessageMind blocks a call placed with any other from-number.
- A recording that was stopped mid-call cannot be resumed on the same call.
- Voice runs on a per-tenant feature flag (humanCallV2). An account without it is sent back to the legacy v1 engine (μ-law over WebSocket), which can chop on lossy networks.
- A WebRTC call needs a stable browser mic and network. If the user denies microphone permission, the call window shows 'Microphone blocked' and the call does not place.
Troubleshooting
The call window stays on 'Establishing Connection' and never progresses.
The browser's WebRTC leg has not joined Twilio's conference yet. Check the microphone permission in the browser (the call window shows 'Microphone blocked' if denied), check network and firewall for outbound UDP to Twilio's edge, and retry.
The call window shows 'Microphone blocked'.
The browser denied mic access. Click the site-settings icon in the URL bar, allow the microphone for the MessageMind origin, reload, and try again.
The call window shows 'Reconnecting audio' intermittently.
The WebRTC leg lost packets or switched networks. The SDK recovers on its own if the network comes back; if it keeps happening on the same network, test on a wired or stronger Wi-Fi connection.
An outbound call is rejected with an invalid-from error.
The caller ID is not one of the numbers on the connected Twilio account. Pick a number that is attached to that account on /channels/twilio.
The call starts, your leg is in, but nobody is dialed on the other side.
The customer dial-in only happens after your browser leg joins the conference. If your leg joined but no dial fires, check the connected Twilio account has credit (bring-your-own path) or that the stored card on MessageMind is live (MessageMind-managed path).
A recording ended but the call log has no audio.
MessageMind waits a bounded time for Twilio to finalise the recording and upload it to storage. If the upload failed, the call log is still written with no recording key; retry the recording on the next call.
Starting a call fails with a setup error about the server URL.
The MessageMind server is not reachable on a public HTTPS origin, so the TwiML Application cannot be pointed at a valid callback URL. Deploy on an HTTPS public URL before using voice.
Disconnect and reconnect
- Disconnecting the Twilio connection on /channels/twilio stops both SMS and voice at the same time (they share one connection). The AI stops dialing out and inbound calls return to the no-connection path.
- To pause voice without disconnecting Twilio entirely, use Temporarily Unavailable Hours in Voice Call Settings on /channels/twilio. Set the window (up to 12 months ahead) and your regular call hours stay untouched afterwards.
- To revoke a specific user's ability to call, remove the inbox voice-call permission from that user in Settings, Team.