<div dir="ltr">My bad, I just figured out that linger can take arguments. I was sending some corrupted data (a space and the null character) and FS took it as a 0, killing the linger on the first epoch change. I set it to -1 to get unlimited linger.<div><br></div><div>Quickly fixed and working, thanks again!<br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 31, 2017 at 6:28 PM, Alejandro Recarey <span dir="ltr"><<a href="mailto:ar@cyberfonica.com" target="_blank">ar@cyberfonica.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all, thanks for taking the time to read,</div><div><br></div><div>I'm using an outbound socket server (plivo open source) to control my FS calls. The problem I'm having is that when using the 'record' command sometimes the outbound socket app is not receiving the events that signal the end of the recording. This is a somewhat random event. Sometimes it works perfectly, and sometimes it doesnt. </div><div><br></div><div>In the cases where it doesnt work, I get the following message in the FS console:</div><div><br></div><div>2017-05-30 16:55:53.013021 [DEBUG] mod_event_socket.c:1431 linger timeout, closing socket</div><div><br></div><div>I added a little bit of extra logging to mod_event_socket.c and recompiled and I got this info:</div><div><br></div><div>2017-05-31 12:46:47.009854 [DEBUG] mod_event_socket.c:1431 Extra Debug: Linger timeout: 1496234806 - Epoch Time Now: 1496234807</div><div>2017-05-31 12:46:47.009854 [DEBUG] mod_event_socket.c:1432 linger timeout, closing socket</div><div><br></div><div>I wanted to print those two variables, because they're used in mod_event_socket in the if that determines whether to throw the timeout error or not:</div><div><br></div><div>if (switch_test_flag(listener, LFLAG_HANDLE_DISCO) && </div><div><span class="m_3836799455800152960gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>listener->linger_timeout != (time_t) -1 && switch_epoch_time_now(NULL) > listener->linger_timeout) {</div><div><span class="m_3836799455800152960gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>switch_log_printf(SWITCH_<wbr>CHANNEL_SESSION_LOG(listener-><wbr>session), SWITCH_LOG_DEBUG, "linger timeout, closing socket\n");</div><div><span class="m_3836799455800152960gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>status = SWITCH_STATUS_FALSE;</div><div><span class="m_3836799455800152960gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>break;</div><div><span class="m_3836799455800152960gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>}</div><div><br></div><div>Notice that if the epoch has advanced just 1 second (hence epoch > linger_timeout) the socket is dropped. </div><div><br></div><div>I would hope that the socket would linger for longer than one second. Is there any way to raise this timeout?</div><div><br></div><div><br></div><div>Thanks again,</div><div><br></div><div>Alex</div></div>
</blockquote></div><br></div>