SIP Domain Resource
A SIP Domain resource describes a custom DNS hostname that can accept SIP traffic for your account. A SIP request to that domain, such as to sip:alice@example.sip.twilio.com
, routes to Twilio. Twilio authenticates the request and requests TwiML from the voice_url
of the SIP Domain.
SIP Domain Authentication
Your SIP Domain must map at least one of these two authentication methods or requests to it will be blocked.
SipDomain properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the SipDomain resource. |
api_version
|
The API version used to process the call. |
auth_type
|
The types of authentication you have mapped to your domain. Can be: |
date_created
|
The date and time in GMT that the resource was created specified in RFC 2822 format. |
date_updated
|
The date and time in GMT that the resource was last updated specified in RFC 2822 format. |
domain_name
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with |
friendly_name
|
The string that you assigned to describe the resource. |
sid
|
The unique string that that we created to identify the SipDomain resource. |
uri
|
The URI of the resource, relative to |
voice_fallback_method
|
The HTTP method we use to call |
voice_fallback_url
|
The URL that we call when an error occurs while retrieving or executing the TwiML requested from |
voice_method
|
The HTTP method we use to call |
voice_status_callback_method
|
The HTTP method we use to call |
voice_status_callback_url
|
The URL that we call to pass status parameters (such as call ended) to your application. |
voice_url
|
The URL we call using the |
subresource_uris
|
A list of mapping resources associated with the SIP Domain resource identified by their relative URIs. |
sip_registration
|
Whether to allow SIP Endpoints to register with the domain to receive calls. |
emergency_calling_enabled
|
Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. |
secure
|
Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. |
byoc_trunk_sid
|
The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. |
emergency_caller_sid
|
Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. |
Create a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that will create the resource. |
domain_name
Required
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with |
friendly_name
Optional
|
A descriptive string that you created to describe the resource. It can be up to 64 characters long. |
voice_url
Optional
|
The URL we should when the domain receives a call. |
voice_method
Optional
|
The HTTP method we should use to call |
voice_fallback_url
Optional
|
The URL that we should call when an error occurs while retrieving or executing the TwiML from |
voice_fallback_method
Optional
|
The HTTP method we should use to call |
voice_status_callback_url
Optional
|
The URL that we should call to pass status parameters (such as call ended) to your application. |
voice_status_callback_method
Optional
|
The HTTP method we should use to call |
sip_registration
Optional
|
Whether to allow SIP Endpoints to register with the domain to receive calls. Can be |
emergency_calling_enabled
Optional
|
Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. |
secure
Optional
|
Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. |
byoc_trunk_sid
Optional
|
The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. |
emergency_caller_sid
Optional
|
Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. |
Example 1
Fetch a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resource to fetch. |
sid
Path
|
The Twilio-provided string that uniquely identifies the SipDomain resource to fetch. |
Example 1
Read multiple SipDomain resources
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resources to read. |
Example 1
Update a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resource to update. |
sid
Path
|
The Twilio-provided string that uniquely identifies the SipDomain resource to update. |
friendly_name
Optional
|
A descriptive string that you created to describe the resource. It can be up to 64 characters long. |
voice_fallback_method
Optional
|
The HTTP method we should use to call |
voice_fallback_url
Optional
|
The URL that we should call when an error occurs while retrieving or executing the TwiML requested by |
voice_method
Optional
|
The HTTP method we should use to call |
voice_status_callback_method
Optional
|
The HTTP method we should use to call |
voice_status_callback_url
Optional
|
The URL that we should call to pass status parameters (such as call ended) to your application. |
voice_url
Optional
|
The URL we should call when the domain receives a call. |
sip_registration
Optional
|
Whether to allow SIP Endpoints to register with the domain to receive calls. Can be |
domain_name
Optional
|
The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-" and must end with |
emergency_calling_enabled
Optional
|
Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses. |
secure
Optional
|
Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain. |
byoc_trunk_sid
Optional
|
The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with. |
emergency_caller_sid
Optional
|
Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call. |
Example 1
Delete a SipDomain resource
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account that created the SipDomain resources to delete. |
sid
Path
|
The Twilio-provided string that uniquely identifies the SipDomain resource to delete. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.