<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi, 
<div class=""><br class="">
</div>
<div class="">The lua script is called on a directory request. </div>
<div class="">Your know, autoload_configs, lua.conf.xml: </div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><param name="xml-handler-script" value="register.lua"/></div>
<div class=""><param name="xml-handler-bindings" value="directory,dialplan”/></div>
</div>
<div class=""><br class="">
</div>
<div class="">Maybe the dialplan in the xml-handler-bindings is doing something I don’t want … </div>
<div class=""><br class="">
</div>
<div class="">In the register.lua I do basic sanity checks, and of course a database query that returns the user-data.</div>
<div class="">After that I generate the xml that gets sent to freeswitch. </div>
<div class=""><br class="">
</div>
<div class="">Yesterday I added cacheable=“120" to the <user> tag.</div>
<div class="">Thats no solution of course, but it looks like when the data is in the cache the lua script doesn’t get called. </div>
<div class="">So maybe the error won’t occur as often as before … </div>
<div class=""><br class="">
</div>
<div class="">But, I have an idea, maybe you can confirm this. </div>
<div class="">With dialplan enabled in xml-handler-bindings, the lua script is also called on calls, not just on registrations. </div>
<div class="">( I think that’s necessary to authenticate the users on an outgoing call, please correct me if im wrong )</div>
<div class="">In the register.lua I only handle directory-requests and action==user_call.</div>
<div class="">All other requests to my register.lua are unhandled and therefore I don’t return any xml at all. </div>
<div class=""><br class="">
</div>
<div class="">Maybe I get a request to my register.lua that is not a directory-request and not a user_call and since I don’t return a xml, Sofia hangs.</div>
<div class=""><br class="">
</div>
<div class="">Does that sound plausible?</div>
<div class=""><br class="">
</div>
<div class="">Thank you in advance!</div>
<div class=""><br class="">
</div>
<div class="">Regards, </div>
<div class="">Stefan</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 29.03.2021, at 23:57, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" class="">david.villasmil.work@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="auto" class="">That was going to be my next question: what’s lua doing and at what point?</div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, 29 Mar 2021 at 16:09, Stefan Kainz <<a href="mailto:s.kainz@wnt.at" class="">s.kainz@wnt.at</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
<div lang="DE" link="blue" vlink="purple" style="word-wrap:break-word" class="">
<div class="m_-1772998829732773823WordSection1">
<p class="MsoNormal"><span lang="EN-US" class="">I just found an issue on jira, where it seems someone had the same problem I have.
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><a href="https://freeswitch.org/jira/browse/FS-3328" target="_blank" class="">https://freeswitch.org/jira/browse/FS-3328</a><u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">I don’t have mod_xml_curl enabled though.
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">But knowing that sofia can handle only one register at a time and then blocking all subsequent Registers is a good starting point …
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">Regards, <u class=""></u><u class=""></u></span></p>
</div>
</div>
<div lang="DE" link="blue" vlink="purple" style="word-wrap:break-word" class="">
<div class="m_-1772998829732773823WordSection1">
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<div class="">
<div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0cm 0cm;border-top-color:rgb(225,225,225)" class="">
<p class="MsoNormal"><b class="">Von:</b> FreeSWITCH-users <<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank" class="">freeswitch-users-bounces@lists.freeswitch.org</a>>
<b class="">Im Auftrag von </b>Bote Man<br class="">
<b class="">Gesendet:</b> Montag, 29. März 2021 15:45<br class="">
<b class="">An:</b> 'FreeSWITCH Users Help' <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" class="">freeswitch-users@lists.freeswitch.org</a>><br class="">
<b class="">Betreff:</b> Re: [Freeswitch-users] Internal Interface suddenly freezes<u class=""></u><u class=""></u></p>
</div>
</div>
<p class="MsoNormal"><u class=""></u> <u class=""></u></p>
<p class="MsoNormal"><span lang="EN-US" class="">The one common element is your Lua script.<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">I am certainly no expert on script writing, but I have seen a number of problems on the mailing list over the years with scripts doing “too much” work during critical sections of the dialplan. Perhaps there is
 a race condition?<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">Hope this helps.<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;color:rgb(127,127,127)" class="">---
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;color:rgb(127,127,127)" class="">John Boteler
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;color:rgb(127,127,127)" class="">BnC Group U.S.A.
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<div class="">
<div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0cm 0cm;border-top-color:rgb(225,225,225)" class="">
<p class="MsoNormal"><b class=""><span lang="EN-US" class="">From:</span></b><span lang="EN-US" class=""> FreeSWITCH-users <<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank" class="">freeswitch-users-bounces@lists.freeswitch.org</a>>
<b class="">On Behalf Of </b>Stefan Kainz<br class="">
<b class="">Sent:</b> Monday, 29 March, 2021 07:49<br class="">
<b class="">To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" class="">freeswitch-users@lists.freeswitch.org</a>><br class="">
<b class="">Subject:</b> Re: [Freeswitch-users] Internal Interface suddenly freezes<u class=""></u><u class=""></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">Thank you for your answer!<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">Hmm, I also tested it on two completely different servers ( no virtualization ) and the problem exists on both.
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">Im also going to try it on a third server, also completely different, but I cant really image that this is a hardware-thing …
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">We also have many freeswitch servers in production ( Exactly the same hardware as the server with the problem ).
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">The only difference is that one of those servers handles registrations, and one doesn’t.<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">The one handling the registrations has the problem, the other one doesn’t.
<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">Its really strange … <u class="">
</u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class="">Regards,<u class=""></u><u class=""></u></span></p>
<p class="MsoNormal"><span lang="EN-US" class=""><u class=""></u> <u class=""></u></span></p>
<div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0cm 0cm;border-top-color:rgb(225,225,225)" class="">
<p class="MsoNormal"><b class="">Von:</b> FreeSWITCH-users <<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank" class="">freeswitch-users-bounces@lists.freeswitch.org</a>>
<b class="">Im Auftrag von </b>David Villasmil<br class="">
<b class="">Gesendet:</b> Montag, 29. März 2021 13:12<br class="">
<b class="">An:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" class="">freeswitch-users@lists.freeswitch.org</a>><br class="">
<b class="">Betreff:</b> Re: [Freeswitch-users] Internal Interface suddenly freezes<u class=""></u><u class=""></u></p>
</div>
<p class="MsoNormal"><u class=""></u> <u class=""></u></p>
<div class="">
<p class="MsoNormal">That looks to be more on the hardware side than software. It’d be an extremely coincidence those versions and all those OS have some issue somewhere.<u class=""></u><u class=""></u></p>
</div>
<div class="">
<p class="MsoNormal">Change hardware. <u class=""></u><u class=""></u></p>
</div>
<div class="">
<p class="MsoNormal"><u class=""></u> <u class=""></u></p>
<div class="">
<div class="">
<p class="MsoNormal">On Sun, 28 Mar 2021 at 09:12, Stefan Kainz <<a href="mailto:s.kainz@wnt.at" target="_blank" class="">s.kainz@wnt.at</a>> wrote:<u class=""></u><u class=""></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-left-color:rgb(204,204,204)" class="">
<p class="MsoNormal">Hi everbody, <br class="">
<br class="">
I have a little bit of a problem. <br class="">
Im using Version 1.10.3. ( but this problem also occurs on version 1.4.18 )<br class="">
<br class="">
Sometimes the internal Sofia interface just stops responding to SIP Requests. <br class="">
It sometimes happens once every day, and sometimes once a week. <br class="">
It happens at completely random times, like one day in the morning, and the next day in the middle of the night.
<br class="">
The freeswitch.log gives me nothing, its like the Sofia interface was stopped. <br class="">
<br class="">
When I try to restart the interface with "sofia profile internal restart” nothing happens. The fs_cli just remains stuck with that command.<br class="">
<br class="">
The solution is to restart the freeswitch service.<br class="">
<br class="">
Sometimes when I recognise it too late, for example in the middle of the night, it seems like the problem solves itself after about 2 hours.
<br class="">
The profile just starts working again, without somebody doing anything.<br class="">
<br class="">
I have checked a variety of things, including the firewall & fail2ban, network connection, made sure watchdog is disabled, and also tested it on different Debian-versions and freeswitch versions.
<br class="">
It seems this problem occurs on every freeswitch version i have tested. <br class="">
<br class="">
The external-profile on the other hand, keeps working like nothing happened. <br class="">
<br class="">
Both Interfaces listen on the same network-device with a public ip. <br class="">
The only difference is, the internal profile uses a Lua file to handle registrations. 
<br class="">
<br class="">
Has anybody come across anything similar? <br class="">
<br class="">
Any help is much appreciated!<br class="">
<br class="">
Regards, <br class="">
<br class="">
_________________________________________________________________________<br class="">
<br class="">
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com/" target="_blank" class="">
https://signalwire.com</a><br class="">
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br class="">
Build your next product on our scalable cloud platform.<br class="">
<br class="">
Join our online community to chat in real time <a href="https://signalwire.community/" target="_blank" class="">
https://signalwire.community</a><br class="">
<br class="">
Professional FreeSWITCH Services<br class="">
<a href="mailto:sales@freeswitch.com" target="_blank" class="">sales@freeswitch.com</a><br class="">
<a href="https://freeswitch.com/" target="_blank" class="">https://freeswitch.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="https://freeswitch.com/oss" target="_blank" class="">https://freeswitch.com/oss</a><br class="">
<a href="https://freeswitch.org/confluence" target="_blank" class="">https://freeswitch.org/confluence</a><br class="">
<a href="https://cluecon.com/" target="_blank" class="">https://cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="https://freeswitch.com/" target="_blank" class="">https://freeswitch.com</a><u class=""></u><u class=""></u></p>
</blockquote>
</div>
</div>
<p class="MsoNormal">-- <u class=""></u><u class=""></u></p>
<div class="">
<div class="">
<div class="">
<p class="MsoNormal">Regards,<u class=""></u><u class=""></u></p>
</div>
<div class="">
<p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</div>
<p class="MsoNormal">David Villasmil<u class=""></u><u class=""></u></p>
<div class="">
<p class="MsoNormal">email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank" class="">
david.villasmil.work@gmail.com</a><u class=""></u><u class=""></u></p>
</div>
<div class="">
<p class="MsoNormal">phone: +34669448337<u class=""></u><u class=""></u></p>
</div>
</div>
</div>
</div>
</div>
_________________________________________________________________________<br class="">
<br class="">
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com/" rel="noreferrer" target="_blank" class="">
https://signalwire.com</a><br class="">
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br class="">
Build your next product on our scalable cloud platform.<br class="">
<br class="">
Join our online community to chat in real time <a href="https://signalwire.community/" rel="noreferrer" target="_blank" class="">
https://signalwire.community</a><br class="">
<br class="">
Professional FreeSWITCH Services<br class="">
<a href="mailto:sales@freeswitch.com" target="_blank" class="">sales@freeswitch.com</a><br class="">
<a href="https://freeswitch.com/" rel="noreferrer" target="_blank" class="">https://freeswitch.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank" class="">https://freeswitch.com/oss</a><br class="">
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank" class="">https://freeswitch.org/confluence</a><br class="">
<a href="https://cluecon.com/" rel="noreferrer" target="_blank" class="">https://cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="https://freeswitch.com/" rel="noreferrer" target="_blank" class="">https://freeswitch.com</a></blockquote>
</div>
</div>
-- <br class="">
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr" class="">
<div class="">Regards,</div>
<div class=""><br class="">
</div>
David Villasmil
<div class="">email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank" class="">
david.villasmil.work@gmail.com</a></div>
<div class="">phone: +34669448337</div>
</div>
</div>
_________________________________________________________________________<br class="">
<br class="">
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" class="">
https://signalwire.com</a><br class="">
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br class="">
Build your next product on our scalable cloud platform.<br class="">
<br class="">
Join our online community to chat in real time <a href="https://signalwire.community" class="">
https://signalwire.community</a><br class="">
<br class="">
Professional FreeSWITCH Services<br class="">
<a href="mailto:sales@freeswitch.com" class="">sales@freeswitch.com</a><br class="">
https://freeswitch.com<br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
https://freeswitch.com/oss<br class="">
https://freeswitch.org/confluence<br class="">
https://cluecon.com<br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
FreeSWITCH-users@lists.freeswitch.org<br class="">
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">
https://freeswitch.com</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>