Skip to contentSkip to navigationSkip to topbar
On this page

Inbound Processing Region API - SipDomain


In the context of the Inbound Processing Region API, a SipDomain resource represents the routing configuration for a particular Programmable Voice SIP Domain.

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 SIP Domain.

(warning)

Warning

Changes to this resource may take up to 5 minutes to take effect. When you change the routing to a new Region for a SIP domain then it does not mean that the SIP Domain will be created automatically in the new Region. You will have to manually create the SIP Domain in the new Region with the same configuration.


SipDomain Properties

sipdomain-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sip_domainstring

Optional

Not PII

urlstring<uri>

Optional


sidSID<QQ>

Optional

Pattern: ^QQ[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>

Optional

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

friendly_namestring

Optional


voice_regionstring

Optional


date_createdstring<date-time>

Optional


date_updatedstring<date-time>

Optional


Fetch a SipDomain's current Inbound Processing Region configuration

fetch-a-sipdomains-current-inbound-processing-region-configuration page anchor
GET https://routes.twilio.com/v2/SipDomains/{SipDomain}

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
SipDomainstringrequired
Fetch a SipDomain's current Inbound Processing Region configurationLink to code sample: Fetch a SipDomain's current Inbound Processing Region configuration
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchSipDomain() {
11
const sipDomain = await client.routes.v2
12
.sipDomains("example.sip.twilio.com")
13
.fetch();
14
15
console.log(sipDomain.voiceRegion);
16
}
17
18
fetchSipDomain();

Output

1
{
2
"url": "https://routes.twilio.com/v2/SipDomains/test.sip.twilio.com",
3
"account_sid": "AC00000000000000000000000000000000",
4
"sid": "QQ00000000000000000000000000000000",
5
"sip_domain": "example.sip.twilio.com",
6
"friendly_name": "string",
7
"voice_region": "string",
8
"date_created": "2022-06-02T22:33:47Z",
9
"date_updated": "2022-06-02T22:33:47Z"
10
}

Update a SipDomain's Inbound Processing Region configuration

update-a-sipdomains-inbound-processing-region-configuration page anchor
POST https://routes.twilio.com/v2/SipDomains/{SipDomain}

Property nameTypeRequiredPIIDescription
SipDomainstringrequired
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
VoiceRegionstring

Optional


FriendlyNamestring

Optional

Update a SipDomain's Inbound Processing Region configurationLink to code sample: Update a SipDomain's Inbound Processing Region configuration
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateSipDomain() {
11
const sipDomain = await client.routes.v2
12
.sipDomains("example.sip.twilio.com")
13
.update({ voiceRegion: "au1" });
14
15
console.log(sipDomain.voiceRegion);
16
}
17
18
updateSipDomain();

Output

1
{
2
"url": "https://routes.twilio.com/v2/SipDomains/test.sip.twilio.com",
3
"sip_domain": "example.sip.twilio.com",
4
"sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6
"friendly_name": "friendly_name",
7
"voice_region": "au1",
8
"date_created": "2020-08-07T22:29:24Z",
9
"date_updated": "2020-08-07T22:29:24Z"
10
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.