[sr-dev] [kamailio/kamailio] extensions to lost and http_client modules (#2675)

Wolfgang Kampichler notifications at github.com
Sun Apr 4 22:24:59 CEST 2021


> tested this config file
> 
> ```
> listen=udp:127.0.0.1:5060
> loadmodule "xlog.so"
> loadmodule "pv.so"
> loadmodule "http_client.so"
> loadmodule "lost.so"
> loadmodule "textopsx.so"
> 
> modparam("lost", "exact_type", 1)
> 
> request_route {
>   $var(geo_uri) = @hf_value.geolocation[1].uri;
>   if ($(var(geo_uri){s.select,0,:}) =~ "http|https") {
>     $var(res) = lost_held_dereference("$var(geo_uri)", "emergencyDispatch", "civic geodetic", "$var(pidf)", "$var(err)");
>     xlog("L_INFO", "HELD location dereference: Result code $var(res)\n$var(pidf)");
>   }
> }
> ```
> 
> During URL dereferencing send this request
> 
> ```
> POST /webhook HTTP/1.1
> Host: 217.12.247.98
> User-Agent: kamailio (5.5.0-pre0 (x86_64/linux))
> Content-Type: application/held+xml;charset=utf-8
> Accept: application/pidf+xml,application/held+xml;q=0.5
> Content-Length: 192
> 
> <?xml version="1.0"?>
> <locationRequest xmlns="urn:ietf:params:xml:ns:geopriv:held" responseTime="emergencyDispatch"><locationType exact="false">civic geodetic</locationType></locationRequest>
> ```
> 
> According to config file `modparam("lost", "exact_type", 1)` but in real request send `locationType exact="false"`

@sergey-safarov: the derefencing function only supports "false" (does not consider the module parameter ... I'll add this info to doc)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2675#issuecomment-813094426
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210404/be878cb0/attachment.htm>


More information about the sr-dev mailing list