<div dir="auto">Http async queries work using the Kamailio tm framework, used by all the modules exposing async behaviour. A change in this behaviour, which implies a rework of the whole framework, is not something that can be done easily and for sure not for a single module.<div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 13 Sep 2018, 18:18 alexsosic, <<a href="mailto:notifications@github.com">notifications@github.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>From the official kamailio documentation of the function <code>http_async_query(url, route_name)</code></p>
<pre><code>Sends HTTP(S) request asynchronously to the URL given in “url” parameter, which is a string that may contain pseudo variables.

Parameter “route_name” defines the route to be executed upon reception of HTTP reply, on error or on timeout. If a transaction exists before calling http_async_query(), it will be paused and resumed in this route, while the routing script execution will be stopped. If executed in a transactionless context, or if $http_req(suspend) is used not to suspend the transaction, the routing script execution will continue and the query result will be available in “route_name”.
</code></pre>
<p>Because the routing script execution <code>will be stopped</code> it's quite difficult for some advanced usages to restore the previous variables and logic and to continue with the execution.</p>
<p>The problem of resuming the work is delegated to the user and not Kamailio itself. I think Kamailio should freeze the execution and store all needed data in memory to resume execution after the http response like for a normal http sync query.</p>
<p>So the <code>stopping</code> will become <code>pausing/resuming</code>.</p>

<p style="font-size:small;color:#666">—<br>You are receiving this because you are subscribed to this thread.<br>Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1642" target="_blank" rel="noreferrer">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZUwTx3srFXBXxJFOuZr_ietKx8mlks5uaoVNgaJpZM4Wnp61" target="_blank" rel="noreferrer">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZYlpaaFrVlAQE1X27RiYz_abnmHDks5uaoVNgaJpZM4Wnp61.gif" height="1" width="1" alt=""></p>

_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" target="_blank" rel="noreferrer">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div>