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
- Register an emergency address for the user with
phone.setEmergencyAddress(...). The address is validated against the MSAG (Master Street Address Guide); the SDK persists its id. - The address binds to the device's network when the softphone connects. The SDK sends the saved address's id as the phone connects, and DialStack records the network the device is connecting from. From then on, that address is used for 911 only while the device stays on that network.
- Prompt on network change — when the device moves to a different network, the SDK emits a
network.changedevent. Prompt the user to confirm or register a location valid for the new network. - 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
// Validate and save an emergency address. The returned id is persisted by
// the SDK and presented automatically the next time the phone connects.
const address = await phone.setEmergencyAddress({
address_number: '123',
street: 'Main St',
unit: 'Suite 400',
city: 'San Francisco',
state: 'CA',
postal_code: '94105',
country: 'US',
});
The address is validated synchronously. If it can't be matched to a valid civic address, the call rejects with a validation error.
A user can keep several saved addresses (e.g. home and office). List and manage them:
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:
phone.on('network.changed', async () => {
// Bound location no longer applies here. Prompt the user, then register
// (or re-confirm) an address valid for this network and reconnect so it
// binds to the new network.
await phone.setEmergencyAddress({
/* current location */
});
phone.disconnect();
await phone.connect();
});
The previously saved addresses are not deleted — when the device returns to a known network, that address re-binds automatically. To explicitly drop a binding (so it re-registers wherever the device next connects), use phone.clearEmergencyAddressRegisteredIp(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.changedevent is the signal to (re)register; it never disables emergency dialing. - Prompt on network change: detect
network.changedand prompt the user to confirm their location.
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.