[asterisk-bugs] [JIRA] (ASTERISK-23677) [res_odbc] Syntax error in peer registration

Jan Svoboda (JIRA) noreply at issues.asterisk.org
Sun Apr 27 14:03:18 CDT 2014


Jan Svoboda created ASTERISK-23677:
--------------------------------------

             Summary: [res_odbc] Syntax error in peer registration
                 Key: ASTERISK-23677
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23677
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_odbc
    Affects Versions: 12.2.0
         Environment: Linux CentOS 6.5
unixODBC 2.2.14-12.el6_3
            Reporter: Jan Svoboda


When a peer using SIP realtime registers, the following error is shown:

    -- Registered SIP 'device-name' at 12.34.56.78:57765
[Apr 27 20:42:49] NOTICE[21939]: chan_sip.c:24130 handle_response_peerpoke: Peer 'device-name' is now Reachable. (16ms / 2000ms)
[Apr 27 20:42:49] WARNING[21939]: res_odbc.c:655 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: HY000: [unixODBC][SQLite]near "WHERE": syntax error (1) (48)

The SQL query that is being executed:

UPDATE sip_devices SET  WHERE name=E'81'

Also, when reading through the SQL log, noticed the following query:

UPDATE sip_devices SET fullcontact=E'12.34.56.78', useragent=E'sip:device-name at 192.168.1.22:53187^3Bob', regseconds=E'-1' WHERE name=E'Telephone 1.1.4'

The value of the 'name' column in the SQL clause is actually the useragent string, not device name and the useragent being set is not an useragent string.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list