# LIS

## **Introduction**
* This interface responds to standard-compliant HELD requests to return the latest location in standard XML schemas per the NENA i3 architecture.
* It retrieves a Location Object using the HELD (HTTP-Enabled Location Delivery) Protocol according to IETF RFC 5985. 
* Location objects are in the format of PIDF-LOs, Presence Information Data Format Location Objects ([RFC 5139](https://datatracker.ietf.org/doc/html/rfc5139)).
* This interface is for use by authorized public-safety entities, to pull location data for emergency calls


## **LIS Standards Info**
At its core, a LIS HELD interface is simply a webserver that responds to HTTP requests with XML. This is extensively defined in a set of IETF RFCs, which also specify the XML schemas defining the data formats for passing information back and forth.

* HELD
    * [RFC 5985](https://datatracker.ietf.org/doc/html/rfc5985)
* Device URIs in HELD
    * [RFC 6155](https://datatracker.ietf.org/doc/html/rfc6155)
* Location Conveyance in SIP Signaling
    *  [RFC 6442](https://datatracker.ietf.org/doc/html/rfc6442)
    * [RFC 6753](https://datatracker.ietf.org/doc/html/rfc6753)
* PIDF-LO
    * [RFC 4119](https://datatracker.ietf.org/doc/html/rfc4119)
    * [RFC 5139](https://datatracker.ietf.org/doc/html/rfc5139)
    * [RFC 7459](https://datatracker.ietf.org/doc/html/rfc7459)
* Additional Data Links
    * [RFC 7852 Section 6.2](https://datatracker.ietf.org/doc/html/rfc7852#section-6.2)
* Circle and radius in geodetic responses
    * [http://www.opengis.net/pidflo/1.0](http://www.opengis.net/pidflo/1.0)
    * [http://www.opengis.net/gml](http://www.opengis.net/pidflo/1.0)
* Schemas for all are aggregated [here](http://www.iana.org/assignments/xml-registry/xml-registry.xhtml#schema)

These documents contain all the information needed to build a HELD client conformant to the standards (or have references to other RFCs that contain missing information).

## **Implementation**
The recommended i3 mechanism is to pass dereferencing URIs around in SIP signaling. For the purposes of over-the-top integration using these mechanisms, RapidSOS proposes the following:

1. Query the LIS with HELD with the caller’s identity (phone number) to retrieve location information
2. Repeat LIS location queries periodically for the duration of the call

### **Limitations/Caveats**
Some caveats should be kept in mind when considering using the i3 mechanisms:

* LIS location de-referencing will only return the latest location available at the time of the query, and not the entire location history stored by RapidSOS

**Authentication Options**
This interface is authenticated via basic authentication [POST /oauth/token](/public_safety/default/authentication-token-for-ingress-and-egress-apis-v-1-0-0#/Client%20Credential%20Grant%20Flow/post_oauth_token)

**Additional Considerations**
Additional information for consideration for LIS - (NENA i3 Location Information Server) includes the following:

* Does not support OAuth2.0
* Does not receive text-to-911 data
* Does not receive Z coordinate data 
* RSOS does not provide location data for landlines
* Devices must be iOS12+ or Android 4.0+ to provide location. Microsoft and Blackberry devices do not send location data
* The partner must have the caller ID to query the API per spec requirements [POST /location](/public_safety/default/lis-nena-i3-location-information-server-v-1-0-0#/Location%20by%20Device%20URI/post_location)
