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), saved, and selected for the phone's next connection. - Bind the address to the connection. Set it before the first
connect()and the phone presents it when it connects. On a phone that is already connected, callrebindEmergencyAddress(id)after creating or selecting it. Calls in progress are not affected. - Prompt on network change — when the phone connects and its address can't be bound to the network it connected from (usually because the phone is on 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 SDK selects it for future
// connections, but saving alone does not bind it to the current one.
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, bind the new address to the connection.
// The prebuilt React softphone does this automatically.
const { bound } = await phone.rebindEmergencyAddress(address.id, { anchor: true });
rebindEmergencyAddress() binds the address over the open connection, so a call in progress stays up. Pass anchor: true when the user has just created the address or confirmed they are at it: the address is then confirmed for the current network. Without it, the address is checked against the network it was confirmed on, as it is when the phone connects. The call resolves with bound: false when the address can't be bound on the current network, and the SDK emits network.changed first. If the phone isn't connected, it connects and then binds.
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 step is needed: setEmergencyAddress persists the selection and the initial connection 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.rebindEmergencyAddress(address.id, { anchor: true }) on the existing phone. Until the address is bound to a connection, registered_ip remains null, non-emergency PSTN calls are blocked, and 911 calls have no dispatchable location.
reconnectWithEmergency(id) is deprecated and will be removed in the next major version. It reconnects to bind the address, which ends any call in progress. Use rebindEmergencyAddress(id) instead.
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. It is also emitted when the address can't be bound for another reason, so treat it as "confirm the location", not proof that the network changed.
The check runs when the phone connects or reconnects, and when you call rebindEmergencyAddress(). A device that changes network mid-session gets no network.changed until its next connection. In practice that comes quickly, because a network change usually drops the connection and the SDK then reconnects.
phone.on('network.changed', async () => {
// Bound location no longer applies here. Prompt the user, then register
// an address valid for this network and bind it. Calls in progress stay up.
const address = await phone.setEmergencyAddress({/* current location */});
await phone.rebindEmergencyAddress(address.id, { anchor: true });
});
The previously saved addresses are not deleted. To confirm a previously saved address on the current network, bind it with anchor:
await phone.rebindEmergencyAddress(id, { anchor: true });
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.