From thom@telcom.io Thu May 26 19:05:52 2016 From: Thom Seddon To: sr-users@lists.kamailio.org Subject: [SR-Users] Multiple async operations in single transaction fail (using http_async_client) Date: Thu, 26 May 2016 18:05:26 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0427712302==" --===============0427712302== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi All, I've been doing some work this week with the new http_async_client module, it seems that with it's default behaviour it's not possible to execute another async query in the block immediately following the response, for example the following config: request_route { if (!t_newtran()) { sl_reply_error(); exit(); } http_async_query("http://localhost:8090/req_1", '{"user":"$fU"}', "REQ_1"); } route[REQ_1] { xlog("L_INFO", "route[REQ_1]: INIT\n"); if ($http_ok) { xlog("L_INFO", "route[REQ_1]: status $http_rs\n"); xlog("L_INFO", "route[REQ_1]: Sending REQ_2\n"); http_async_query("http://localhost:8090/req_2", '{"user":"$fU"}', "REQ_2"); } else { xlog("L_INFO", "route[REQ_1]: error $http_err)\n"); } } route[REQ_2] { xlog("L_INFO", "route[REQ_2]: INIT\n"); if ($http_ok) { xlog("L_INFO", "route[REQ_2]: status $http_rs\n"); } else { xlog("L_INFO", "route[REQ_2]: error $http_err)\n"); } } Generates the following error: 10(11832) INFO: