[Freeswitch-users] Freeswitch Scripting strangeness
paul bilke
fsmail at conspiracy.net
Tue May 11 14:39:28 PDT 2010
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
More information about the FreeSWITCH-users
mailing list