Emergency Calling for SIP Trunking API
Twilio's Emergency Address registration 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 associate/dis-associate emergency addresses on a Phone Number associated with an Elastic SIP Trunk. Please ensure that you also read our Emergency Calling documentation.
The Phone Numbers subresource contains the list of Phone Number instances associated with this Trunk. Phone Number instances are managed through the core Twilio REST API. Check out the Phone Number reference docs for more information.
Associate an Emergency Address with a Twilio Number
- Create and validate a new Emergency Address.
- Associate an Emergency Address with a Twilio number.
- Check Emergency Address Status on a Twilio number.
Dis-associate an Emergency Address from a Twilio Number.
- Disassociate an Emergency Address from a Twilio number.
- Check Emergency Calling Status on a Twilio number.
- Delete an Emergency Address.
Actions
Create and validate a new Emergency Address
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
.
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
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{PhoneNumberSid}
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
Check Emergency Calling Status on a Twilio number
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/{PhoneNumberSid}
Delete an Emergency Address
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Addresses/{AddressSid}
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.
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.