[SR-Users] Query - REST API calls in async
Federico Cabiddu
federico.cabiddu at gmail.com
Thu Sep 8 08:43:24 CEST 2016
Hi,
On Wed, Sep 7, 2016 at 4:14 PM, Agalya RAMACHANDRAN <agalya.job at gmail.com>
wrote:
> Hi team,
>
> I am Agalya and I work for Comcast. We are trying to use kamailio as proxy
> server for our project.
> I have a query regarding the same. We are trying to use REST API calls
> asynchronously from the config file.
> I see that there is a module "http_async_client" which is used to handle
> REST services asynchronously.
>
> Found that libcurl is used to perform these operations.
> My question is:
>
> 1) How much time kamailio is taking to send the HTTP request out after TCP
> port is opened?
> Is there any time dependency we need to wait on libcurl to send HTTP
> request out?
> B'coz in opensips I see a delay time and libcurl is used in-turn.
> I found kamailio doing similar to opensips and hence am posting this
> question.
>
>
The HTTP request is sent right after opening the socket. I've never noticed
a delay between the TCP handshake and the query being sent. Then the
connection is cached and can be reused by subsequent queries to the same
server. Did you observe a different behavior?
2) We can also use PUT service by using http_set_method(PUT)?
> Should we add code to support PUT service?
>
> PUT method is supported. To set the query's method you can also use the
$http_req pseudovariable (
http://www.kamailio.org/docs/modules/devel/modules/http_async_client.html#idp23451668)
in this way:
$http_req(method) = "PUT";
Regards,
Federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160908/f40e764f/attachment.html>
More information about the sr-users
mailing list