← Volver al índice de módulos

lost

SIP requests may be forwarded based on a location provided by the request or retrieved from a specific location server using an identity (HELD). This module implements the basic functionality to get o
🛠️ Utilidades y Varios Kamailio 6.1 20 parámetros 9 funciones

Descripción general

SIP requests may be forwarded based on a location provided by the request or retrieved from a specific location server using an identity (HELD). This module implements the basic functionality to get or parse location information (civic and geodetic) and to query a mapping service (LOST) to get the next hop based on location and service urn either specified or provided with the request. This module implements protocol functions that use the http_client API to fetch data from external LOST and HELD servers. The module is using the http_client concept of "connections" to define properties of HTTP sessions. A connection has one or multiple servers and a set of settings that apply to the specific connection. The function lost_held_query allows Kamailio to assemble a HELD locationRequest as defined in RFC6155 (https://tools.ietf.org/html/rfc6155) to query location information represented as PIDF-LO for a given identity (in most cases a SIP URI). The identity may be a specific parameter or taken from the P-Asserted-Identity or From header. The locationRequest response is parsed and represented as PIDF-LO and location URI to dereference location via HTTP(S). The function lost_held_dereference allows Kamailio to assemble a HELD dereference request as defined in RFC6155 (https://tools.ietf.org/html/rfc6753) to dereference location information represented as PIDF-LO for a given URL. Required parameters are an URL, responseTime, and responseType. The response is represented as PIDF-LO. T

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/lost.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/lost

Parámetros de configuración

ParámetroTipoDescripción
exact_type int 3.2. response_time (int) 3.3. location_type (string) 3.4. post_request (int) 3.5. location_profile (int) 3.6. location_3d (int) 3.7. geoheader_type (int) 3.8. geoheader_order (int) 3.9. recursion (int
response_time int 3.3. location_type (string) 3.4. post_request (int) 3.5. location_profile (int) 3.6. location_3d (int) 3.7. geoheader_type (int) 3.8. geoheader_order (int) 3.9. recursion (int) 3.10. verbose (int)
location_type string 3.4. post_request (int) 3.5. location_profile (int) 3.6. location_3d (int) 3.7. geoheader_type (int) 3.8. geoheader_order (int) 3.9. recursion (int) 3.10. verbose (int)
post_request int 3.5. location_profile (int) 3.6. location_3d (int) 3.7. geoheader_type (int) 3.8. geoheader_order (int) 3.9. recursion (int) 3.10. verbose (int)
location_profile int 3.6. location_3d (int) 3.7. geoheader_type (int) 3.8. geoheader_order (int) 3.9. recursion (int) 3.10. verbose (int)
location_3d int 3.7. geoheader_type (int) 3.8. geoheader_order (int) 3.9. recursion (int) 3.10. verbose (int)
geoheader_type int 3.8. geoheader_order (int) 3.9. recursion (int) 3.10. verbose (int)
geoheader_order int 3.9. recursion (int) 3.10. verbose (int)
recursion int 3.10. verbose (int)
verbose int Besides parameters listed, this module uses http_client therefore appropriate module parameters may apply.
exact_type int Indicates to the location server that the contents of the "location_type" parameter must be strictly followed. Values are 0 (false) or 1 (true).
response_time int A time value informs the location server how long the client is prepared to wait for a response.
location_type string The "locationType" element contains a list of types that are requested. Values are "any", "geodetic", "civic" or "locationURI" and combinations. * any - returns location information in all forms avail
post_request int Dereferencing the location can be done using either the HTTP GET or POST method. This parameter globally defines whether only HTTP POST method should be used. Values are 0 (GET) or 1 (POST).
location_profile int A Presence Information Data Format Location Object (PIDF-LO) may contain geodetic or civic location profile or combinations. A LoST findService contains only one location, which is selected via this p
location_3d int A Presence Information Data Format Location Object (PIDF-LO) may contain one of the shape types as listed in RFC5491 (https://tools.ietf.org/html/rfc5491). A LoST findService request currently contain
geoheader_type int A Geolocation header may include a list of locationValues pointing to either a Presence Information Data Format Location Object (PIDF-LO) in the SIP body using a content-indirection (cid:) URI per RFC
geoheader_order int A Geolocation header may include a list of locationValues. This parameter sets the order of the URI used to retrieve the location information, either the first element of a certain type or the last. V
recursion int A Geolocation header may include a list of locationValues. This parameter sets the order of the URI used to retrieve the location information, either the first element of a certain type or the last. V
verbose int Detailed output of LoST findService, redirect or error response as shown below. Values are 0 (disabled) or 1 (enabled). ### LOST expires: [2031-01-27T14:54:21+00:00] ### LOST lastUpdated: [2021-01-29T

Funciones exportadas

lost_held_query(con, [id,] pidf-lo, url, error)

4.2. lost_held_dereference(url, rtime, rtype, pidf-lo, error) 4.3. lost_query(con, [pidf-lo, urn,] uri, name, error)

lost_held_dereference(url, rtime, rtype, pidf-lo, error)

4.3. lost_query(con, [pidf-lo, urn,] uri, name, error)

lost_query(con, [pidf-lo, urn,] uri, name, error)

4.1. lost_held_query(con, [id,] pidf-lo, url, error)

lost_held_query(con, [id,] pidf-lo, url, error)

Sends a HELD locationRequest to a given connection. The device identity is either specified, or the P-A-I header value, or the From header value. * con - the name of an existing HTTP connection, defined by a httpcon modparam * id - the device id used

lost_held_query()

usage ... modparam("http_client", "httpcon", "heldsrv=>http://service.org/api/held"); ... # HELD location request $var(id) = "sip:alice@atlanta"; $var(res) = lost_held_query("heldsrv", "$var(id)" , "$var(pidf)", "$var(url)", " $var(err)"); xlog("L_IN

lost_held_dereference(url, rtime, rtype, pidf-lo, error)

Sends a HELD POST locationRequest to a given URL. Attributes are responseTime and responseType. The locationType property "exact" is set to "false". * url - a URL received via Geolocation header to dereference location * rtime - the response time as

lost_held_dereference()

usage ... # HELD location dereference if ($hdr(Geolocation)=~"^<http.*$") { $var(url) = $(hdr(Geolocation){s.select,0,;}); $var(res) = lost_held_dereference("$(var(url){s.unbracket})", "emergencyDisp atch", "civic geodetic", "$var(pidf)", "$var(err)"

lost_query(con, [pidf-lo, urn,] uri, name, error)

Sends a LOST findService request to a given connection. PIDF-LO and URN are either specified, or, if omitted, parsed from the message body (PIDF-LO) and request line (URN). Either "pidf-lo" or "urn" can be set to an empty string to be ignored. * con

lost()

usage ... modparam("http_client", "httpcon", "heldsrv=>http://service.org/api/held"); modparam("http_client", "httpcon", "lostsrv=>http://service.org/api/lost"); ... # HELD location request $var(id) = "sip:alice@atlanta"; $var(res) = lost_held_query(

Autores y contribuidores

Wolfgang KampichlerFrequentis AG

Copyright © 2018-2021 Wolfgang Kampichler

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj