This guide will show you how to control which Twilio Region is used for calls made via your Trunk.
Before you can use your SIP Trunk in a new Region, you must first create the SIP Trunk resource in the target Region. To learn how to manage Regional resources via the Twilio Console, check out this guide.
You may create a SIP Trunk with the same friendly name and Termination URI in multiple Regions. However, a given SIP Trunk will only be "active" (in the sense that it can send or receive calls) in one Region at any time.
When you have a SIP Trunk in multiple Regions, you can control which Region is used for call origination and termination separately.
Twilio sends calls to your SIP infrastructure via your SIP Trunk when it receives a call to one of your Twilio phone numbers that is associated with your SIP Trunk. These SIP Trunking calls are processed and stored in the same Region where the incoming call is being handled. Thus, to control which Region handles SIP Trunking call processing and data storage for your incoming phone numbers, you must configure Regional routing for the phone numbers themselves. Learn how to configure Regional routing for your Twilio phone numbers in this guide.
For example, consider you have a Trunk in Twilio's United States (US1) Region named "East Mountain Office", with an associated phone number,
+14025551212. You are in the process of migrating the Trunk to the Ireland (IE1) Region in order to keep the Trunk's call processing and record storage local to Twilio's datacenters in the EU. You've created the Trunk resource in IE1, configured its Origination SIP URI to point to your infrastructure, and associated the Trunk with your phone number. However, if the phone number is still routed to US1 based on its own configuration, it'll still be sending calls to the US1 instance of your Trunk. To complete the migration, re-route the phone number to IE1. Now, calls to the number will be sent to the IE1 instance of your Trunk.
Your infrastructure sends outbound calls to the PSTN by connecting to your SIP Trunk's Termination URI. You can create Trunks with the same Termination URI in multiple Regions - however, just like phone numbers, only a single Region will be "active" for a given Termination URI at any time. Whichever Region is active is the Region where the terminating calls will be processed and the resulting data stored.
For example, consider that you have a Trunk in Twilio's US1 Region with a Termination URI of
east-mountain-office.pstn.twilio.com, and your PBX is configured to send outbound calls to this URI. You've created an instance of your Trunk with the same Termination URI in the IE1 Region. However, calls sent from your PBX will still be processed in US1, until you re-route the Termination URI such that IE1 is the active Region.
Check which Region is active by viewing the Trunk's configuration for a Region in Twilio Console and looking for the routing card. To change which Region is active, click the Re-route button in the target Region's configuration.
Note that IP Access Control Lists, Credential Lists, and phone number associations are also Region-specific. When configuring your SIP Trunk in a given Region, you'll need to create these related resources and settings in the same Region.
When your infrastructure connects to Twilio via your Trunk's Termination URI, you can select a specific Edge Location to connect through by using a "localized" form of your SIP Termination URI. Click the "Show Localized URIs" button on your SIP Trunk's Termination configuration page to view a complete list of these localized URIs.
Note that the localized URI you select does not affect which Twilio Region will be used to process calls. The URI affects network ingress only; the processing Region is selected based on which of your SIP Termination URI's Region configurations is currently active, as discussed above.
You can also control which Edge Location connections from Twilio to your infrastructure are sent from, by specifying the
edge parameter in your Trunk's Origination URIs. For more details, see the Origination section of the SIP Trunking documentation. Remember that the Edge Location you select does not influence the processing Region. The processing Region for originating calls is determined by the Twilio phone number's routing settings, as discussed above.