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?

Emergency Calling

Twilio's Emergency Calling enables 911 call routing to Public Safety Answering Points (PSAPs) in the US and Canada using your Elastic SIP Trunk.

Emergency calling is enabled on a per Phone Number basis. This page outlines the process you should follow to enable/disable E911 on 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.

Enable Emergency Calling on a Twilio Number

Disable Emergency Calling on a Twilio Number

Changing the Emergency Address on a Twilio Number


Actions

Enable Emergency Calling on a Twilio Number

In order to Enable Emergency Calling on a Twilio Number associated with an Elastic SIP Trunk via the API you must follow the following four steps:


Create and validate a new Emergency Address

Back To Top

POST /Accounts/{Account SID}/Addresses 

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

curl -XPOST https://api.twilio.com/2010-04-01/Accounts/{Account SID}/Addresses \    
    -d "FriendlyName=Twilio" \
    -d "CustomerName=Twilio" \
    -d "Street=645 Harrison St." \
    -d "City=San Francisco" \
    -d "PostalCode=94105" \
    -d "Region=CA" \
    -d "IsoCountry=US" \
    -d "EmergencyEnabled=True" \
    -u '{twilio account sid}:{twilio auth token}'
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>
}

Or the address is validated & accepted:

<?xml version='1.0' encoding='UTF-8'?>
<TwilioResponse>
 <Address>
  <Sid>AD0d06f4385cf94f94761a9903a2fdd2c5</Sid>
  <AccountSid>ACxxx</AccountSid>  
  <FriendlyName>Twilio</FriendlyName>
  <CustomerName>Twilio</CustomerName>
  <Street>645 HARRISON ST</Street>
  <City>SAN FRANCISCO</City>
  <Region>CA</Region>
  <PostalCode>94105</PostalCode>
  <IsoCountry>US</IsoCountry>
  <Uri>/2010-04-01/Accounts/ACxxx/Addresses/AD0d06f4385cf94f94761a9903a2fdd2c5</Uri>
  <DateCreated>Fri, 05 Aug 2016 17:43:50 +0000</DateCreated>
  <DateUpdated>Fri, 05 Aug 2016 17:43:50 +0000</DateUpdated>
  <EmergencyEnabled>true</EmergencyEnabled>
 </Address>
</TwilioResponse>
}


Associate an Emergency Address with a Twilio number

Back To Top

POST /Accounts/{Account SID}/IncomingPhoneNumbers/{PhoneNumber SID} 
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACxxx/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441 \
-d "EmergencyAddressSid=AD0d06f4385cf94f94761a9903a2fdd2c5" \
    -u '{twilio account sid}:{twilio auth token}'
Example Response(s)
<?xml version="1.0" encoding="UTF-8"?>
<TwilioResponse>
  <IncomingPhoneNumber>
    <Sid>PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Sid>
    <AccountSid>AC82f240bb054e6bed8b8376030816aa7d</AccountSid>
    <FriendlyName>(347) 862-9385</FriendlyName>
    <PhoneNumber>+13478629385</PhoneNumber>
    <VoiceUrl />
    <VoiceMethod>POST</VoiceMethod>
    <VoiceFallbackUrl />
    <VoiceFallbackMethod>POST</VoiceFallbackMethod>
    <VoiceCallerIdLookup>false</VoiceCallerIdLookup>
    <DateCreated>Mon, 24 Nov 2014 23:14:38 +0000</DateCreated>
    <DateUpdated>Fri, 05 Aug 2016 17:52:33 +0000</DateUpdated>
    <SmsUrl>https://demo.twilio.com/welcome/sms/reply/</SmsUrl>
    <SmsMethod>POST</SmsMethod>
    <SmsFallbackUrl />
    <SmsFallbackMethod>POST</SmsFallbackMethod>
    <AddressRequirements>none</AddressRequirements>
    <Beta>false</Beta>
    <Capabilities>
      <Voice>true</Voice>
      <SMS>false</SMS>
      <MMS>false</MMS>
    </Capabilities>
    <StatusCallback />
    <StatusCallbackMethod>POST</StatusCallbackMethod>
    <ApiVersion>2010-04-01</ApiVersion>
    <VoiceApplicationSid />
    <SmsApplicationSid />
    <TrunkSid>TK52291f8799518599e7251dc3408a8ebc</TrunkSid>
    <EmergencyStatus>Inactive</EmergencyStatus>
    <EmergencyAddressSid>AD0d06f4385cf94f94761a9903a2fdd2c5</EmergencyAddressSid>
    <Uri>/2010-04-01/Accounts/AC82f240bb054e6bed8b8376030816aa7d/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Uri>
  </IncomingPhoneNumber>
</TwilioResponse>


Enable Emergency Calling on a Twilio number

Back To Top

Please note that this step MUST NOT be combined with the previous one, they must be two separate API calls.

POST /Accounts/{Account SID}/IncomingPhoneNumbers/{PhoneNumber SID} 
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACxxx/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441 \
-d "EmergencyStatus=Active" \
    -u '{twilio account sid}:{twilio auth token}'
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<TwilioResponse>
  <IncomingPhoneNumber>
    <Sid>PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Sid>
    <AccountSid>AC82f240bb054e6bed8b8376030816aa7d</AccountSid>
    <FriendlyName>(347) 862-9385</FriendlyName>
    <PhoneNumber>+13478629385</PhoneNumber>
    <VoiceUrl />
    <VoiceMethod>POST</VoiceMethod>
    <VoiceFallbackUrl />
    <VoiceFallbackMethod>POST</VoiceFallbackMethod>
    <VoiceCallerIdLookup>false</VoiceCallerIdLookup>
    <DateCreated>Mon, 24 Nov 2014 23:14:38 +0000</DateCreated>
    <DateUpdated>Fri, 05 Aug 2016 17:53:42 +0000</DateUpdated>
    <SmsUrl>https://demo.twilio.com/welcome/sms/reply/</SmsUrl>
    <SmsMethod>POST</SmsMethod>
    <SmsFallbackUrl />
    <SmsFallbackMethod>POST</SmsFallbackMethod>
    <AddressRequirements>none</AddressRequirements>
    <Beta>false</Beta>
    <Capabilities>
      <Voice>true</Voice>
      <SMS>false</SMS>
      <MMS>false</MMS>
    </Capabilities>
    <StatusCallback />
    <StatusCallbackMethod>POST</StatusCallbackMethod>
    <ApiVersion>2010-04-01</ApiVersion>
    <VoiceApplicationSid />
    <SmsApplicationSid />
    <TrunkSid>TK52291f8799518599e7251dc3408a8ebc</TrunkSid>
    <EmergencyStatus>Pending Activation</EmergencyStatus>
    <EmergencyAddressSid>AD0d06f4385cf94f94761a9903a2fdd2c5</EmergencyAddressSid>
    <Uri>/2010-04-01/Accounts/AC82f240bb054e6bed8b8376030816aa7d/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Uri>
  </IncomingPhoneNumber>
</TwilioResponse>

Note the 'EmergencyStatus' parameter changes to 'Pending Activation'. This process might take up to 5 minutes.


Check Emergency Calling Status on a Twilio number

Back To Top

POST /Accounts/{Account SID}/IncomingPhoneNumbers/{PhoneNumber SID} 
curl -G https://api.twilio.com/2010-04-01/Accounts/ACxxx/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441 \
    -u '{twilio account sid}:{twilio auth token}'
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<TwilioResponse>
  <IncomingPhoneNumber>
    <Sid>PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Sid>
    <AccountSid>AC82f240bb054e6bed8b8376030816aa7d</AccountSid>
    <FriendlyName>(347) 862-9385</FriendlyName>
    <PhoneNumber>+13478629385</PhoneNumber>
    <VoiceUrl />
    <VoiceMethod>POST</VoiceMethod>
    <VoiceFallbackUrl />
    <VoiceFallbackMethod>POST</VoiceFallbackMethod>
    <VoiceCallerIdLookup>false</VoiceCallerIdLookup>
    <DateCreated>Mon, 24 Nov 2014 23:14:38 +0000</DateCreated>
    <DateUpdated>Fri, 05 Aug 2016 17:54:17 +0000</DateUpdated>
    <SmsUrl>https://demo.twilio.com/welcome/sms/reply/</SmsUrl>
    <SmsMethod>POST</SmsMethod>
    <SmsFallbackUrl />
    <SmsFallbackMethod>POST</SmsFallbackMethod>
    <AddressRequirements>none</AddressRequirements>
    <Beta>false</Beta>
    <Capabilities>
      <Voice>true</Voice>
      <SMS>false</SMS>
      <MMS>false</MMS>
    </Capabilities>
    <StatusCallback />
    <StatusCallbackMethod>POST</StatusCallbackMethod>
    <ApiVersion>2010-04-01</ApiVersion>
    <VoiceApplicationSid />
    <SmsApplicationSid />
    <TrunkSid>TK52291f8799518599e7251dc3408a8ebc</TrunkSid>
    <EmergencyStatus>Active</EmergencyStatus>
    <EmergencyAddressSid>AD0d06f4385cf94f94761a9903a2fdd2c5</EmergencyAddressSid>
    <Uri>/2010-04-01/Accounts/AC82f240bb054e6bed8b8376030816aa7d/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Uri>
  </IncomingPhoneNumber>
</TwilioResponse>

Note the 'EmergencyStatus' parameter is now 'Active'.

Disable Emergency Calling on a Twilio Number{#disable}

In order to Disable Emergency Calling on a Twilio Number associated with an Elastic SIP Trunk via the API you must follow the following four steps:


Disable Emergency Calling on a Twilio number

Back To Top

POST /Accounts/{Account SID}/IncomingPhoneNumbers/{PhoneNumber SID} 
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACxxx/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441 \
    -d "EmergencyStatus=InActive" \
    -u '{twilio account sid}:{twilio auth token}'
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<TwilioResponse>
  <IncomingPhoneNumber>
    <Sid>PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Sid>
    <AccountSid>AC82f240bb054e6bed8b8376030816aa7d</AccountSid>
    <FriendlyName>(347) 862-9385</FriendlyName>
    <PhoneNumber>+13478629385</PhoneNumber>
    <VoiceUrl />
    <VoiceMethod>POST</VoiceMethod>
    <VoiceFallbackUrl />
    <VoiceFallbackMethod>POST</VoiceFallbackMethod>
    <VoiceCallerIdLookup>false</VoiceCallerIdLookup>
    <DateCreated>Mon, 24 Nov 2014 23:14:38 +0000</DateCreated>
    <DateUpdated>Fri, 05 Aug 2016 17:56:21 +0000</DateUpdated>
    <SmsUrl>https://demo.twilio.com/welcome/sms/reply/</SmsUrl>
    <SmsMethod>POST</SmsMethod>
    <SmsFallbackUrl />
    <SmsFallbackMethod>POST</SmsFallbackMethod>
    <AddressRequirements>none</AddressRequirements>
    <Beta>false</Beta>
    <Capabilities>
      <Voice>true</Voice>
      <SMS>false</SMS>
      <MMS>false</MMS>
    </Capabilities>
    <StatusCallback />
    <StatusCallbackMethod>POST</StatusCallbackMethod>
    <ApiVersion>2010-04-01</ApiVersion>
    <VoiceApplicationSid />
    <SmsApplicationSid />
    <TrunkSid>TK52291f8799518599e7251dc3408a8ebc</TrunkSid>
    <EmergencyStatus>Pending Deactivation</EmergencyStatus>
    <EmergencyAddressSid>AD0d06f4385cf94f94761a9903a2fdd2c5</EmergencyAddressSid>
    <Uri>/2010-04-01/Accounts/AC82f240bb054e6bed8b8376030816aa7d/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Uri>
  </IncomingPhoneNumber>
</TwilioResponse>


Check Emergency Calling Status on a Twilio number

Back To Top

POST /Accounts/{Account SID}/IncomingPhoneNumbers/{PhoneNumber SID} 
curl -G https://api.twilio.com/2010-04-01/Accounts/ACxxx/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441 \
    -u '{twilio account sid}:{twilio auth token}'
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<TwilioResponse>
  <IncomingPhoneNumber>
    <Sid>PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Sid>
    <AccountSid>AC82f240bb054e6bed8b8376030816aa7d</AccountSid>
    <FriendlyName>(347) 862-9385</FriendlyName>
    <PhoneNumber>+13478629385</PhoneNumber>
    <VoiceUrl />
    <VoiceMethod>POST</VoiceMethod>
    <VoiceFallbackUrl />
    <VoiceFallbackMethod>POST</VoiceFallbackMethod>
    <VoiceCallerIdLookup>false</VoiceCallerIdLookup>
    <DateCreated>Mon, 24 Nov 2014 23:14:38 +0000</DateCreated>
    <DateUpdated>Fri, 05 Aug 2016 18:02:19 +0000</DateUpdated>
    <SmsUrl>https://demo.twilio.com/welcome/sms/reply/</SmsUrl>
    <SmsMethod>POST</SmsMethod>
    <SmsFallbackUrl />
    <SmsFallbackMethod>POST</SmsFallbackMethod>
    <AddressRequirements>none</AddressRequirements>
    <Beta>false</Beta>
    <Capabilities>
      <Voice>true</Voice>
      <SMS>false</SMS>
      <MMS>false</MMS>
    </Capabilities>
    <StatusCallback />
    <StatusCallbackMethod>POST</StatusCallbackMethod>
    <ApiVersion>2010-04-01</ApiVersion>
    <VoiceApplicationSid />
    <SmsApplicationSid />
    <TrunkSid>TK52291f8799518599e7251dc3408a8ebc</TrunkSid>
    <EmergencyStatus>Inactive</EmergencyStatus>
    <EmergencyAddressSid>AD0d06f4385cf94f94761a9903a2fdd2c5</EmergencyAddressSid>
    <Uri>/2010-04-01/Accounts/AC82f240bb054e6bed8b8376030816aa7d/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Uri>
  </IncomingPhoneNumber>
</TwilioResponse>

Note the 'EmergencyStatus' parameter is now 'Inactive'.


Disassociate an Emergency Address from a Twilio number

Back To Top

Please note that this step MUST NOT be combined with the previous one, they must be two separate API calls.

POST /Accounts/{Account SID}/IncomingPhoneNumbers/{PhoneNumber SID} 
curl -XPOST https://api.twilio.com/2010-04-01/Accounts/ACxxx/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441 \
    -d "EmergencyAddressSid=" \
    -u '{twilio account sid}:{twilio auth token}'
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<TwilioResponse>
  <IncomingPhoneNumber>
    <Sid>PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Sid>
    <AccountSid>AC82f240bb054e6bed8b8376030816aa7d</AccountSid>
    <FriendlyName>(347) 862-9385</FriendlyName>
    <PhoneNumber>+13478629385</PhoneNumber>
    <VoiceUrl />
    <VoiceMethod>POST</VoiceMethod>
    <VoiceFallbackUrl />
    <VoiceFallbackMethod>POST</VoiceFallbackMethod>
    <VoiceCallerIdLookup>false</VoiceCallerIdLookup>
    <DateCreated>Mon, 24 Nov 2014 23:14:38 +0000</DateCreated>
    <DateUpdated>Fri, 05 Aug 2016 18:04:26 +0000</DateUpdated>
    <SmsUrl>https://demo.twilio.com/welcome/sms/reply/</SmsUrl>
    <SmsMethod>POST</SmsMethod>
    <SmsFallbackUrl />
    <SmsFallbackMethod>POST</SmsFallbackMethod>
    <AddressRequirements>none</AddressRequirements>
    <Beta>false</Beta>
    <Capabilities>
      <Voice>true</Voice>
      <SMS>false</SMS>
      <MMS>false</MMS>
    </Capabilities>
    <StatusCallback />
    <StatusCallbackMethod>POST</StatusCallbackMethod>
    <ApiVersion>2010-04-01</ApiVersion>
    <VoiceApplicationSid />
    <SmsApplicationSid />
    <TrunkSid>TK52291f8799518599e7251dc3408a8ebc</TrunkSid>
    <EmergencyStatus>Inactive</EmergencyStatus>
    <EmergencyAddressSid />
    <Uri>/2010-04-01/Accounts/AC82f240bb054e6bed8b8376030816aa7d/IncomingPhoneNumbers/PNbd331bc8f0f5b6bfbc946f3a0b0f1441</Uri>
  </IncomingPhoneNumber>
</TwilioResponse>


Delete an Emergency Address

Back To Top

POST /Accounts/{Account SID}/IncomingPhoneNumbers/{PhoneNumber SID} 
curl -XDELETE https://api.twilio.com/2010-04-01/Accounts/ACxxx/Addresses/AD0d06f4385cf94f94761a9903a2fdd2c5 \  
    -u '{twilio account sid}:{twilio auth token}'

Changing the Emergency Address on a Twilio Number

  • Disable Emergency Calling on your Twilio Number
  • Check Emergency Calling Status on a Twilio number to ensure it's Inactive
  • Associate new Emergency Address with Twilio Number
  • Enable Emergency Calling on the Twilio Number
  • Check Emergency Calling Status on a Twilio number to ensure it's Active
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 browsing the Twilio tag on Stack Overflow.