Setting up emergency services via administrative units

Link copied to clipboard

The idea of emergency services is to allow users to dial a single short emergency number (e.g., 112) and have their calls and locations be quickly delivered to the relevant emergency services center. The users’ location is identified by the users’ number.

There might be several emergency service agencies within a country or city. Therefore, it is crucial to route the call to the emergency services center closest to the caller’s physical location.

Caller locations are stored in the countrywide central emergency database. When a call arrives at an emergency services center, the caller’s address is retrieved from the database and automatically displayed to the operator so the emergency team is quickly directed to the caller.

In PortaBilling, emergency call handling is performed by a special emergency module. When a user dials an emergency number, PortaBilling recognizes the call as an emergency, searches for the corresponding record in the database and detects the emergency center number associated with the user to redirect the call to that number.

To retrieve the correct emergency center number, PortaBilling uses a special mapping key – an emergency administrative unit associated with each account. An emergency administrative unit defines the user location as a combination of their country and region pattern (e.g., a city or a ZIP code, etc.) and then that is associated with their corresponding emergency service center’s number.

As the service provider, you must regularly update the central emergency database with any changes to ensure that user location information is correct.

PortaBilling is also integrated with Intrado Inc. – the largest E911 service provider in the US and Canada. Please refer to the Setting Up Emergency Services (E911) with Intrado handbook for detailed instructions on how to set up emergency services with Intrado.

If it isn’t required to translate a generic emergency number into the actual PSTN number, skip the setup of the emergency plug-in on the Configuration server and emergency administrative units in PortaBilling. You should also disable the Emergency service feature for the users’ account and their products.

This chapter demonstrates how to configure emergency call handling based on user location information.

Example

Link copied to clipboard

As an example, we will enable emergency services for existing residential customer John Doe’s account. He lives at St. Halvards plass 191, 0192, in Oslo, Norway.

There are three emergency numbers in Norway: 110, 112 and 113. Depending upon which number John dials, his calls are routed as follows:

  • Calls to 110 are routed to 4723270171;
  • Calls to 112 – to 4724172012, and
  • Calls to 113 – to 4722597601.

Emergency service center number detection is based on the user’s ZIP code and city.

Configuration overview

Link copied to clipboard
  1. Enable emergency module on the Configuration server
  2. Create the EMERGENCY rate code
  3. Upload emergency administrative units to PortaBilling
    1. Prepare the file with emergency administrative units
    2. Upload the file to PortaBilling
  4. Create a vendor tariff
  5. Enter rates
  6. Create a vendor
  7. Define connections
  8. Modify rates in customer tariff
  9. Enable emergency service for the account

Enable emergency module on the Configuration server

Link copied to clipboard
  1. Go to the Configurations tab on the Configuration server.
  2. Clone the active configuration to modify it.

    Enable emergency module on the Configuration server

  3. From the configuration tree select Auxiliaries -> WebCluster and select the E911 group for the required billing environment.
  4. Select Porta::E911::Default from the EmergencyPlugin list.

    Enable emergency module

  5. From the Configuration tree choose BillingEngine and select the EmergencyModule group.
  6. Configure the following options in the EmergencyModule group:
    • Emergency_VoiceRouting_Enabled – set Yes here.
    • Numbers – specify the list of numbers that are used for emergency in your country (in our example those are 110, 112 and 113).
  7. Click the Save button and then the check_apply Verify button.
  8. Verify the new configuration and click the Check/Apply button.

Create the EMERGENCY rate code

Link copied to clipboard

This step is only required if you have not previously defined the necessary rate code. If not, you will need to create a symbolic EMERGENCY rate code.

  1. On the navigation menu, select Service catalog Rate codes.
  2. On the Rate code list panel, click + Add and specify the new rate code details:
    • Format – select Custom.
    • Prefix – type in EMERGENCY.
    • Country – leave the default value here.
    • Subdivision – leave the default value here.
    • Description – enter some useful information about the service being provided (e.g., Emergency services), since this is what your clients will see on their xDR history pages.

      Create emergency rate code.

  3. Click Save.

Upload emergency administrative units to PortaBilling

Link copied to clipboard

At this step you need to upload the list of emergency administrative units that identify user locations and will serve to detect the emergency service center number when a user dials an emergency number.

In our example, the emergency service center number is detected by the city and the ZIP code John Doe lives in. Thus, the emergency administrative unit will have the following format: no.Oslo.0192.

Prepare the file with emergency administrative units

Link copied to clipboard

Prepare a file with emergency administrative units in .csv, .xls or .xlsx format. The format of the file should be as shown in the table below:

Field

Mandatory

Format

Description

Action

Yes

Text

One of the following:

  • add

  • update

  • delete

i_emergency_unit

Yes

Number

The unique ID of the emergency administrative unit. Not mandatory when adding units

Emergency unit ID

Yes

Text

The user location information defined as the combination of a country and the region pattern (e.g., a city) separated by a dot.

Possible formats:

  • <country>.<subdivision>.<city>.<district>.<sub-district>
  • <country>.<subdivision>.<city>.<district>
  • <country>.<subdivision>.<city>
  • <country>.<subdivision>
  • <country>.<city>
  • <country>.<district>
  • <country>.<sub-district>
  • <country>.<zip>
  • <country>

Example: us.MA.Boston

Country code

Yes

Text

Two-letter country code (ISO 3166-1 alpha-2)

Name

Yes

Text

The visible name for the emergency administrative unit. It will be displayed in the list of units on the web interface. Each unit must have a unique name

Routing number

Yes

Number

The default number where emergency calls will be routed

Routing number rule

No

Text

The rule according to which calls will be redirected based on the number dialed. It is defined as a regular expression (e.g., s/^110$/23270171/)

The column headers are important! Make sure the field names and formatting in your upload file are correct.

 

Source file

Upload the file to PortaBilling

Link copied to clipboard
You may use Client URL (cURL) command line tool to manage data on your servers, e.g., to upload the file from any location such as a local PC. In this case, skip the first two steps and start right with uploading the file to the database (step 3). Otherwise, all three steps should be performed.
  1. Log in to your web server using ssh.
  2. Copy the file to the web server using the following command:
    sudo scp user@remote.host:/full_path_to_certificate/Emergency_Units.csv /home/porta-admin/
    
    user@remote.host
    password:
    
    Emergency_Units.csv                                       100%  421    42.9KB/s   00:00
  3. Upload the file to the database by sending the API request as follows:
    > curl -ki https://<web_server_IP>/rest/EmergencyUnit/upload_emergency_units/ -F auth_info='{"login":"<login>", "password":"<password>"}' -F params='{"with_result_list":1}' -F upload_file=@Emergency_Units.csv

Create a vendor tariff

Link copied to clipboard

A tariff is a single price list for calling services or for your termination costs. A tariff combines:

  • conditions which are applicable for every call regardless of the called destination;
  • per rate codes.
  1. On the navigation menu, select Service catalog > Tariffs.
  2. Click + Tariff and fill in the tariff details:
    • Name – type a short name for the tariff object; this is the name you will see in the select menus (for example, Emergency calls termination).
    • Currency – choose the currency in which the vendor charges you.
      The currency for the tariff may be chosen only once, and cannot be changed later.
    • Service – choose Voice calls here.
    • Applied to – choose Vendor in the Applied to list.
    • Routing – enable the Routing option for this tariff.
    • Define prices – select per individual rate code.

      Create emergency vendor tariff.

  3. Click Save.

Enter rates

Link copied to clipboard

At this step, it is necessary to add rates to the tariff. The tariff applied to your vendor will contain the rates for the local emergency center numbers to which emergency calls will be routed.

  1. On the vendor tariff’s panel, go to Rates, click + Rate, and fill in the rate details.
  2. On the Add rate panel, fill in the rate details:
    • Rate code – select a rate code from the list or type it in directly.
    • Rating mode – select Flat rate here.
    • Effective from – if you want this rate to take effect sometime in the future, you can either type in a date manually or use the calendar.
      When using the calendar, you can specify that the date you are entering is in a different time zone than your present one. PortaBilling will then automatically adjust the time.
    • First interval, seconds – type a first billing unit in seconds.
    • Next interval, seconds – type the next billing unit in seconds.
    • First price – type a per minute price for the first interval.
    • Next price – type a per minute price for the next interval.
    • Route category – you can split your available routes into several categories, such as “High quality”, “Premium”, etc., then create routing plans for your customers. Use the Default route category for now.
    • Preference – the routing priority for the specific destination. 10 is the highest priority, 0 is the lowest (i.e., do not use this destination for routing at all).
    • Huntstop – when enabled, instructs the system not to try any routes with a lower preference.

      Add rate to emergency vendor tariff.

  3. Click Save.
  4. Repeat these steps to enter more rates.

Create a vendor

Link copied to clipboard

Now it is necessary to create a vendor that will handle emergency calls arriving from your network.

  1. On the navigation menu, select InfrastructureVendors.
  2. On the Vendor list panel, click + Add and fill in the vendor details:
    • Name – type a short name for the vendor object; this will be used on the web interface (for example, Emergency vendor).
    • Currency – choose the currency in which this vendor charges you.
    • Opening balance – this indicates a starting balance for the vendor; the default is zero.
    • Billing period – split period for vendor statistics.

      Create emergency vendor.

  3. Click Save.

    When a call is sent from your network to the vendor’s gateway, the vendor performs an authorization for the call. Authorization can be done based on your PortaSIP IP address (in this case, you just need to supply that information to the vendor, and no further action is required on your part) or the vendor can provide you with a SIP username and password to use for call authorization. These credentials should be stored with the “vendor authorization” info and then associated with a specific connection so that they can be used during actual call processing.

  4. In this case, it is necessary to create an account for digest authorization of outgoing calls:
    • On the vendor’s panel, click General configuration, then click Authorization.
    • On the Authorization panel, click Add and enter the credentials provided by the vendor.

      Set emergency vendor authorization.

    • Click Save.

Define connections

Link copied to clipboard

This connection represents the point from which calls leave your network and are directed to the vendor where charges are incurred.

  1. On the vendor’s panel, click Connections.
  2. On the Connection list panel, click + Add and fill in the connection details:
    • Description – type a descriptive name for this connection. It will be displayed in the list of connections.
    • Service type – select Voice calls.
    • Type of connections – select SIP.
    • Direction – select To vendor.
    • Tariff – choose the tariff that defines your termination costs for this connection/vendor.
    • Active – use the slider to set this connection as active.
    • Identify gateway by – choose how to identify the gateway: IP, gateway ID or both. Specify the IP address and/or ID of the vendor’s gateway or switch.
    • Capacity – specify the maximum number of simultaneous session this connection can support.

      Create emergency vendor connection.

  3. Click Save.
  4. On the connection’s panel, click General configuration.
    • Vendor authorization – select SIP business for digest authorization of outgoing call from your accounts.

      Configure a connection

  5. Click Save.

Modify rates in customer tariff

Link copied to clipboard

At this step it is necessary to make sure that emergency calls made by your customers are treated as emergency calls and billed accordingly. In order to do this, the special rate code EMERGENCY rate needs to be added to the tariff applied to your SIP subscribers.

  1. On the navigation menu, select Service catalog > Tariffs.
  2. Use the Tariff search panel to locate the tariff you created for outgoing calls (SIP subscribers). Specify one or more of the search criteria listed there and click Search.
  3. Click the customer tariff name, which is also a link that redirects you to the edit tariff panel.
  4. On the tariff panel (SIP subscribers), go to Rates, click + Rate, and fill in the rate details:
    • Rate code – type in EMERGENCY.
    • Rating mode – select Flat rate here.
    • First interval, seconds – type a first billing unit in seconds.
    • Next interval, seconds – type the next billing unit in seconds.
    • First price – specify a zero price since emergency calls are always free of charge.

      Add emergency rate to customer tariff.

  5. Click Save.

Enable emergency service for the account

Link copied to clipboard
  1. On the navigation menu, select SalesCustomers.
  2. Use the Customer search panel to locate the customer you wish to modify (John Doe). Specify one or more of the search criteria listed there and click Search.
  3. Click the customer name, which is also a link that redirects you to the edit customer page.
  4. Go to Accounts/DIDs and select the account you wish to edit.
  5. On the account page, go to Service configuration.
  6. On the Outgoing calls tab, enable the Emergency service feature.
  7. Select Norway from the Emergency location list.
  8. Select the appropriate emergency unit from the Emergency unit list.

    Enable emergency for account.

  9. Click Save.
Docs for
What's new
Admin manuals
Handbooks
UI help
Developers documentation