Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

account_sid
sid<AC> Not PII

The unique id of the Account responsible for this domain.

api_version
string Not PII

The version of the Twilio API used to process the call.

auth_type
string Not PII

The types of authentication you have mapped to your domain. The possible values are "IP_ACL" and "CREDENTIAL_LIST". If you have both set up for your domain, both will be returned comma delimited. If you do not, have one setup for your domain, it will not be able to receive any traffic.

date_created
date_time<rfc2822> Not PII

The date that this resource was created, given as GMT in RFC 2822 format.

date_updated
date_time<rfc2822> Not PII

The date that this resource was last updated, given as GMT in RFC 2822 format.

domain_name
string Not PII

The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-".

friendly_name
string Not PII

A human readable descriptive text, up to 64 characters long.

sid
sid<SD> Not PII

A 34 character string that uniquely identifies the SIP domain in Twilio.

sip_registration
boolean Not PII

This boolean can be enabled to allow SIP Endpoints to register with this domain to receive calls.

subresource_uris
uri_map Not PII

A list of the list mapping resources associated with this SIP Domain resource.

uri
uri Not PII

The URI for this resource, relative to https://api.twilio.com

voice_fallback_method
http_method Not PII

The HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST.

voice_fallback_url

The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by VoiceUrl.

voice_method
http_method Not PII

The HTTP method Twilio will use when requesting the above Url. Either GET or POST.

voice_status_callback_method
http_method Not PII

The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.

voice_status_callback_url

The URL that Twilio will request to pass status parameters (such as call ended) to your application.

voice_url

The URL Twilio will request when this domain receives a call.

Create a SipDomain resource

post
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
Parameters
AccountSid
Required
post sid<AC> Not PII

The unique id of the Account responsible for this resource.

DomainName
Required
post string Not PII

The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-".

FriendlyName
Optional
post string Not PII

A human readable descriptive text, up to 64 characters long.

SipRegistration
Optional
post boolean Not PII

This boolean can be enabled to allow SIP Endpoints to register with this domain to receive calls.

VoiceFallbackMethod
Optional
post http_method Not PII

The HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST.

VoiceFallbackUrl
Optional
post url PII MTL: 30 DAYS

The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by VoiceUrl.

VoiceMethod
Optional
post http_method Not PII

The HTTP method Twilio will use when requesting the above Url. Either GET or POST.

VoiceStatusCallbackMethod
Optional
post http_method Not PII

The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.

VoiceStatusCallbackUrl
Optional
post url PII MTL: 30 DAYS

The URL that Twilio will request to pass status parameters (such as call ended) to your application.

VoiceUrl
Optional
post url PII MTL: 30 DAYS

The URL Twilio will request when this domain receives a call.

Example 1
Loading Code Sample...
      
      
      
      

      Fetch a SipDomain resource

      get
      https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
      Parameters
      AccountSid
      Required
      get sid<AC> Not PII

      The unique id of the Account responsible for this resource.

      Sid
      Required
      get sid<SD> Not PII

      The domain sid that uniquely identifies the resource

      Example 1
      Loading Code Sample...
          
          
          
          

          Read multiple SipDomain resources

          get
          https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
          Parameters
          AccountSid
          Required
          get sid<AC> Not PII

          The unique id of the Account responsible for this resource.

          Example 1
          Loading Code Sample...
              
              
              
              

              Update a SipDomain resource

              post
              https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
              Parameters
              AccountSid
              Required
              post sid<AC> Not PII

              The unique id of the Account responsible for this resource.

              Sid
              Required
              post sid<SD> Not PII

              The domain sid that uniquely identifies the resource

              FriendlyName
              Optional
              post string Not PII

              A user-specified, human-readable name for the trigger.

              SipRegistration
              Optional
              post boolean Not PII

              This boolean can be enabled to allow SIP Endpoints to register with this domain to receive calls.

              VoiceFallbackMethod
              Optional
              post http_method Not PII

              The HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST.

              VoiceFallbackUrl
              Optional
              post url PII MTL: 30 DAYS

              The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by VoiceUrl.

              VoiceMethod
              Optional
              post http_method Not PII

              The HTTP method to use with the voice_url

              VoiceStatusCallbackMethod
              Optional
              post http_method Not PII

              The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.

              VoiceStatusCallbackUrl
              Optional
              post url PII MTL: 30 DAYS

              The URL that Twilio will request to pass status parameters (such as call ended) to your application.

              VoiceUrl
              Optional
              post url PII MTL: 30 DAYS

              The URL Twilio will request when this domain receives a call.

              Example 1
              Loading Code Sample...
                  
                  
                  
                  

                  Delete a SipDomain resource

                  delete
                  https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
                  Parameters
                  AccountSid
                  Required
                  delete sid<AC> Not PII

                  The unique id of the Account responsible for this domain.

                  Sid
                  Required
                  delete sid<SD> Not PII

                  A 34 character string that uniquely identifies the SIP domain in Twilio.

                  Example 1
                  Loading Code Sample...
                      
                      
                      
                      

                      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 browsing the Twilio tag on Stack Overflow.

                      Loading Code Sample...