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.
Enable and Disable Emergency Calling on SIP Domain post
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SIP/Domains/{SipDomainSid}
Enable Emergency Calling on a SIP Domain _18 // Download the helper library from https://www.twilio.com/docs/node/install
_18 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18 // Find your Account SID and Auth Token at twilio.com/console
_18 // and set the environment variables. See http://twil.io/secure
_18 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18 const authToken = process.env.TWILIO_AUTH_TOKEN;
_18 const client = twilio(accountSid, authToken);
_18 async function updateSipDomain() {
_18 const domain = await client.sip
_18 .domains("SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18 .update({ emergencyCallingEnabled: true });
_18 console.log(domain.accountSid);
_26 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "api_version": "2010-04-01",
_26 "auth_type": "IP_ACL",
_26 "date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
_26 "date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
_26 "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
_26 "friendly_name": "Scranton Office",
_26 "sip_registration": true,
_26 "sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "subresource_uris": {
_26 "credential_list_mappings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialListMappings.json",
_26 "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlListMappings.json"
_26 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
_26 "voice_fallback_method": "POST",
_26 "voice_fallback_url": null,
_26 "voice_method": "POST",
_26 "voice_status_callback_method": "POST",
_26 "voice_status_callback_url": null,
_26 "voice_url": "https://dundermifflin.example.com/twilio/app.php",
_26 "emergency_calling_enabled": true,
_26 "byoc_trunk_sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "emergency_caller_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
Disable Emergency Calling on a SIP Domain _18 // Download the helper library from https://www.twilio.com/docs/node/install
_18 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18 // Find your Account SID and Auth Token at twilio.com/console
_18 // and set the environment variables. See http://twil.io/secure
_18 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18 const authToken = process.env.TWILIO_AUTH_TOKEN;
_18 const client = twilio(accountSid, authToken);
_18 async function updateSipDomain() {
_18 const domain = await client.sip
_18 .domains("SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18 .update({ emergencyCallingEnabled: false });
_18 console.log(domain.accountSid);
_26 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "api_version": "2010-04-01",
_26 "auth_type": "IP_ACL",
_26 "date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
_26 "date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
_26 "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
_26 "friendly_name": "Scranton Office",
_26 "sip_registration": true,
_26 "sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "subresource_uris": {
_26 "credential_list_mappings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialListMappings.json",
_26 "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlListMappings.json"
_26 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
_26 "voice_fallback_method": "POST",
_26 "voice_fallback_url": null,
_26 "voice_method": "POST",
_26 "voice_status_callback_method": "POST",
_26 "voice_status_callback_url": null,
_26 "voice_url": "https://dundermifflin.example.com/twilio/app.php",
_26 "emergency_calling_enabled": false,
_26 "byoc_trunk_sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "emergency_caller_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
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.
_18 // Download the helper library from https://www.twilio.com/docs/node/install
_18 const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18 // Find your Account SID and Auth Token at twilio.com/console
_18 // and set the environment variables. See http://twil.io/secure
_18 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18 const authToken = process.env.TWILIO_AUTH_TOKEN;
_18 const client = twilio(accountSid, authToken);
_18 async function updateSipDomain() {
_18 const domain = await client.sip
_18 .domains("SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_18 .update({ emergencyCallerSid: "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" });
_18 console.log(domain.accountSid);
_26 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "api_version": "2010-04-01",
_26 "auth_type": "IP_ACL",
_26 "date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
_26 "date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
_26 "domain_name": "dunder-mifflin-scranton.sip.twilio.com",
_26 "friendly_name": "Scranton Office",
_26 "sip_registration": true,
_26 "sid": "SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "subresource_uris": {
_26 "credential_list_mappings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CredentialListMappings.json",
_26 "ip_access_control_list_mappings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAccessControlListMappings.json"
_26 "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/Domains/SDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
_26 "voice_fallback_method": "POST",
_26 "voice_fallback_url": null,
_26 "voice_method": "POST",
_26 "voice_status_callback_method": "POST",
_26 "voice_status_callback_url": null,
_26 "voice_url": "https://dundermifflin.example.com/twilio/app.php",
_26 "emergency_calling_enabled": true,
_26 "byoc_trunk_sid": "BYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_26 "emergency_caller_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"