[Freeswitch-users] Freeswitch Scripting strangeness
Anthony Minessale
anthony.minessale at gmail.com
Tue May 11 16:27:49 PDT 2010
Your assumption is correct.
however,
open file handles are not threadsafe and you cannot have 2 threads opening
the same file and expect sane results. That's why syslog is a udp network
server so it can serialize the log messages into a single threaded open file
handle in the central syslog process.
On Tue, May 11, 2010 at 4:39 PM, paul bilke <fsmail at conspiracy.net> wrote:
> I am working on a system that invokes a LUA script of the dial plan to
> handle interaction on the call.
> All is fine when running a single instance of the script (one call). The
> issue is when there is more than one call things become erratic.
> Right now the script opens a log file who's name is based on the date of
> the call and its DNIS using io.open with append.
> The script then writes lines to file as it runs detailing its actions. The
> same log function also uses posix.syslog to log the same information
> via syslog. All is fine when there is one call up.
> If there is more than one concurrent on two different DNIS's both log files
> a present but have output that was created by the other call.
> The syslog is sane but not the file of logging information. The time stamp
> will jump backward and pickup with information from the other call
> (can tell via the UUID)
> It is my assumption that each call should spin up a thread and they should
> share no data/variables/handles with other calls in the system. Looking at
> the logs indicates there is some issue but logging is not the only issue
> since it seems that call events updating state information is affecting the
> other
> call also.
> If my assumption on a isolated thread per call is incorrect let me know.
> I inherited this code and suspect that running an application out of the
> dialplan script is unconventional.
> Paul
>
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100511/2ea39b62/attachment.html
More information about the FreeSWITCH-users
mailing list