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

sergey-safarov notifications at github.com
Sun Apr 4 21:00:16 CEST 2021


tested config
```
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)
modparam("lost", "post_request", 1)
modparam("http_client", "httpcon", "lostsrv=>http://psap.or.nga911.com/api/lost");


request_route {
  $var(res) = lost_query("lostsrv", "$var(uri)", "$var(name)", "$var(err)");
  xlog("L_INFO", "LOST findService: Result code $var(res)\nUri: $var(uri)\nName: $var(name)\n");
}
```

Test with one `Geolocation` header.
LOST request send with HTTP headers like
```
POST /api/lost HTTP/1.1
Host: api.example.com
User-Agent: kamailio (5.5.0-pre0 (x86_64/linux))
Accept: */*
Content-Type: application/lost+xml;charset=utf-8
Content-Length: 526
```

Here may be updated
```
Accept: application/lost+xml
``` 

-- 
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-813083378
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210404/8fa7a36e/attachment.htm>


More information about the sr-dev mailing list