Debug output shows registered but not in show peers

In the debug output, I can see the message (IP address replaced with X’s)

WARNING[29513]: db.c:295 ast_db_put: Couldn't execute statment: SQL logic error or missing database Registered SIP 'demo-alice' at XXX.XXX.XXX.XXX:5061 > Saved useragent "Twinkle/1.4.2" for peer demo-alice

But when I execute sip show peers, I only see

Name/username Host Dyn Forcerport ACL Port Status Description demo-alice (Unspecified) D N A 0 Unmonitored demo-bob (Unspecified) D N A 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline]

I simply followed the instructions given here: wiki.asterisk.org/wiki/display/ … P+Accounts. What am I missing? Does the line that say Couldn't execute statment: SQL logic error or missing database have something to do with it?

Are you using ARA ?
Please put you sip config here so that we can help .

Asterisk can not write to sqlite3 database. This usually means the permissions on the directory containing the database, typically - /var/lib/asterisk - are not allowing the user, asterisk runs as, to write.
Here is a snippet from db.c:

*** It is also imperative that the user under which *** Asterisk runs have write permission to the directory *** where the database resides.

BTW: It would have been nice had you mentioned you are running asterisk 10.

It worked when I modified the value of “tcpenabled” back to “no”. I modified it to “yes” because I was receiving the message “WARNING[2092]: chan_sip.c:29579 reload_config: Cannot use ‘tcp’ transport with tcpenable=no. Removing from available transports.”