Set up an SMS Channel for Twilio
A Twilio SMS channel lets your agents trade text and multimedia messages with customers straight from the Cloud Voice App. This page walks you through linking a Twilio number to Cloud Voice, from grabbing a webhook URL to routing inbound messages to the right agent.
Before you begin
Section titled “Before you begin”Confirm your Cloud Voice system meets these requirements:
- Firmware: version 84.23.0.123 or later.
- Domain name: the system’s domain name must not contain any underscore characters. Twilio rejects underscored domains, which causes the channel to fail authentication or stop receiving messages.
- Domain certificate: a valid domain certificate must be installed.
Supported messages and limits
Section titled “Supported messages and limits”The Twilio channel handles both plain text (SMS) and multimedia messages (MMS). Twilio decides which MMS file types it accepts; check Twilio’s list of accepted MMS file types for the current details.
Two limits apply to messages on the channel:
- Maximum file size: 100 MB
- File retention: 72 hours
How the setup works
Section titled “How the setup works”Connecting Twilio takes three stages, done in order:
- Get a webhook URL from Cloud Voice.
- Set up a Twilio number for SMS and point it at that URL.
- Create the SMS channel in Cloud Voice and finish its configuration.
Step 1. Get the webhook URL from Cloud Voice
Section titled “Step 1. Get the webhook URL from Cloud Voice”A webhook URL is the address Twilio calls to hand incoming messages back to your system, so you need it from Cloud Voice before you can configure the number on Twilio.
- Sign in to the PBX (private branch exchange) web portal and go to Messaging > Message Channel.
- Click Add and choose SMS.
- From the ITSP (Internet Telephony Service Provider, the carrier that handles your messages) drop-down list, select Twilio, then copy the Webhook URL.

Step 2. Set up a Twilio number for SMS
Section titled “Step 2. Set up a Twilio number for SMS”Sign in to the Twilio portal and complete the following:
-
Search for and buy a number that supports SMS.

-
Edit the number you bought and set its messaging webhook to the Cloud Voice webhook URL you copied in Step 1.

-
Enable geographic permissions for every region you want to text, so your messages can reach numbers in those regions.

-
Open your account dashboard and note down the Account SID and Auth Token: you’ll enter both in Cloud Voice in the next step.


Step 3. Create the SMS channel in Cloud Voice
Section titled “Step 3. Create the SMS channel in Cloud Voice”-
Sign in to the PBX web portal and go to Messaging > Message Channel.
-
Click Add and choose SMS.
-
On the Authentication tab, enter your Twilio credentials:

- Name: a name that helps you recognize the channel.
- ITSP: select Twilio.
- Account SID: paste the Account SID you noted from Twilio.
- Auth Token: paste the Auth Token you noted from Twilio.
-
On the Messaging Settings tab, configure the channel.
Message sending rate
In the Message Sending Rate field, set how many messages the system may send per second.
Session settings
Configure these session options as needed:
Setting What it does Close Session Automatically Closes sessions that have been idle for a set length of time. Select the checkbox, then enter the number of days in the Session Timeout (Days) field. Allow the Creation of Duplicate Active Sessions Lets a user open a new session even when an active session with the same sender and receiver already exists. When this is on and a user starts such a session in the Cloud Voice App, a prompt appears; if the user continues, the existing session, with its full chat history, leaves its current handler’s list and is taken over by the new user. 
Number and routing
In the Number section, click Add to create a message routing rule.

-
Number: enter the number you bought, or specify an Alphanumeric Sender ID.
-
Destination for Inbound Messaging: choose where inbound messages from this number go.
Option What it does Extension Routes inbound messages to one extension that you pick from the Extension list. Only that user receives them. Message Queue Routes inbound messages for new sessions to the queue you pick from the Message Queue list. Every agent in the queue sees new sessions, but once an agent picks up a session, only that agent receives and answers its follow-up messages. Third-Party Message Analytics Platform (Transmitted via API) Automatically forwards inbound messages to an external analytics platform over the Cloud Voice API (application programming interface) for advanced processing. Your system must already be integrated with that platform through the API before this option works. Once it is enabled, Cloud Voice transmits inbound messages to the chosen platform, and you can track them by monitoring the API event (30031) New Message Notification. A full Message API suite is also available for deeper message interaction; see the Cloud Voice developer documentation for details. -
Extensions allowed to create messaging sessions: select the extensions that may start a messaging session with customers.
When the rule is complete, click Save.
-
-
Click Save to create the channel.
Result
Section titled “Result”-
The new Twilio channel appears in the message channel list with a Status of connected
.
-
Cloud Voice tracks how many messages the channel sends and receives. The Total column counts every sent message, both successful and failed.

What to do next
Section titled “What to do next”Send a text to the Twilio number and confirm that the agent you routed it to receives it in the Cloud Voice App.