[SR-Users] Configuration script behaviour with http_async_client usage

Kris Domagalski kris.domagalski at exactive.co.uk
Fri Oct 29 14:39:53 CEST 2021


I'm new in Kamailio and looking for some configuration guidance. I'm using http_async_client for API requests. It's configured to use TEST2 route, which should be executed upon reception of HTTPS response. After receiving the response I would like to go back to the request_route and perform some more actions. Currently behaviour is,  in the syslog I can see only entries which I push from TEST2 route (TEST 123). Cannot see the one from request route.

Current syslog output:

Expected syslog output:
TEST 123
TEST 789

And now my question is why kamailio is not executing remaining actions (xlog) in request_route?

request_route {
                xlog("L_INFO","TEST 789\n");

route[TEST1] {
                # define API request body in JSON format
                jansson_set("string", "from", $fU, "$var(http_routing_query)");
                # set API request parameters
                $http_req(all) = $null;
                $http_req(suspend) = 1;
                $http_req(timeout) = 100;
                $http_req(method) = "POST";
                $http_req(hdr) = "Content-Type: application/json";
                $http_req(body) = $var(http_routing_query);
                # send API request
                http_async_query(http://local:3000/test, "TEST2");

route[TEST2] {
                xlog("L_INFO","TEST 123\n");


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211029/a5dc6607/attachment.htm>

More information about the sr-users mailing list