Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Twilio, Hellechat, Linphone Configuration

Brian Webb edited this page Mar 2, 2022 · 2 revisions

This document provides step by step directions for how to provision a phone number and SIP resources using Twilio, connect that to Hellechat and then to the Linphone software as the destination handset. Credit: This documentation is based on similar information from inteltechniques.com

(1) Twilio: SIP Domain & Resource IDs

• Within the Twilio Dashboard, click "Get a Trial Number". Either accept the generated number or use the search feature to find a number within your desired area code. This will deduct $1 from your trial balance. My demo number is "2025551212". If this is option is not present, click the "Develop" link in the upper left menu, then "Phone Numbers", then "manage", then "Active Numbers", then "Buy a Number". Enter your desired area code and "Search" for a suitable number. Click "Buy" next to the desired number.

• Click the "Voice" link in the left menu.

• Choose the "Manage" menu option.

• Click the "SIP Domains" option and click the "+" to create a new domain.

• Enter the assigned telephone number as the "Friendly Name", such as "2025551212".

• Enter the assigned telephone number as the "SIP URI", such as "2025551212".

• Under "Voice Authentication", click the "+" next to "Credential List".

• Enter a "Friendly" name of your number, such as "2025551212".

• Enter a "Username" of your number, such as "2025551212".

• Enter a secure password and click "Create".

• Under "SIP Registration", click the "Disabled" button to enable it.

• In the "Credentials List" drop-down, choose your telephone number and click "Save".

  • Note the text under the SIP Registration heading, following the description and the domain-name you created, note down your sip registration URL. It will be something like: {domain-name}.sip.us1.twilio.com.

  • Go to the dashboard (upper left, 'console' project link) & copy your AccountSID & Auth Token.

  • In Twilio click 'Phone Numbers > Manage > Active Numbers' in the left nav, then click on your phone number and on the next page copy "Phone number SID"

(2) HelleChat: Service Account & Number Configuraiton

  • Under your name in the top right, select Service Accounts, then 'Add Service Account'

  • In the slide in form, give the service account a name, select Twilio as the provider, then paste in your AccountSid and AuthToken, then save.

  • Under your name in the top right, select Numbers, then 'Add Number' to see the slide out number form.

  • On the nubmer form, select the service account you just created in the first drop down, past in your Provider ID, give the phone number a friendly name, type in the phone number in E.164 format and paste in the SIP Registration URL saved previously.

  • On the number listing page, note down the "Messaging Endpoint" and "Voice Endpoint" for the number you just created.

(3) Twilio: Call Control

  • On the same phone number details page you were previously on. Scroll down to the "Voice" section, ensure the dropdown for "a call comes in" has "webhook" selected, in the text field to the right paste in the "Voice Endpoint" from HelleChat you copied down.

  • On the same page, scroll down to the "Messaging" section, ensure the dropdown for "a message comes in" has "webhook" selected, in the text field to the right paste in the "Messaging Endpoint" from HelleChat you copied down.

  • Now click the "Save" button at the bottom of the page.

• Click "My TwiML Bins" in the left menu.

• Click the plus sign to create a new bin.

• Provide a "Friendly" name of "outgoingvoice".

• Place the following text in the TwiML box.

{{#e164}}{{To}}{{/e164}}

• Click "Create" and "Save".

• Click the "Voice" link in the left menu.

• Choose the "Manage" menu option.

• Click the "SIP Domains".

• Select your domain.

• Under "Call Control Configuration" then "A Call Comes In", change "Webhook" to "TwiML Bin" and select "outgoingvoice" in the drop-down menu.

• Click "Save".

(4) Linphone number setup

  • On the main menu, select "Assistant", then "Use SIP Account"

  • Enter the username and password created in step 1 with Twilio for SIP Domain authentication

  • Enter the SIP registration domain created in step 1 with a format like: {domain-name}.sip.us1.twilio.com

  • Enter an optional display name to describe the number (i.e. Work, Vendors etc.)

  • Set the Transport to TLS

  • Select the LOGIN button. Now in the main menu you should see the entry you just created, and if all went well, a green dot next to that entry indicated successful connection.

  • Now its time to make a test call. Using Linphone dial out to a number. You should receive an automated message thanking you for using your demo account. This confirms that we can place calls to Twilio’s servers, but we are far from unlimited usage to real numbers. We are now ready to attempt a stricter test call. You still cannot call any real number, but you should be able to place a call to any “Verified” number. If you provided a phone number number during account creation, that number is automatically verified. If you did not, complete the following within your Twilio dashboard to add a verified number for testing.

(5) Twilio: Configure a verified number for testing

• Click “Phone Numbers” > “Manage” > “Verified Caller IDs” in the left menu.

• Add a new number which can be accessed.

• Confirm whether you prefer a call or text and verify the call or text to add the number.

Return to your Linphone application and attempt a call to the number which you have verified with Twilio. After a brief message about the trial account, the call should go through. If you can complete a test call to your own number, your configuration is complete. You are now restricted to only calling verified numbers. I have seen this fail with some VOIP numbers. If this happens to you, do not be alarmed. As long as you receive a confirmed test call message from Twilio, your configuration is complete. If you would like to remove all restrictions to make and receive calls to and from any number, you must “Upgrade” the account. The following should be conducted within the Twilio portal.

• Return to the Dashboard in the upper left menu.

• Click the “upgrade” link and provide all requested billing details.

• Provide any credit, debit, or registered prepaid card.

• Apply $20 to the account.

You should now have an unrestricted Twilio account which should be fully functional for voice calls. Please do not upgrade the account until you know your test calls are going through. You should also have a fully functional VOIP application which can facilitate calls.