Hi gang
In 2024, Switzerland will start using NG112 (NG911) procedures to transmit the caller location via Geolocation URL via LIS Server to a PSAP.
So time to start testing this on my devel plattform. Kamailio ships with the lost module which looks promising.
In short, the Procedure is as follows:
Customer calls emergency number.
Kamailio performs a http request to our inhouse HELD server with the identification of the calling customer.
HELD server looks up the location of the caller and pushes a HELD XML object to the Swiss LIS Server, which then is queried by the emergency PSAP receiving the call. LIS server return and URL.
HELD server returns the URL to Kamailio.
Kamailio adds Geolocation Header with that URL and relays the call.
This takes some time and as the call is not yet being relayed while waiting for the held request to complete, there is no 100 trying being sent and the emergency call is bound to time out.
So, shall I call t_reply("100","Performing HELD lkup") before calling the lost module? Or is there a better way?
Mit freundlichen Grüssen
-Benoît Panizzon-
You can use
loadmodule "tm.so" loadmodule "tmx.so" modparam("tm", "auto_inv_100", 0)
...
if(is_method("REGISTER")) { sl_send_reply("100", "Checking your credentials"); } else { sl_send_reply("100", "Attempting to connect your call"); }
About HELD server looks up the location of the caller and pushes a HELD XML object to the Swiss LIS Server
According to RFC5985 (https://www.rfc-editor.org/rfc/rfc5985.html) HELD request can contain "responseTime" attribute with values "emergencyRouting" and "emergencyDispatch". With high probability, your LIS server will get the first HELD request with "responseTime=emergencyRouting". That means do not require high accuracy of user location. In my opinion, you send the location of the last base station where the user registered last time. This a fast response.
And when the call is delivered to PSAP, your LIS server will receive a second HELD request with "responseTime=emergencyDispatch". On the second request, you need to return the real mobile user location. But at this time the call is answered and the location may be evaluated for several seconds.
On Tue, May 23, 2023 at 12:23 PM Benoit Panizzon benoit.panizzon@imp.ch wrote:
Hi gang
In 2024, Switzerland will start using NG112 (NG911) procedures to transmit the caller location via Geolocation URL via LIS Server to a PSAP.
So time to start testing this on my devel plattform. Kamailio ships with the lost module which looks promising.
In short, the Procedure is as follows:
Customer calls emergency number.
Kamailio performs a http request to our inhouse HELD server with the identification of the calling customer.
HELD server looks up the location of the caller and pushes a HELD XML object to the Swiss LIS Server, which then is queried by the emergency PSAP receiving the call. LIS server return and URL.
HELD server returns the URL to Kamailio.
Kamailio adds Geolocation Header with that URL and relays the call.
This takes some time and as the call is not yet being relayed while waiting for the held request to complete, there is no 100 trying being sent and the emergency call is bound to time out.
So, shall I call t_reply("100","Performing HELD lkup") before calling the lost module? Or is there a better way?
Mit freundlichen Grüssen
-Benoît Panizzon-
I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________ __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hi Sergey
Thank you for your reply.
if(is_method("REGISTER")) { sl_send_reply("100", "Checking your credentials"); } else { sl_send_reply("100", "Attempting to connect your call"); }
I left auto_inv_100 to 1 but I am now experimenting with calling t_reply before doing the held lookup and that looks promising at the moment.
According to RFC5985 (https://www.rfc-editor.org/rfc/rfc5985.html) HELD request can contain "responseTime" attribute with values "emergencyRouting" and "emergencyDispatch". With high probability, your LIS server will get the first HELD request with "responseTime=emergencyRouting". That means do not require high accuracy of user location. In my opinion, you send the location of the last base station where the user registered last time. This a fast response.
And when the call is delivered to PSAP, your LIS server will receive a second HELD request with "responseTime=emergencyDispatch". On the second request, you need to return the real mobile user location. But at this time the call is answered and the location may be evaluated for several seconds.
We operate fixed line, no mobile service. So we know the exact location (postal address + building identifier (EGID)) at the time of the call.
It's also not about routing. Calls to the nearest PSAP are source-routed. So if a customer dials 112 we translate this to the nearest PSAP operating emergency service 112.
I'm just anticipating what could go wrong or cause delays in the chain to find out the best way to react to such issues.
Kamailio => HTTP => HELD-Server(inhouse) => HTTP => LIS-Server
PS: What I could not find in the Swiss NG112 documentation: If transmitting the location to the LIS server fails. Is the Geolocation header just ommited? Or is there a way to tell the PSAP there was a failure transmitting the location to the LIS Server?
Mit freundlichen Grüssen
-Benoît Panizzon-
We operate fixed line, no mobile service. So we know the exact location (postal address + building identifier (EGID)) at the time of the call.
It's also not about routing. Calls to the nearest PSAP are source-routed. So if a customer dials 112 we translate this to the nearest PSAP operating emergency service 112.
Are you developing ESRP (Emergency Service Routing Proxy)? https://www.dec112.at/en/dec112-what-is-an-esrp/
If not, then you need to send the call to ESRP and provide the user's device location. Who is provide ESRP in your region?
I'm just anticipating what could go wrong or cause delays in the chain to find out the best way to react to such issues.
Kamailio => HTTP => HELD-Server(inhouse) => HTTP => LIS-Server
If you are a fixed-line carrier then you always know where the user's device is located. Just required to populate your LIS database. All timing looks for me predictable.
PS: What I could not find in the Swiss NG112 documentation: If transmitting the location to the LIS server fails. Is the Geolocation header just ommited? Or is there a way to tell the PSAP there was a failure transmitting the location to the LIS Server?
I am not an ESRP developer, but why do you need a dedicated HELD server? Why LIS is not enough? https://www.rfc-editor.org/rfc/rfc5985#page-5 [image: image.png]
In this case, your LIS server should contain static information about the user's device location. And case "If transmitting the location to the LIS server fails" will never happen.
Hi Sergey
Swisscom is operating all the emergency call infrastructure in Switzerland.
Most documentation is public:
https://www.swisscom.ch/en/business/enterprise/offer/alarming-solutions-eala...
Referring to this document:
https://documents.swisscom.com/product/filestore/lib/851d8bf5-d686-4a41-9907...
Swisscom is operating the ECSP consisting of LIS server, where we as TSP (VSP) push the location information (postal address) for en emergency call and the LIS Proxy, where the PSAP de references the URL.
So, when processing an emergency call on kamailio, I have somehow to get the location information to the LIS server.
Kamailio offers a service to our customers, for this it does not need to know the postal address of the caller. But it holds a reference to the calling customer (also used for billing and all sort of stuff). Let's call it the Customer ID.
So a registered customer is calling 112.
What Kamailio does:
* Authenticate INVITE (getting customer ID linked to authentication username) * Pull more information from the customer profile like barred numbers sets, and a location ID (now using the zip code but about to extend this for better accuracy and handling some exceptions like large industry complexes that have an own fire brigade). * Perform Lookup in local Database (could also be a textdb): Emergency Number 112 + postal code. Result: Destination PSAP Phone number!
So at this point we are fine, we know how to route that call to the appropriate closest PSAP. But with NG112 we have to set a Geolocation header to indicate the exact postal address and building ID (EGID) to the PSAP.
Legacy Mode: PSAP looks up the address of the calling phone number in the 'emergency' directory service, also operated by Swisscom. But this has to be actively updated via a cumbersome API by all telephone operators and I guess this does not work at all with some operators. So pushing the location with the call is for sure the right way to go.
So my intention was:
modparam("http_client", "httpcon", "heldsrv=>http://localheld.example.com/api/held");
$var(id) = "$var(customerID)"; $var(res) = lost_held_query("heldsrv", "$var(id)" , "$var(pidf)", "$var(url)", "$var(err)");
if ($var(res) == 200) { append_hf("Geolocation: $var(url)\r\n"); } else { xlog("L_ERROR", "HELD locationRequest for $var(customerID) failed with status: $var(res)\n"); }
On that local held server, the postal address linked to the CustomerID in question could be looked up and pushed to the Swisscom LIS Server which then returns the URL which the local held server is passing back to me as the reply to the lost_held_query.
Am I doing this in an overcomplicated way?
Mit freundlichen Grüssen
-Benoît Panizzon-
I can suggest a separate Kamailio sip proxy and LIS server. From my point of view when Kamailio receives an emergency call: 1) call authentication; 2) HELD request from Kamailio to LIS server with "locationType=locationURI"; 3) LIS return location URI (not required return location only URI); 4) Kamailio attach locationURI as Geolocation header;
Important LIS contains information about user's device location, not Kamailio. You have LIS that process HELD request and provides service for Kamailio and PSAP.
About emergency call routing. In your documents 3.1.1 WireLess "LISRequest-WireLess-Geodetic-Ellipses.xml" is the example of WireLess netbased location described with ellipses. "LISRequest-WireLess-Geodetic-Polygones.xml" is the example of WireLess netbased location described with polygons.
How do you want to route such call types without a postal code?
On Tue, May 23, 2023 at 4:12 PM Benoit Panizzon benoit.panizzon@imp.ch wrote:
Hi Sergey
Swisscom is operating all the emergency call infrastructure in Switzerland.
Most documentation is public:
https://www.swisscom.ch/en/business/enterprise/offer/alarming-solutions-eala...
Referring to this document:
https://documents.swisscom.com/product/filestore/lib/851d8bf5-d686-4a41-9907...
Swisscom is operating the ECSP consisting of LIS server, where we as TSP (VSP) push the location information (postal address) for en emergency call and the LIS Proxy, where the PSAP de references the URL.
So, when processing an emergency call on kamailio, I have somehow to get the location information to the LIS server.
Kamailio offers a service to our customers, for this it does not need to know the postal address of the caller. But it holds a reference to the calling customer (also used for billing and all sort of stuff). Let's call it the Customer ID.
So a registered customer is calling 112.
What Kamailio does:
- Authenticate INVITE (getting customer ID linked to authentication username)
- Pull more information from the customer profile like barred numbers sets, and a location ID (now using the zip code but about to extend this for better accuracy and handling some exceptions like large industry complexes that have an own fire brigade).
- Perform Lookup in local Database (could also be a textdb): Emergency Number 112 + postal code. Result: Destination PSAP Phone number!
So at this point we are fine, we know how to route that call to the appropriate closest PSAP. But with NG112 we have to set a Geolocation header to indicate the exact postal address and building ID (EGID) to the PSAP.
Legacy Mode: PSAP looks up the address of the calling phone number in the 'emergency' directory service, also operated by Swisscom. But this has to be actively updated via a cumbersome API by all telephone operators and I guess this does not work at all with some operators. So pushing the location with the call is for sure the right way to go.
So my intention was:
modparam("http_client", "httpcon", "heldsrv=> http://localheld.example.com/api/held");
$var(id) = "$var(customerID)"; $var(res) = lost_held_query("heldsrv", "$var(id)" , "$var(pidf)", "$var(url)", "$var(err)");
if ($var(res) == 200) { append_hf("Geolocation: $var(url)\r\n"); } else { xlog("L_ERROR", "HELD locationRequest for $var(customerID) failed with status: $var(res)\n"); }
On that local held server, the postal address linked to the CustomerID in question could be looked up and pushed to the Swisscom LIS Server which then returns the URL which the local held server is passing back to me as the reply to the lost_held_query.
Am I doing this in an overcomplicated way?
Mit freundlichen Grüssen
-Benoît Panizzon-
I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________
Hi Sergey
3.1.1 WireLess
How do you want to route such call types without a postal code?
We only offer Fixed Landline Services. No mobile. So this is not the issue. We know the 'installation' location of every fixed line.
Of course, if a customer takes his phone somewhere else, this is his responsability. A location could also be labeled 'nomadic' to indicate that it is uncertain.
I am in contact with the team @ Swisscom which runs the LIS server. I guess I will be able to clarify many of those questions with them.
Mit freundlichen Grüssen
-Benoît Panizzon-
Hi,
By default, `100 Trying` is sent only once `t_relay()` is called and the transaction is created. If you do go the route of sending your own 100 message (so that retransmissions and timeouts can be held down during the pendency of the query), you can override this behaviour:
https://kamailio.org/docs/modules/5.6.x/modules/tm.html#tm.f.t_set_auto_inv_...
-- Alex
On May 23, 2023, at 4:54 AM, Benoit Panizzon benoit.panizzon@imp.ch wrote:
Hi gang
In 2024, Switzerland will start using NG112 (NG911) procedures to transmit the caller location via Geolocation URL via LIS Server to a PSAP.
So time to start testing this on my devel plattform. Kamailio ships with the lost module which looks promising.
In short, the Procedure is as follows:
Customer calls emergency number.
Kamailio performs a http request to our inhouse HELD server with the identification of the calling customer.
HELD server looks up the location of the caller and pushes a HELD XML object to the Swiss LIS Server, which then is queried by the emergency PSAP receiving the call. LIS server return and URL.
HELD server returns the URL to Kamailio.
Kamailio adds Geolocation Header with that URL and relays the call.
This takes some time and as the call is not yet being relayed while waiting for the held request to complete, there is no 100 trying being sent and the emergency call is bound to time out.
So, shall I call t_reply("100","Performing HELD lkup") before calling the lost module? Or is there a better way?
Mit freundlichen Grüssen
-Benoît Panizzon-
I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch ______________________________________________________ __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: