Menu

Expand
Rate this page:

Emergency Calling for SIP Interfaces API

Twilio’s Emergency Calling for SIP API enables emergency call routing to Public Safety Answering Points (PSAPs) in the US, Canada, and the UK.

Emergency addresses are registered on a per phone number basis. This page outlines the process you should follow to register emergency addresses and enable or disable emergency calling using Programmable Voice SIP Interfaces. Please ensure that you also read our emergency calling documentation.

Phone numbers are managed through the core Twilio REST API. Check out the IncomingPhoneNumber resource documentation for more information.

Register an Emergency Address on a Twilio Number

  • Create and validate a new Emergency Address.
  • Associate an Emergency Address with a Twilio number.
  • Check Emergency Calling Address Status on a Twilio number to ensure it's registered.
  • Enable Emergency Calling on a SIP Domain.

Delete Emergency Address on a Twilio Number

  • Set Emergency Address to Null.
  • Check Emergency Address Status on a Twilio number to ensure it's unregistered.
  • Disable Emergency Calling on a SIP Domain.

Changing the Emergency Address on a Twilio Number

  • Dis-associate the Emergency Address from your Twilio Number.
  • Check Emergency Address Status on a Twilio number to ensure it's unregistered.
  • Associate new Emergency Address with Twilio Number.
  • Check Emergency Address Status on a Twilio number to ensure it's registered.

Add Emergency Caller ID

  • Set Emergency Enabled Twilio Phone Number as Emergency Caller ID.

Actions

Create and validate a new Emergency Address

post
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Addresses

Create a new Address and validate it for Emergency Calling by setting the EmergencyEnabled parameter to true.

Loading Code Sample...
        
        
        
        Ensure to set EmergencyEnabled to True

        Create and validate a new Emergency Address

        Ensure to set EmergencyEnabled to True
        Example Response(s)

        A new address might be suggested as part of the validation process:

        <?xml version='1.0' encoding='UTF-8'?>
        <TwilioResponse>
         <RestException>
          <Code>21629</Code>
          <Message>Failed to validate address. Check the suggested address. | FriendlyName: Twilio, CustomerName: Twilio, Street: 645 HARRISON ST, Locality: SAN FRANCISCO, Region: CA, PostalCode: 94105, IsoCountry: US</Message>
          <MoreInfo>https://www.twilio.com/docs/errors/21629</MoreInfo>
          <Status>400</Status>
         </RestException>
        </TwilioResponse>
        }
        

        Associate an Emergency Address with a Twilio number

        post
        https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{PhoneNumberSid}
        Loading Code Sample...
              
              
              

              Associate an Emergency Address with a Twilio Number

              You can disassociate an Emergency Address by updating the the emergency_address_sid to null (or undefined, None or nil depending on your programming language).

              For curl leave the right side of the = blank:

              curl -X POST https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json \
              --data-urlencode "EmergencyAddressSid=" \
              -u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token

              Enable and disable Emergency Calling

              post
              https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{PhoneNumberSid}

              Please note that this step must not be combined with the previous one, they must be two separate API calls. You must associate/disassociate and then enable/disable.

              Loading Code Sample...
                    
                    
                    

                    Enable Emergency Calling on a Twilio number

                    Note the EmergencyStatus parameter will change to Pending Activation. This process might take up to 5 minutes.

                    Loading Code Sample...
                          
                          
                          

                          Disable Emergency Calling on a Twilio number

                          Note the EmergencyStatus parameter will change to Pending Deactivation. This process may take up to 5 minutes.

                          Check Emergency Calling Status on a Twilio number

                          get
                          https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{PhoneNumberSid}
                          Loading Code Sample...
                                
                                
                                

                                Check Emergency Calling Status on a Twilio number

                                Delete an Emergency Address

                                delete
                                https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}
                                Loading Code Sample...
                                      
                                      
                                      

                                      Delete an Emergency Address

                                      Enable and Disable Emergency Calling on SIP Domain

                                      post
                                      https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}
                                      Loading Code Sample...
                                            
                                            
                                            

                                            Enable Emergency Calling on a SIP Domain

                                            Loading Code Sample...
                                                  
                                                  
                                                  

                                                  Disable Emergency Calling on a SIP Domain

                                                  Loading Code Sample...
                                                        
                                                        
                                                        
                                                        Phone Number SID of an emergency address registered Twilio phone number. If present, this phone number will be used as the callback for the emergency call.

                                                        Add Emergency Caller ID

                                                        Phone Number SID of an emergency address registered Twilio phone number. If present, this phone number will be used as the callback for the emergency call.
                                                        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