<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.8.4">
</HEAD>
<BODY>
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>
<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 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>
</BODY>
</HTML>