Skip to main content

Emergency Calling (E911)

WebRTC softphone users are nomadic — they may call 911 from different locations. Federal regulations (RAY BAUM's Act, Kari's Law) require that every 911 call includes a dispatchable location (street address with floor/suite) so first responders can find the caller.

How It Works

  1. Register an emergency address for the user with phone.setEmergencyAddress(...). The address is validated against the MSAG (Master Street Address Guide), saved, and selected for the phone's next connection.
  2. Connect with the address selected. DialStack binds an emergency address only when its id is presented in the WebSocket authenticate message. Set it before the first connect(), or call reconnectWithEmergency(id) after creating or selecting it on an already-connected phone.
  3. Prompt on network change — when the device moves to a different network, the SDK emits a network.changed event. Prompt the user to confirm or register a location valid for the new network.
  4. 911 calls route with location — when the user dials 911, DialStack includes the bound address so the PSAP can dispatch to the correct location.

Registering an address

JavaScript
// Validate and save an emergency address. The SDK selects it for future
// connections, but it does not alter an already-authenticated connection.
const address = await phone.setEmergencyAddress({
address_number: '123',
street: 'Main St',
unit: 'Suite 400',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'US',
});

// If the phone is already connected, reconnect so its authenticate message
// presents the new id. The prebuilt React softphone does this automatically.
await phone.reconnectWithEmergency(address.id);

The address is validated synchronously. If it can't be matched to a valid civic address, the call rejects with a validation error. If you create it before the phone's first connect(), no extra reconnect is needed: setEmergencyAddress persists the selection and the initial authentication presents it.

Creating an address through POST /v1/me/emergency-addresses directly also does not update a live softphone. Pass the returned id as PhoneOptions.emergencyAddressId before connecting, or call phone.reconnectWithEmergency(address.id) on the existing phone. Until a connection authenticates with that id, registered_ip remains null, non-emergency PSTN calls are blocked, and 911 calls have no dispatchable location.

A user can keep several saved addresses (e.g. home and office). List and manage them:

JavaScript
const saved = await phone.listEmergencyAddresses().autoPagingToArray();
await phone.deleteEmergencyAddress(id);

Network changes

The address is bound to the network the device registered from. When the device connects from a different network, the bound address no longer applies and the SDK emits network.changed:

JavaScript
phone.on('network.changed', async () => {
// Bound location no longer applies here. Prompt the user, then register
// an address valid for this network and reconnect with its id.
const address = await phone.setEmergencyAddress({/* current location */});
await phone.reconnectWithEmergency(address.id);
});

The previously saved addresses are not deleted. To confirm a previously saved address on the current network, clear its old network binding and reconnect with it selected:

JavaScript
await phone.clearEmergencyAddressRegisteredIp(id);
await phone.reconnectWithEmergency(id);

Requirements

  • Address required for non-emergency calls: a user must have an emergency address bound to the current network before placing non-emergency calls. Attempting to dial without one plays an "address not registered" announcement and ends the call.
  • 911 and 933 always work: emergency and E911-test calls are never blocked — they go out with or without a registered address. The network.changed event is the signal to (re)register; it never disables emergency dialing.
  • Prompt on network change: detect network.changed and prompt the user to confirm their location.
Regulatory requirement

E911 compliance is not optional. If your users can place calls through the softphone, you must implement emergency address registration. Failure to provide accurate location with 911 calls carries regulatory and legal liability.