Twilio integration for hosted customers

Introduction

This guide is specifically designed for hosted (subscription) customers looking to integrate Twilio with LiveAgent. Self-hosted (downloadable/standalone) customers should refer to a separate guide for their specific integration process. This article will walk you through the steps to create a SIP trunk, set up Termination and Origination URIs, add numbers to the SIP trunk, and create numbers in LiveAgent.

The Twilio integration, as any other SIP provider integration, consists of 2 parts. First part is the setup on the provider side during which you will be asked to note down some important information which you will use in the second part which is the setup in LiveAgent admin panel. Here are the steps which we'll take:

  1. Create a SIP trunk
  2. Set up Termination URI and credentials
  3. Setup Origination URI
  4. Add numbers to the SIP trunk
  5. Create numbers in LiveAgent

 

1. Create a SIP trunk

Log in to your Twilio console and navigate to Elastic SIP Trunks using the search bar in the upper right corner. Click on the "Create new SIP Trunk" button and assign a Friendly Name (e.g., LiveAgent) to your new trunk. Ensure that Secure trunking is disabled on the General tab.

 


You'll need to give some Friendly Name to your new trunk so let's use for example LiveAgent.
 


Once the SIP trunk is created make sure that the Secure trunking is disabled on the General tab:
 

 

2. Set up Termination URI and credentials

After creating your trunk, go to the Termination screen to input a unique Termination SIP URI and add new credentials for the trunk by clicking the PLUS + icon next to the Credentials list. Save the Termination SIP URI and the credentials for later use during LiveAgent setup.

For the Termination SIP URI, create a unique identifier (e.g., your LiveAgent account domain without dots). After saving it, make a note of the full URI (e.g., somethingladeskcom.pstn.twilio.com) for later use.
 


When adding credentials, input a friendly name, username, and password. Use a password generator for a strong password and save the username and password for the LiveAgent setup phase.

Twilio usernames and passwords should NOT contain special characters (e.g., @#$%).

Save the Termination screen settings. If you encounter an error message, proceed to steps 3 and 4 and then return to retry saving the Termination settings.
 

 

3. Setup Origination URI

In the Origination screen, add a new Origination URI, which will be one of the following options based on your LiveAgent hosting location (US, UK, or EU servers):

  • sip:1-sip-la-us-tx.ladesk.com (US servers)
  • sip:1-sip-la-us-ca.ladesk.com (US servers)
  • sip:1-sip-la-uk.ladesk.com (UK servers)
  • sip:1-sip-la-eu.ladesk.com (EU servers)
  • sip:1-sip-la-de.ladesk.com (EU servers)

The correct URI is displayed in your LiveAgent admin panel while adding a Twilio number (refer to step 5 for more details). Save the Origination screen settings.

If you are not sure which one to use please contact our live support. Do not forget to Save the whole Origination screen.
 

Pro tip - still on the Origination screen you can also specify a Disaster recovery URI which is called if for any reason our original Origination URI cannot be reached. In such cases you can forward the call to some other number which is not connected to this trunk. To do this you'd set the Disaster recovery URI to https://twimlets.com/forward?PhoneNumber=0018008112345, where you'd add your number adding international prefix with zeroes instead of +.

 

4. Add numbers to the SIP trunk

Navigate to the Numbers section to add existing Twilio numbers or purchase new numbers for your LiveAgent SIP trunk. Note down the numbers to be added to LiveAgent, including the international prefix and without any separators (e.g., +421233057904).
 


 

5. Create numbers in LiveAgent

With the Termination SIP URI, Termination Credentials, and numbers noted down, log in to your LiveAgent admin panel and go to Configuration > Call > Numbers > Create > select Twilio from the list of providers.
 


Fill in the required fields as follows:

  • Origination URI: Displayed in the LiveAgent admin panel (refer to step 3)
  • Name: Friendly name for the number (e.g., Sales number)
  • Number: Full number with +, international prefix, and without separators
  • Dial out prefix: Prefix used for hardware phones (enter e.g., 01)
  • Host: Termination SIP URI (e.g., somethingladeskcom.pstn.twilio.com)
  • Username: Termination Credentials username
  • Password: Termination Credentials password

 



Save the number to test outgoing and incoming calls. For outgoing calls, check the "Voice Geographic Permissions" section in your Twilio console to allow outgoing calls to other countries.

 

Conclusion

After setting up Twilio integration for hosted customers in LiveAgent, you may want to configure welcome, offline, and queue messages, as well as IVR options. Refer to a separate IVR guide for more information on these settings. By following the steps outlined in this article, you can successfully integrate Twilio with your LiveAgent account and enhance your call management capabilities.

×