Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Inbound Processing Region API - Trunk


In the context of the Inbound Processing Region API, a Trunk resource represents the routing configuration for a particular Elastic SIP Trunk.

By adjusting the value of the voice_region property, you can control which Twilio Region will process and store data related to inbound calls for the Trunk.

(warning)

Warning

Changes to this resource may take up to 5 minutes to take effect.


Trunk properties

trunk-properties page anchor
Resource properties
sip_trunk_domaintype: stringNot PII

The absolute URL of the SIP Trunk


urltype: string<URI>Not PII

The absolute URL of the resource.


sidtype: SID<QQ>Not PII

A 34 character string that uniquely identifies the Inbound Processing Region assignments for this SIP Trunk.


account_sidtype: SID<AC>Not PII

The unique SID identifier of the Account.


friendly_nametype: stringNot PII

A human readable description of the Inbound Processing Region assignments for this SIP Trunk, up to 64 characters.


voice_regiontype: stringNot PII

The Inbound Processing Region used for this SIP Trunk for voice.


date_createdtype: string<DATE TIME>Not PII

The date that this SIP Trunk was assigned an Inbound Processing Region, given in ISO 8601 format.


date_updatedtype: string<DATE TIME>Not PII

The date that the Inbound Processing Region was updated for this SIP Trunk, given in ISO 8601 format.


Fetch a Trunk's current Inbound Processing Region configuration

fetch-a-trunks-current-inbound-processing-region-configuration page anchor
GET https://routes.twilio.com/v2/Trunks/{SipTrunkDomain}

Parameters

fetch-parameters page anchor
URI parameters
SipTrunkDomaintype: stringNot PII
Path Parameter

The absolute URL of the SIP Trunk

Fetch a Trunk's current Inbound Processing Region configuration

fetch-a-trunks-current-inbound-processing-region-configuration-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.routes.v2.trunks('example.pstn.twilio.com')
_10
.fetch()
_10
.then(trunk => console.log(trunk.voiceRegion));

Output

_10
{
_10
"sip_trunk_domain": "example.pstn.twilio.com",
_10
"url": "https://routes.twilio.com/v2/Trunks/test.pstn.twilio.com",
_10
"account_sid": "AC00000000000000000000000000000000",
_10
"sid": "QQ00000000000000000000000000000000",
_10
"friendly_name": "string",
_10
"voice_region": "string",
_10
"date_created": "2022-06-02T22:33:47Z",
_10
"date_updated": "2022-06-02T22:33:47Z"
_10
}


Update a Trunk's Inbound Processing Region configuration

update-a-trunks-inbound-processing-region-configuration page anchor
POST https://routes.twilio.com/v2/Trunks/{SipTrunkDomain}

URI parameters
SipTrunkDomaintype: stringNot PII
Path Parameter

The absolute URL of the SIP Trunk


Request body parameters
VoiceRegiontype: stringNot PII

The Inbound Processing Region used for this SIP Trunk for voice


FriendlyNametype: stringNot PII

A human readable description of this resource, up to 64 characters.

Update a Trunk's Inbound Processing Region configuration

update-a-trunks-inbound-processing-region-configuration-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.routes.v2.trunks('example.pstn.twilio.com')
_10
.update({voiceRegion: 'au1'})
_10
.then(trunk => console.log(trunk.voiceRegion));

Output

_10
{
_10
"sip_trunk_domain": "example.pstn.twilio.com",
_10
"url": "https://routes.twilio.com/v2/Trunks/test.pstn.twilio.com",
_10
"sid": "QQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"friendly_name": "friendly_name",
_10
"voice_region": "au1",
_10
"date_created": "2020-08-07T22:29:24Z",
_10
"date_updated": "2020-08-07T22:29:24Z"
_10
}


Rate this page: