After a few more tests I *think* it is related to SLA. Since it cannot be reproduced consistenty I say "think".
 
What I have is:
- 80635 which is an SLA extension between two Polycoms.
- 80636 which is a private extension on Polycom
- 80632 which is a Cisco extension.
- 86111 which is connected behind a Cisco SIP<->PSTN gateway. Since this gateway doesn't hav any login information it is not defined as a gateway but accepted via ACL.
 
The tests that passed ok:
- From/to 80636/80632 to 80635 (i.e. - all internal).
- From/to 80635 to 80636/80632 (i.e. - all internal)
- From/to 80636/80632 to 86111 and vice versa (i.e. via the gateway, single extensions).
 
The one that fails after a few attempts:
- From 86111 to 80635 (i.e. from the gateway to a shared extension).
 
I hope that this gives some more clues.
 
                          Thanks, __Yehavi:

2010/2/28 Yehavi Bourvine <yehavi.bourvine@gmail.com>
Hello,
 
  I've installed a machine with CentOS-5.4 and the latest FreeSwitch (16841M). The problem still happens, even if I set sql-in-transactions to false. It happens also on a very light load.
 
I would like to remind that we query the SQLite core DB from a LUA script which is called from the dial plan; might this be the cause of it?
 
I am willing to test whatever you like, and can do it now as this machine is not in production yet.
 
            Thanks! __Yehavi:

2010/2/16 Anthony Minessale <anthony.minessale@gmail.com>
Strange, even on abusive testing we have not seen this problem.

please update to latest trunk.
There was only one change I can think of that may cause your issue and I added a patch for it.
If it persists try setting the sql-in-transactions profile param to false.





On Tue, Feb 16, 2010 at 1:30 PM, Yehavi Bourvine <yehavi.bourvine@gmail.com> wrote:
Most of the queries are ok, only some fail, thus it doesn't look like permission problem. Furthermore, under 1.0.5pre10 it works for months.
 
Might it be thread unsafe function calls? I've found the following while searching the WEB:
 
According to the MSDN docs, System.Timers.Timer operates in a thread pool.  If that's the case, your code is breaking the "connections cannot be shared across threads" rule for SQLit
 
Although it quotes MSDN, it might be related to Linux as well.
 
                    Thanks, __Yehavi:

2010/2/16 Anthony Minessale <anthony.minessale@gmail.com>
That sounds about right.

That error usually has something to do with using db calls on a closed file or something along those lines.
Maybe you have a permission problem on the directory where the db files are?



On Tue, Feb 16, 2010 at 12:59 PM, Yehavi Bourvine <yehavi.bourvine@gmail.com> wrote:
The OS is Fedora-10 (soon to be upgraded to 12).
 
What I do when I want to test a new version:
  • Download the latest one into a fresh directory
  • bootstrap.sh, configure and make
  • stop Freeswitch, delete everything in lib, mod, bin ,db
  • make install and run it.
 
Is there additional place to clean?
 
                        Thanks! __Yehavi: 
 
2010/2/16 Anthony Minessale <anthony.minessale@gmail.com>
you may want to do a clean wipe of all files related to FS then.
you clearly have some problem with legacy something or other because we don't see that on dozens of dev boxes.

What os is it?



On Tue, Feb 16, 2010 at 9:27 AM, Yehavi Bourvine <yehavi.bourvine@gmail.com> wrote:
Tried this, but it didn't help. I delete these DB files before any upgrade just to be sure.
 
                  Thanks! __Yehavi:

2010/2/16 Anthony Minessale <anthony.minessale@gmail.com>
try removing all the .db files from /usr/local/freeswitch/db


On Tue, Feb 16, 2010 at 8:56 AM, Yehavi Bourvine <yehavi.bourvine@gmail.com> wrote:
Hello,
 
  After upgrading from 1.0.5pre10 to 1.0.5-20100216-0400 we started getting the above errors (I append bellow two samples). It seems Freeswitch fails to read a database using Sqlite.
Anyone have seen this?
 
Other details: Fedora 10, SQlite 3.5.9.
We also do SQLite quesries during call setup via LUA from CoreDB. Is it an SQLite problem?
 
                         Thanks! __Yehavi:
 
The samples:
2010-02-16 16:22:13.762679 [ERR] switch_core_sqldb.c:404 SQL ERR [library routin
e called out of sequence]
delete from sip_dialogs where call_id='8656841832142-120172129116107@10.64.1.2'

2010-02-16 16:42:00.802442 [ERR] switch_core_sqldb.c:722 SQL ERR: [select call_i
d,sip_user,sip_host,contact,status,rpid,expires,user_agent,server_user,server_ho
st,profile_name,hostname,network_ip,network_port,sip_username,sip_realm,mwi_user
,mwi_host from sip_registrations where profile_name='phones' and contact like '%
80635%'] library routine called out of sequence

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@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@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@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@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@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@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@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@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org