[asterisk-dev] Is this a Realtime SIP bug
Nic Colledge
nic at njcolledge.net
Fri Jan 22 21:03:05 CST 2010
Hi,
For a while now I have been seeing these messages on my testing asterisk machine (running trunk) and have only just got around to looking into them, these appear just after a sip registration.
"[Jan 23 00:50:05] WARNING[1373] res_config_pgsql.c: PostgreSQL RealTime: Failed to query database. Check debug for more info."
Ok so I tried ODBC, With ODBC I get:
[Jan 23 02:41:30] WARNING[1366] res_odbc.c: SQL Execute returned an error -1: 22P02: ERROR: invalid input syntax for integer: "";
Error while executing the query (76)
[Jan 23 02:41:30] WARNING[1366] res_odbc.c: SQL Execute error -1! Attempting a reconnect...
[Jan 23 02:41:30] WARNING[1366] res_odbc.c: Connection is down attempting to reconnect...
[Jan 23 02:41:30] NOTICE[1366] res_odbc.c: Connecting PostgreSQL-asterisk
[Jan 23 02:41:30] NOTICE[1366] res_odbc.c: res_odbc: Connected to PostgreSQL-asterisk [asterisk-connector]
[Jan 23 02:41:30] WARNING[1366] res_odbc.c: SQL Execute returned an error -1: 22P02: ERROR: invalid input syntax for integer: "";
This is not preventing users from registering, and I have narrowed it down to the Sip Peers table.
Matching entry from Postgresql Log (when these errors happen):
GMT STATEMENT: UPDATE sip_conf SET fullcontact = '', ipaddr = '', port = '', regseconds = '0', username = '', regserver = '', useragent = '', lastms = '' WHERE name = '100'
My realtime sip table has lastms or type bigint and int (I have tried both while I was scratching my head trying to find out if I had configured something wrong, I have also tried nulls allowed and NOT NULL on this field).
Shouldn't the statement include lastms = 0 (rather than '').
Appologies if ive done somthing stupid and lastms should be a character field, I dont think this is the case as I have seen several expamples online with lastms as a int.
Any ideas, is this a bug?
Thanks in advance.
Regards,
Dr. Nic Colledge
nic at njcolledge.net<mailto:nic at njcolledge.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100123/30e4f38a/attachment.htm
More information about the asterisk-dev
mailing list