Provider Setup
Configure SipLine with Twilio SIP Trunking
Connect SipLine to Twilio's Elastic SIP Trunking service for flexible, pay-as-you-go VoIP calling. This guide covers creating a trunk, setting up credentials, and configuring SipLine.
8 min read
Prerequisites
- A Twilio account (https://www.twilio.com/)
- SipLine installed on your computer
- A Twilio SIP trunk created in the Twilio Console (or we will create one in step 1)
Table of Contents
1
Create a SIP Trunk in Twilio Console
Log in to the Twilio Console and navigate to Elastic SIP Trunking > Trunks. Click Create new SIP Trunk and give it a descriptive name (e.g., "SipLine Desktop"). Note the trunk SID — you will need it for the next steps.
If you already have a SIP trunk, you can reuse it. Each trunk supports multiple credential lists and origination URIs.
2
Create a Credential List
Go to Elastic SIP Trunking > Authentication > Credential Lists and click Create new Credential List. Add a username and a strong password — these will be your SIP login credentials in SipLine. Then go back to your trunk settings and assign this credential list under the Authentication tab.
Twilio requires digest authentication. Make sure the credential list is assigned to the trunk's Termination authentication section, or outbound calls will be rejected.
3
Configure the Origination URI
In your trunk settings, go to the Origination tab and add an origination URI. This tells Twilio where to send incoming calls. Set it to your SipLine's public IP or SIP address. If you only need outbound calls, you can skip this step for now.
For receiving calls behind NAT, consider using a SIP registration-based approach. Twilio also supports SIP domain registration as an alternative to static origination URIs.
4
Set Up Termination
Go to the Termination tab in your trunk settings. Note the termination SIP URI — it will look like
your-trunk-name.pstn.twilio.com. This is the SIP server address you will configure in SipLine. Make sure the credential list from step 2 is assigned here.You can also restrict termination to specific IP addresses for added security under the IP Access Control Lists section.
5
Configure the Account in SipLine
Open SipLine and go to Settings > SIP Accounts > Add Account. Enter the following: SIP Server:
your-trunk-name.pstn.twilio.com, Port: 5060 (or 5061 for TLS), Username and Password from your Twilio credential list. Click Save and wait for the status to show Registered.SipLine uses local port
15060 by default to avoid conflicts with other SIP software. The remote server port (5060/5061) is separate from SipLine's local listening port.Replace
your-trunk-name with the actual termination URI shown in your Twilio trunk settings. Using the wrong URI will result in registration failure.6
Enable SRTP for Encrypted Audio
Twilio supports SRTP for media encryption. In SipLine, go to Settings > SIP Accounts > [Your Account] > Security and enable SRTP. Also set the transport to TLS (port
5061) for encrypted signaling. This ensures both your call setup and audio are encrypted end-to-end to Twilio's servers.Using TLS + SRTP is strongly recommended with Twilio. It prevents eavesdropping and is required for some compliance frameworks like HIPAA.
Frequently Asked Questions
How much does Twilio SIP Trunking cost?
Twilio uses pay-as-you-go pricing. You pay per minute for outbound and inbound calls, with rates varying by destination. There are no monthly trunk fees — you only pay for usage. Check the Twilio SIP Trunking pricing page for current rates.
Can I receive calls through Twilio on SipLine?
Yes. You need to purchase a phone number in the Twilio Console and configure the origination URI in your trunk to point to SipLine. When someone calls your Twilio number, Twilio will route the call to SipLine via the origination settings. You can also use TwiML for advanced call routing.
Should I use SRTP with Twilio?
Yes, it is recommended. Twilio fully supports SRTP for media encryption. Enable SRTP in SipLine and use TLS transport (port
5061) for signaling encryption. This protects your calls from interception. Twilio's documentation recommends encrypted connections for production use.Can I configure multiple Twilio trunks in SipLine?
Yes. You can add multiple SIP accounts in SipLine, each pointing to a different Twilio trunk. This is useful if you have separate trunks for different phone numbers or regions. Each account will register independently.
Registration fails with a 403 error. What is wrong?
A 403 Forbidden error from Twilio usually means the credential list is not assigned to the trunk's termination section, or the username/password is incorrect. Verify in the Twilio Console that (1) your credential list exists and has the correct credentials, (2) it is assigned under your trunk's Termination > Authentication, and (3) you are using the correct termination SIP URI.
Related Guides
Ready to Get Started?
Download SipLine for free and follow along with this guide.