On 17 Oct 2023, at 18:11, Chaigneau, Nicolas via
sr-dev <sr-dev(a)lists.kamailio.org> wrote:
Hello,
I would like to set a timeout in milliseconds when using Kamailio module http_client.
From what I read, the module is accepting a parameter “connection_timeout”:
https://www.kamailio.org/docs/modules/devel/modules/http_client.html#http_c…
This is used to set curl option “CURLOPT_TIMEOUT”.
I would like to set instead curl option “CURLOPT_TIMEOUT_MS”.
I think changing the parameter “connection_timeout” from seconds to milliseconds is not a
good idea, since it would break existing configurations.
What about adding a new parameter “connection_timeout_ms” to the module ?
Curl documentation says that: “If both CURLOPT_TIMEOUT and CURLOPT_TIMEOUT_MS are set,
the value set last is used.”
The CURLOPT_TIMEOUT_MS should only be set if the parameter is non-zero, so that the
current behaviour is kept if the new parameter is not configured.
What do you think ?
It is propably a good idea. Looking forward to a patch. :-)
Cheers,
/O