Installation Guide of the Emergency Services Branch of the Open IMS Core

Overview

There are two new entities, besides the normal IMS Core: the E-CSCF (Emergency CSCF) and the LRF (Location Retrieval Function). More details about how these entities work you can find on the emergency services branch homepage.
The LRF node has support for querying a LoST (RFC 5222)server for the nearest PSAP. We are recommending a LoST server implementation that has also a sample database, but we are not assuming any responsibility for its implementation.

Installation of the Emergency Services IMS Core

In order to get the code, compile and install the CSCFs, the HSS and the LRF follow the same steps as in the Open IMS Core installation guide, with the modifications:

  • in step 1 (Prerequisites) This branch requires the libcurl package (version 3 or 4), as well as the development package, for creating the LoST requests, which are in fact HTTP requests
  • in the step 2 (Get the Source Code) instead of downloading the trunk version of the Open IMS Core

    svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/trunk ser_ims

    download the Emergency Services branch:

    svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/branches/12_em_services ser_ims

All the CSCFs and the LRF have a configuration file. They can be found in ser_ims/cfg and have to be copied in /opt/OpenIMSCore. For example, the LRF has the configuration file "lrf.cfg".

LRF: using the LOCSIP interface

The LRF can retrieve the location information from a LOCSIP server when the user did not include it in the initial INVITE request. LOCSIP is a protocol based on SIP subscription to the event package location. In order to configure the LRF to use the LOCSIP interface two parameters have to be set:

  • the parameter "enable_locsip" to value 1:
    modparam("lrf","enable_locsip",1)
    
  • the parameter "locsip_srv_uri":
    modparam("lrf","locsip_srv_uri", "sip:locsip.open-ims.test:9180")
    

LRF: using the LoST interface

The LRF can be configured to use a LoST interface in order to retrieve the most appropriate PSAP URI. Any LoST server implementation can be used. Documentation about how to install the LoST server implementation by Wonsang Song ca be found here. After installing a LoST server, the next step is to configure the Open IMS Core accordingly.

Configuring the LRF to interface with a LoST server

You must first enable the LRF to use the LoST support by setting the "usig_lost_srv" parameter to 1 in the LRF configuration file.

modparam("lrf","using_lost_srv",1)

The default value of the URL of the LoST server configured in the LRF is "http://lost.open-ims.test:8180/lost/LoSTServlet". In the default DNS configuration of the IMS Core, lost.open-ims.test is resolved as localhost. (see ser_ims/cfg/open-ims.dnszone)

If you want to use a different URL for the LoST server you must configure for LRF according, for example:

modparam("lrf","lost_server","http://lost.open-ims.test:8180/lost/LoSTServlet")

When using a LoST server please make sure that is not running on the same IP and port as any other Open IMS Core component.

E-CSCF: using a Last Routing Option

When there is no PSAP retrieved from the LRF, the E-CSCF can be configured to forward the emergency call to a Last Routing Option, meaning a default PSAP. In order to do that two parameters of the ecscf module must be set in the E-CSCF configuration file have to be set:

  • the parameter "use_default_psap" to value 1:
    modparam("ecscf","use_default_psap",1)
  • the parameter "default_psap_uri":
    modparam("ecscf","default_psap_uri","default_psap_SIP_URI")
    

The default_psap_SIP_URI can be any valid SIP URI, for example sip:psap@open-ims.test. Make sure that a new user with this public identity was provisioned in the Open IMS Core and registered before testing. Documentation on how to provision a new user can be found here.

Starting the components

For starting the components, follow the step 6 of the Open IMS Core installation guide, but start also ecscf.sh, lrf.sh, and optional the LoST server. If you are using the above mentioned LoST server distribution you can find here how to start it.

Personalizing the testbed

Besides changing the domain name, SIP URI of the components, IPs and ports on which the components listen to, enabling,disabling or configuring some features as can be found at , the mapping database can be easily modified, when using the recommended LoST server implementation.
For civic areas mapping some sample PostgreSQL scripts for Germany, Belgium and Spain were added. In order to use them, please follow the next steps:

cd /opt/OpenIMSCore/ser_ims/scripts/update/
#Adding the mapping (civic location,serviceURN)->PSAP URI for Germany
psql -h localhost -U postgres -d lostdb -f civic_germany.sql
#Adding the mapping (civic location,serviceURN)->PSAP URI for Belgium
psql -h localhost -U postgres -d lostdb -f civic_belgium.sql
#Adding the mapping (civic location, serviceURN)->PSAP URI for Spain
psql -h localhost -U postgres -d lostdb -f civic_spain.sql

This step can be made even after configuring both the LoST server and LRF and even while the LoST server is running.
Having a look at one of the entries in the script for Germany for mapping the country "de", state "Berlin", city "Berlin" and the ambulance service, defined by the emergency URN "urn:service:sos.ambulance", to the PSAP URI "sip:ambulance_berlin@open-ims.test" can reveal how easy it is:

INSERT INTO civic_us (country, a1,a2,a3,a4,a5,a6, prd,pod,sts,hno,hns,lmk, loc,flr,nam,pc,hno_l,hno_h,hno_oe,
service,name,uri,is_default) 
VALUES ('de', 'berlin', '*', 'berlin', '*', '*', '*', 
'*', '*', '*', '*', '*', '*', '*', '*', '*', '*', NULL, NULL, NULL, 
'urn:service:sos.ambulance', 'Ambulance Berlin Dept.', 'sip:ambulance_berlin@open-ims.test','false');

The fields aX are the fields with the same meaning as the civic location format as defined in RFC 5139.