Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

SIP Interface over Twilio Interconnect


(warning)

Warning

On February 21, 2024, Twilio updated the media IPs and port ranges for calls in all regions to 168.86.128.0/18 and expanded the UDP port range to 10000-60000. Old IP and port ranges no longer accept or send traffic after this date.

Connect your SIP infrastructure to Twilio over a private connection by pointing your equipment to localized SIP Domain URIs and using the edge parameter in TwiML or API requests. You can use this guide to create inbound or outbound contact centers and enable PSTN connectivity.

See Related reference documentation to learn more about the SIP and API elements used in this guide.


Configure your SIP Interface over Twilio Interconnect

configure-your-sip-interface-over-twilio-interconnect page anchor

Sending SIP to Twilio

sip-out page anchor

To connect over Twilio Interconnect, point your communications infrastructure to the following localized SIP Domain URIs:

SIP Domain URIInterconnect Exchange
{example}.sip.ashburn-ix.twilio.comAshburn, Virginia, United States
{example}.sip.san-jose-ix.twilio.comSan Jose, California, United States
{example}.sip.london-ix.twilio.comLondon, United Kingdom
{example}.sip.frankfurt-ix.twilio.comFrankfurt, Germany
{example}.sip.singapore-ix.twilio.comSingapore
{example}.sip.tokyo-ix.twilio.comTokyo, Japan
{example}.sip.sydney-ix.twilio.comSydney, Australia
{example}.sip.sao-paulo-ix.twilio.comSão Paulo, Brazil
(information)

Info

{example} will be replaced by the unique part of the SIP Domain that you previously configured. Refer to the SIP Domains page in Twilio Console(link takes you to an external page) or the legacy Console(link takes you to an external page) for SIP Domain setup. For example, if your SIP Domain was example.sip.twilio.com , then it would be example.sip.london-ix.twilio.com (for the London IX).

(information)

Info

If you are looking for the legacy Interconnect SIP Domain URI list, visit here. eg: {example}.sip.de1.twilio.com

Receiving SIP from Twilio over Twilio Interconnect

sip-in page anchor

In order for your SIP Endpoint to receive calls from Twilio, you will use the same TwiML or REST API calls you use today. The only difference is that you will now be specifying your Twilio Interconnect Connection, by including the edge parameter in the URI with the value of the Twilio Interconnect Edge Location where your private connection is configured, for example:

1
<Response>
2
<Dial>
3
<Sip>
4
sip:yourusername@example.com;edge={EDGE_LOCATION}
5
</Sip>
6
</Dial>
7
</Response>
8

You may also use the deprecated tnx parameter in the URI with the SID value of the desired Twilio Interconnect connection, however, it is preferred that you use the edge parameter as documented above. An example of using the tnx parameter:

1
<Response>
2
<Dial>
3
<Sip>
4
sip:yourusername@example.com;tnx={TNX_SID}
5
</Sip>
6
</Dial>
7
</Response>
8

Media IP addresses using Twilio Interconnect

ipwhitelist-tnx page anchor

Interconnect Connections - Global Media IP Range

The Interconnect Connections Destination IP Ranges and Port Ranges are now identical across all locations:

Secure Media (ICE/STUN/SRTP) Edge LocationsProtocolSource IPSource Port †Destination IP RangesDestination Port Range
sydney-ix (au1-ix)
sao-paulo-ix (br1-ix)
london-ix (ie1-ix)
frankfurt-ix (de1-ix)
tokyo-ix (jp1-ix)
singapore-ix (sg1-ix)
ashburn-ix (us1-ix)
san-jose-ix (us2-ix)
roaming (gll-ix)
UDPANYANY168.86.128.0/1810,000 - 60,000

† The SDK will select any available port from the ephemeral range. On most machines, this means the port range 1,024 to 65,535.

SIGNALLING IP addresses using Twilio Interconnect

ipwhitelist-tnx-1 page anchor

We strongly encourage you to allow all of Twilio's following IP address ranges and ports on your firewall for SIP signalling traffic. This is important if you have Numbers in different regions and for resilience purposes (e.g. if North America Virginia gateways are down, then North America Oregon gateways will be used).

North America Virginia Interconnect Gateways

north-america-virginia-interconnect-gateways page anchor
1
208.78.112.64
2
208.78.112.65
3
208.78.112.66
4
Ports: 5060 (UDP/TCP), 5061 (TLS)
5

North America Oregon Interconnect Gateways

north-america-oregon-interconnect-gateways page anchor
1
67.213.136.64
2
67.213.136.65
3
67.213.136.66
4
Ports: 5060 (UDP/TCP), 5061 (TLS)
5

Europe London Interconnect Gateways

europe-london-interconnect-gateways page anchor
1
185.187.132.68
2
185.187.132.69
3
185.187.132.70
4
Ports: 5060 (UDP/TCP), 5061 (TLS)
5

Europe Frankfurt Interconnect Gateways

europe-frankfurt-interconnect-gateways page anchor
1
185.194.136.64
2
185.194.136.65
3
185.194.136.66
4
Ports: 5060 (UDP/TCP), 5061 (TLS)
5

Asia Pacific Singapore Interconnect Gateways

asia-pacific-singapore-interconnect-gateways page anchor
1
103.75.151.68
2
103.75.151.69
3
103.75.151.70
4
Ports: 5060 (UDP/TCP), 5061 (TLS)
5

Asia Pacific Tokyo Interconnect Gateways

asia-pacific-tokyo-interconnect-gateways page anchor
1
103.144.142.68
2
103.144.142.69
3
103.144.142.70
4
Ports: 5060 (UDP/TCP), 5061 (TLS)
5

Asia Pacific Sydney Interconnect Gateways

asia-pacific-sydney-interconnect-gateways page anchor
1
103.146.214.68
2
103.146.214.69
3
103.146.214.70
4
Ports: 5060 (UDP/TCP), 5061 (TLS)

South America São Paulo Interconnect Gateways

south-america-são-paulo-interconnect-gateways page anchor
1
159.183.255.68
2
159.183.255.69
3
159.183.255.70
4
Ports: 5060 (UDP/TCP), 5061 (TLS)
5

Use cases for SIP Interface over Twilio Interconnect with Twilio Programmable Voice

use-cases-for-sip-interface-over-twilio-interconnect-with-twilio-programmable-voice page anchor

This guide teaches the basics required for the following use cases:

Create an inbound contact center with Twilio Programmable Voice

create-an-inbound-contact-center-with-twilio-programmable-voice page anchor

You can use this guide to securely route incoming calls from the PSTN to your private SIP infrastructure for inbound contact center agents.

To learn more advanced features that you can use with inbound contact centers, see Voice inbound call center.

Create an outbound call center with Twilio Programmable Voice

create-an-outbound-call-center-with-twilio-programmable-voice page anchor

You can use this guide to send SIP traffic from your private infrastructure to Twilio's SIP Interface to place outbound calls to the PSTN.

To learn more advanced features that you can use with outbound call centers, see Voice outbound call center.

Enable PSTN connectivity with Twilio Programmable Voice

enable-pstn-connectivity-with-twilio-programmable-voice page anchor

You can use this guide to bridge your private SIP network with the public switched telephone network (PSTN) using a dedicated, private connection.

To learn more advanced features that you can use with PSTN connectivity, see Voice PSTN connectivity.


After following this guide, you have established a private, secure path for SIP signaling and media between your infrastructure and Twilio. You can confirm it worked by placing a test call and verifying that the traffic traverses your Interconnect connection rather than the public internet, and by checking that signaling reaches the correct localized SIP URI.


Explore the following guides to build on what you've learned in this guide:

  • Emergency calling for SIP interfaces: Configure emergency call routing and address validation for your SIP infrastructure.
  • SIP: Explore the foundational concepts and configuration options for Twilio SIP Interfaces.
  • How to add programmability to your existing SIP network: Learn how to wrap your SIP calls in TwiML to add features like recording and IVRs.
  • SIP API: Manage your SIP Domains, IP access control lists, and credentials programmatically.
  • Secure media: Implement SRTP to encrypt your media streams for enhanced security.