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.
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:
svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/trunk ser_imsdownload the Emergency Services branch:
svn checkout http://svn.berlios.de/svnroot/repos/openimscore/ser_ims/branches/12_em_services ser_imsAll 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".
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:
modparam("lrf","enable_locsip",1)
modparam("lrf","locsip_srv_uri", "sip:locsip.open-ims.test:9180")
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.
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.
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:
modparam("ecscf","use_default_psap",1)
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.
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.
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.