Hi Chandra, if you want to send a http async request after replying an error (or generally speaking in a non-transactional context) you can set the $http_req(suspend) pseudo variable to 0 (https://kamailio.org/docs/modules/6.0.x/modules/http_async_client.html#id1360).
On Tue, Mar 3, 2026 at 12:29 PM Chandra Bhan via sr-dev <[email protected]> wrote: > > Hi Henning, > > I need one clarification > > The flow is as follows: > > SIPP send the INVITE to kamalio > Kamalio send 100 trying > Kamalio open transaction and send HTTP for async to external system > External System send HTTP response > Kamalio send 480 to SIPP > SIPP send ACK > > If we want to use async, transaction module is important. But if send 480 > response before sending HTTP, then we get error. It look like call session > ends if we send 480 and hence HTTP async fails. > > I want to delink SIP call flow with HTTP hit. I want to complete the SIP flow > and the may be intimate the partner about the call thru HTTP. > > Can this be done? Should I use kafka here instead of HTTP and may be > transaction module may be not required as well. If you want to send a http async request after replying an error (or generally speaking in a non-transactional context) you can set the $http_req(suspend) pseudo variable to 0 (https://kamailio.org/docs/modules/6.0.x/modules/http_async_client.html#id1360). > I want to understand how these transactions are cleared in Kamalio once they > are created. > > Below, thing we are seeing transaction count as around 48000 which should be > cleared ideally. I assume this 4800 is the count of outstanding call in the > system. > To which kamailio metric are you referring to? In kamailio some transaction metrics are counters, some others are gauges. > Below is the history of previous messages. > > If I use HTTP/1.1, I am not able to use Connection: keep alive option as the > connection is getting closed. What is the way to use Connection keep alive > option in HTTP async request? You can add the 'Connection: keep-alive' header to your http request using $http_req pseudo variable: $http_req(hdr) = 'Connection: keep-alive' > I want to use HTTP/2 for sending the request to network instead of HTTP/1.1 > while using async worker. > > Can someone suggest how to use HTTP/2? > Though planned, I still have to implement native HTTP/2 requests (via CURL_HTTP_VERSION_2_0/CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE libcurl options). For the moment HTTP/2 is only supported via the Upgrade mechanism. You can add the following headers to you request: $http_req(hdr) = 'Connection: upgrade' $http_req(hdr) = 'Upgrade: HTTP/2.0' > modparam("http_async_client", "connection_timeout", 1000) > modparam("http_async_client", "timeout", 2000) > > I understand connection_timeout is the timeout for making HTTP connection, > but timeout is the read timeout, where you wait for response. > > But timeout is not working. Can you confirm if there is something like this. > There is no global "timeout" parameter, there is a http_req(timeout) parameter that you can set per request. It has the same meaning/effect of the global "connection_timeout". Both work the same way ($http_req(timeout) has higher priority if set): they set a timeout on the request regardless of if it's the connection or the response timing out (so the global one should probably be renamed for clarity). Hope this helps. Regards, Federico _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
