Page MenuHomePhabricator
Diviner AG Projects RTC Platforms Provisioning: Emergency Numbers

Provisioning: Emergency Numbers
AG Projects RTC Platforms (Provisioning Guides)

This guide describes the provisioning functions for Emergency Numbers.

Emergency calls refer to dialing short numbers usually associated with emergency services like police or fire-brigade (e.g. 112 or 911). When a SIP session is setup to a short number designated as emergency (in the SIP Proxy configuration), a secondary database lookup is performed in the proxy database in the emergency_mapping table. Based on the region attribute provisioned with each SIP account, the final destination number for the emergency service in the region of the account is looked up.

  1. Define the emergency numbers in /etc/opensips/config/settings.m4
/etc/opensips/config/settings.m4
# Emergency numbers
define(`EMERGENCY_NR1', `112')
define(`EMERGENCY_NR2', `911')
define(`EMERGENCY_NRS', `2')
  1. Add the local access number for each region to emergency_mapping table, the table has the following structure:
FieldType
idint(10) unsigned
usernamevarchar(64)
domainvarchar(64)
regionvarchar(32)
targetvarchar(128)
change_datetimestamp

Example:

+----------+-------------+-----------+-------------------------------+---------------------+
| username | domain      | region    | target                        | change_date         |
+----------+-------------+-----------+-------------------------------+---------------------+
| 112      | example.com | 010       | sip:0031141217112@example.com | 2006-05-09 14:33:18 |
| 112      | example.com | 0111      | sip:0031141219112@example.com | 2006-05-09 14:33:18 |
| 112      | example.com | 0113      | sip:0031141219112@example.com | 2006-05-09 14:33:18 |
| 112      | example.com | 0114      | sip:0031141219112@example.com | 2006-05-09 14:33:18 |
| 112      | example.com | 0115      | sip:0031141219112@example.com | 2006-05-09 14:33:18 |
+----------+-------------+-----------+-------------------------------+---------------------+
  1. Set the region attribute for each SIP account using SipupdateAccount()

to match the region column in emergency_mapping table.

Next Steps

Continue by: