<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 07/10/16 11:06, david wrote:<br>
    </div>
    <blockquote cite="mid:1475831191.16534.4.camel@bts.io" type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="GENERATOR" content="GtkHTML/4.8.4">
      hello Daniel<br>
      <br>
      thanks for the response<br>
      we are using 4.4.1. <br>
      i will try to use async_route instead<br>
      <br>
      i found making some tests that the error seems to happen when
      there is some delay in the connection with the FSW and we have a
      timeout, so it seems there is some relation with that timeout
      (with lua conn:bgapi it waits to receive an event) and having
      issue to do the t_suspend and t_continue.<br>
    </blockquote>
    you try to connect to FSW first and then do t_suspend()?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote cite="mid:1475831191.16534.4.camel@bts.io" type="cite">
      <br>
      best regards<br>
      david<br>
      <br>
      <br>
      <br>
      El jue, 06-10-2016 a las 12:01 +0200, Daniel-Constantin Mierla
      escribió:
      <blockquote type="CITE">
        <pre>Hello,


On 04/10/16 13:57, david wrote:
<font color="#737373">> Hello all</font>
<font color="#737373">></font>
<font color="#737373">> i'm having some errors sometimes and  i'm not able to know why they happen</font>
<font color="#737373">> i made a lua configuration script where i create some ESL sockets with</font>
<font color="#737373">> several freeswitches (10) (around 500-600 sockets in total, depending</font>
<font color="#737373">> on the number os children (8) and listen ips we have (5)), and i use</font>
<font color="#737373">> the lua script to send some API to the FSW by a function.</font>
<font color="#737373">> No matter what the FSW replies.</font>
<font color="#737373">> i dont know why, but i think that having that conn:bgapi($command) in</font>
<font color="#737373">> the lua script, makes the issue to happen. theorically, the lua script</font>
<font color="#737373">> waits to receive the response from the fsw through the tcp socket, and</font>
<font color="#737373">> after that the script continues (with an async_sleep command), but</font>
<font color="#737373">> after the API sent, i see (only sometimes, few times) an async_sleep</font>
<font color="#737373">> seem to fail when doing the t_continue with the following error</font>
<font color="#737373">></font>
<font color="#737373">> WARNING: tm [t_suspend.c:186]: t_continue(): transaction is not</font>
<font color="#737373">> suspended [20748:225229907]</font>
I think async_sleep() is doing t_continue() internally, are you doing it
also in the config file or the error comes from inside the c code of
async_sleep()?

What version of kamailio are you using?

Also, it's better to use async_route() instead of async_sleep().
<font color="#737373">></font>
<font color="#737373">> could it be posible that having manye ESL sockets opened in the</font>
<font color="#737373">> kamailio server makes this to happen?</font>
<font color="#737373">> how many async workers are needed? i have 8 right now</font>
<font color="#737373">> is there a way where i can know or correlate the log to a $ci or</font>
<font color="#737373">> something known?</font>
<font color="#737373">></font>
To get $ci in almost all logs (those that are printed when a sip message
is processed), you can set the log_prefix core parameter:

   - <a moz-do-not-send="true" href="https://www.kamailio.org/wiki/cookbooks/4.4.x/core#log_prefix">https://www.kamailio.org/wiki/cookbooks/4.4.x/core#log_prefix</a>

Cheers,
Daniel

</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a></pre>
  </body>
</html>