[asterisk-bugs] [JIRA] (ASTERISK-24582) realtime with multiple destinations using priorities results in duplicate queries

Rusty Newton (JIRA) noreply at issues.asterisk.org
Thu Dec 4 20:17:36 CST 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=223801#comment-223801 ] 

Rusty Newton edited comment on ASTERISK-24582 at 12/4/14 8:16 PM:
------------------------------------------------------------------

Sample debug log for realtime update on registration:
[Edit by Rusty - removing inline debug and attaching as .txt per the guidelines]


was (Author: dant):
Sample debug log for realtime update on registration:
[Dec  3 02:57:33] DEBUG[12480] chan_sip.c: Store REGISTER's Contact header for call routing.
[Dec  3 02:57:33] DEBUG[12480] pbx.c: Added extension '58932' priority 1 to sipregistrations (0x2afe8c0)
[Dec  3 02:57:33] VERBOSE[12480] pbx.c:     -- Added extension '58932' priority 1 to sipregistrations
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x237abc8) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Skip: 0; SQL: UPDATE sippeers SET ipaddr=?, port=?, regseconds=?, defaultuser=?, useragent=?, lastms=?, fullcontact=? WHERE name=?
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 1 ('ipaddr') = '10.0.31.120'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 2 ('port') = '5060'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 3 ('regseconds') = '1417546773'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 4 ('defaultuser') = '58932'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 5 ('useragent') = 'Cisco-CP7940G/8.0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 6 ('lastms') = '0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 7 ('fullcontact') = 'sip:58932 at 10.0.31.120:5060;user=phone;transport=udp'
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x237abc8) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x234c1f8) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Skip: 0; SQL: UPDATE sippeers SET ipaddr=?, port=?, regseconds=?, defaultuser=?, useragent=?, lastms=?, fullcontact=? WHERE name=?
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 1 ('ipaddr') = '10.0.31.120'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 2 ('port') = '5060'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 3 ('regseconds') = '1417546773'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 4 ('defaultuser') = '58932'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 5 ('useragent') = 'Cisco-CP7940G/8.0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 6 ('lastms') = '0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 7 ('fullcontact') = 'sip:58932 at 10.0.31.120:5060;user=phone;transport=udp'
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x234c1f8) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x237a928) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Skip: 0; SQL: UPDATE sippeers SET ipaddr=?, port=?, regseconds=?, defaultuser=?, useragent=?, lastms=?, fullcontact=? WHERE name=?
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 1 ('ipaddr') = '10.0.31.120'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 2 ('port') = '5060'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 3 ('regseconds') = '1417546773'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 4 ('defaultuser') = '58932'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 5 ('useragent') = 'Cisco-CP7940G/8.0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 6 ('lastms') = '0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 7 ('fullcontact') = 'sip:58932 at 10.0.31.120:5060;user=phone;transport=udp'
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x237a928) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x238eec8) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Skip: 0; SQL: UPDATE sippeers SET ipaddr=?, port=?, regseconds=?, defaultuser=?, useragent=?, lastms=?, fullcontact=? WHERE name=?
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 1 ('ipaddr') = '10.0.31.120'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 2 ('port') = '5060'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 3 ('regseconds') = '1417546773'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 4 ('defaultuser') = '58932'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 5 ('useragent') = 'Cisco-CP7940G/8.0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 6 ('lastms') = '0'
[Dec  3 02:57:33] DEBUG[12480] res_config_odbc.c: Parameter 7 ('fullcontact') = 'sip:58932 at 10.0.31.120:5060;user=phone;transport=udp'
[Dec  3 02:57:33] DEBUG[12480] res_odbc.c: odbc_release_obj2(0x238eec8) called (obj->txf = (nil))
[Dec  3 02:57:33] DEBUG[12480] chan_sip.c: Trying to put 'SIP/2.0 200' onto UDP socket destined for 10.0.31.120:5060


> realtime with multiple destinations using priorities results in duplicate queries
> ---------------------------------------------------------------------------------
>
>                 Key: ASTERISK-24582
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24582
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_config_odbc
>    Affects Versions: 11.14.1
>         Environment: Using asterisk 11.14.1 RPMs on CentOS 6.6
>            Reporter: dant
>            Severity: Minor
>         Attachments: queue_log_insert.txt
>
>
> Asterisk is configured to use realtime via ODBC. The database is Percona XtraDB Cluster with 4 configured nodes (multi-master) for Asterisk for failover, priorities have been defined. Pulling realtime information works well, but, updates that store to realtime show running against all databases, this is most noticeable for INSERTs to queue log where entries appear 4 times in the database with only the autoincrementing ID different between rows, but can be seen with sippeers UPDATES in logging too.
> From extconfig.conf:
> queue_log => odbc,db1,queue_log,1
> queue_log => odbc,db2,queue_log,2
> queue_log => odbc,db3,queue_log,3
> queue_log => odbc,db4,queue_log,4
> Expected behavior:
> If the log can be written to db1, then it is written only to db1. If there is a failure, the next highest priority, i.e. db2, is tried.
> Observed behavior:
> The log appears to be written to all servers, which, being multi-master, results in duplicate log inserts.



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



More information about the asterisk-bugs mailing list