Menu

Expand
Rate this page:

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
sid<AC> Not PII

The SID of the Account that created the SipDomain resource.

api_version
string Not PII

The API version used to process the call.

auth_type
string Not PII

The types of authentication you have mapped to your domain. Can be: IP_ACL and CREDENTIAL_LIST. If you have both defined for your domain, both will be returned in a comma delimited string. If auth_type is not defined, the domain will not be able to receive any traffic.

date_created
date_time<rfc2822> Not PII

The date and time in GMT that the resource was created specified in RFC 2822 format.

date_updated
date_time<rfc2822> Not PII

The date and time in GMT that the resource was last updated specified 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 "-" and must end with sip.twilio.com.

friendly_name
string Not PII

The string that you assigned to describe the resource.

sid
sid<SD> Not PII

The unique string that that we created to identify the SipDomain resource.

uri
uri Not PII

The URI of the resource, relative to https://api.twilio.com.

voice_fallback_method
http_method Not PII

The HTTP method we use to call voice_fallback_url. Can be: GET or POST.

voice_fallback_url

The URL that we call when an error occurs while retrieving or executing the TwiML requested from voice_url.

voice_method
http_method Not PII

The HTTP method we use to call voice_url. Can be: GET or POST.

voice_status_callback_method
http_method Not PII

The HTTP method we use to call voice_status_callback_url. Either GET or POST.

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 voice_method when the domain receives a call.

subresource_uris
uri_map Not PII

A list of mapping resources associated with the SIP Domain resource identified by their relative URIs.

sip_registration
boolean Not PII

Whether to allow SIP Endpoints to register with the domain to receive calls.

emergency_calling_enabled
boolean Not PII

Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.

secure
boolean Not PII

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
sid<BY> Not PII

The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.

emergency_caller_sid
sid<PN> Not PII

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

post
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
Parameters
Parameters in REST API format
account_sid
Path
post sid<AC> Not PII

The SID of the Account that will create the resource.

domain_name
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 "-" and must end with sip.twilio.com.

friendly_name
Optional
post string Not PII

A descriptive string that you created to describe the resource. It can be up to 64 characters long.

voice_url
Optional
post url PII MTL: 30 DAYS

The URL we should when the domain receives a call.

voice_method
Optional
post http_method Not PII

The HTTP method we should use to call voice_url. Can be: GET or POST.

voice_fallback_url
Optional
post url PII MTL: 30 DAYS

The URL that we should call when an error occurs while retrieving or executing the TwiML from voice_url.

voice_fallback_method
Optional
post http_method Not PII

The HTTP method we should use to call voice_fallback_url. Can be: GET or POST.

voice_status_callback_url
Optional
post url PII MTL: 30 DAYS

The URL that we should call to pass status parameters (such as call ended) to your application.

voice_status_callback_method
Optional
post http_method Not PII

The HTTP method we should use to call voice_status_callback_url. Can be: GET or POST.

sip_registration
Optional
post boolean Not PII

Whether to allow SIP Endpoints to register with the domain to receive calls. Can be true or false. true allows SIP Endpoints to register with the domain to receive calls, false does not.

emergency_calling_enabled
Optional
post boolean Not PII

Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.

secure
Optional
post boolean Not PII

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
post sid<BY> Not PII

The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.

emergency_caller_sid
Optional
post sid<PN> Not PII

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
Loading Code Sample...
        
        

        Create a SipDomain resource

        Fetch a SipDomain resource

        get
        https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
        Parameters
        Parameters in REST API format
        account_sid
        Path
        get sid<AC> Not PII

        The SID of the Account that created the SipDomain resource to fetch.

        sid
        Path
        get sid<SD> Not PII

        The Twilio-provided string that uniquely identifies the SipDomain resource to fetch.

        Example 1
        Loading Code Sample...
              
              

              Fetch a SipDomain resource

              Read multiple SipDomain resources

              get
              https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains.json
              Parameters
              Parameters in REST API format
              account_sid
              Path
              get sid<AC> Not PII

              The SID of the Account that created the SipDomain resources to read.

              Example 1
              Loading Code Sample...
                    
                    

                    Read multiple SipDomain resources

                    Update a SipDomain resource

                    post
                    https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
                    Parameters
                    Parameters in REST API format
                    account_sid
                    Path
                    post sid<AC> Not PII

                    The SID of the Account that created the SipDomain resource to update.

                    sid
                    Path
                    post sid<SD> Not PII

                    The Twilio-provided string that uniquely identifies the SipDomain resource to update.

                    friendly_name
                    Optional
                    post string Not PII

                    A descriptive string that you created to describe the resource. It can be up to 64 characters long.

                    voice_fallback_method
                    Optional
                    post http_method Not PII

                    The HTTP method we should use to call voice_fallback_url. Can be: GET or POST.

                    voice_fallback_url
                    Optional
                    post url PII MTL: 30 DAYS

                    The URL that we should call when an error occurs while retrieving or executing the TwiML requested by voice_url.

                    voice_method
                    Optional
                    post http_method Not PII

                    The HTTP method we should use to call voice_url

                    voice_status_callback_method
                    Optional
                    post http_method Not PII

                    The HTTP method we should use to call voice_status_callback_url. Can be: GET or POST.

                    voice_status_callback_url
                    Optional
                    post url PII MTL: 30 DAYS

                    The URL that we should call to pass status parameters (such as call ended) to your application.

                    voice_url
                    Optional
                    post url PII MTL: 30 DAYS

                    The URL we should call when the domain receives a call.

                    sip_registration
                    Optional
                    post boolean Not PII

                    Whether to allow SIP Endpoints to register with the domain to receive calls. Can be true or false. true allows SIP Endpoints to register with the domain to receive calls, false does not.

                    domain_name
                    Optional
                    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 "-" and must end with sip.twilio.com.

                    emergency_calling_enabled
                    Optional
                    post boolean Not PII

                    Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.

                    secure
                    Optional
                    post boolean Not PII

                    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
                    post sid<BY> Not PII

                    The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.

                    emergency_caller_sid
                    Optional
                    post sid<PN> Not PII

                    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
                    Loading Code Sample...
                          
                          

                          Update a SipDomain resource

                          Delete a SipDomain resource

                          delete
                          https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{Sid}.json
                          Parameters
                          Parameters in REST API format
                          account_sid
                          Path
                          delete sid<AC> Not PII

                          The SID of the Account that created the SipDomain resources to delete.

                          sid
                          Path
                          delete sid<SD> Not PII

                          The Twilio-provided string that uniquely identifies the SipDomain resource to delete.

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete a SipDomain resource

                                Rate this page:

                                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.

                                Loading Code Sample...
                                      
                                      
                                      

                                      Thank you for your feedback!

                                      Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      thanks-feedback-gif