[asterisk-bugs] [Asterisk 0012921]: Asterisk 1.4.21 breaks realtime sip on 'sip reload'

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Aug 5 01:20:10 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12921 
====================================================================== 
Reported By:                Nuitari
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12921
Category:                   PBX/pbx_realtime
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.21-rc1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-06-23 20:59 CDT
Last Modified:              2008-08-05 01:20 CDT
====================================================================== 
Summary:                    Asterisk 1.4.21 breaks realtime sip on 'sip reload'
Description: 
Using Asterisk 1.4.21 realtime becomes useless after a sip reload is done.


The dynamic information is cleared, however it doesn't get reloaded from
the database when the friend is doing some activity. The only way to make
the friend show again is to force the phone to register again, usually
though a reboot.

The module is res_mysql, from asterisk-addons 1.4.7, works as expected
with Asterisk 1.4.20.
====================================================================== 

---------------------------------------------------------------------- 
 (0091070) cstadlmann (reporter) - 2008-08-05 01:20
 http://bugs.digium.com/view.php?id=12921#c91070 
---------------------------------------------------------------------- 
Corydon, sorry to tell but this didn't solve the problem:

    -- Registered SIP 'test' at 192.168.4.109 port 2048 expires 3600
    -- Saved useragent "snom360/7.1.30" for peer test
[Aug  5 08:14:05] NOTICE[23293]: chan_sip.c:12698
handle_response_peerpoke: Peer 'test' is now Reachable. (53ms / 2000ms)

*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status    
Realtime
test/test                  192.168.4.109    D   N      2048     OK (53 ms)
Cached RT
WNT                        xx.xxx.xxx.xxx              5060     OK (10
ms)
2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0
offline]
*CLI> sip reload
*CLI>  Reloading SIP
*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status    
Realtime
WNT                        xx.xxx.xxx.xxx              5060     OK (11
ms)
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0
offline]


As you can see, peer registers and is visible. After a 'sip reload' the
peer is gone.

Here is the debug log:

[Aug  5 08:18:18] VERBOSE[23293] logger.c:  Reloading SIP
[Aug  5 08:18:18] DEBUG[23293] res_config_mysql.c: MySQL RealTime: Static
SQL: SELECT category, var_name, var_val, cat_metric FROM ast_config WHERE
filename='sip.conf' and commented=0 ORDER BY filename, cat_metric desc,
var_metric asc, category, var_name, var_val, id
[Aug  5 08:18:18] DEBUG[23293] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug  5 08:18:18] DEBUG[23293] res_config_mysql.c: MySQL RealTime: Found
63 rows.
[Aug  5 08:18:18] DEBUG[23293] chan_sip.c: --------------- SIP reload
started
[Aug  5 08:18:18] DEBUG[23293] chan_sip.c: --------------- Done destroying
user list
[Aug  5 08:18:18] DEBUG[23293] chan_sip.c: --------------- Done destroying
registry list
[Aug  5 08:18:18] DEBUG[23293] chan_sip.c: Setting SIP channel User-Agent
Name to smarTel
[Aug  5 08:18:18] DEBUG[23293] acl.c: 192.168.0.0/255.255.0.0/255.255.0.0
appended to acl for peer
[Aug  5 08:18:18] DEBUG[23293] acl.c: 10.0.0.0/255.0.0.0/255.0.0.0
appended to acl for peer
[Aug  5 08:18:18] DEBUG[23293] acl.c: 172.16.0.0/12/12 appended to acl for
peer
[Aug  5 08:18:18] DEBUG[23293] acl.c: 169.254.0.0/255.255.0.0/255.255.0.0
appended to acl for peer
[Aug  5 08:18:18] DEBUG[23293] res_config_mysql.c: MySQL RealTime: Static
SQL: SELECT category, var_name, var_val, cat_metric FROM ast_config WHERE
filename='sip_notify.conf' and commented=0 ORDER BY filename, cat_metric
desc, var_metric asc, category, var_name, var_val, id
[Aug  5 08:18:18] DEBUG[23293] res_config_mysql.c: MySQL RealTime:
Everything is fine.
[Aug  5 08:18:18] DEBUG[23293] res_config_mysql.c: MySQL RealTime: Found 0
rows.
[Aug  5 08:18:18] DEBUG[23293] chan_sip.c: --------------- Done destroying
pruned peers
[Aug  5 08:18:18] DEBUG[23293] chan_sip.c: --------------- SIP reload
done

As you an see, only the static entries are loaded, but no realtime peers.

BTW, in the internal database, the realtime peer is still there after a
'sip reload':

*CLI> database show
/SIP/Registry/test :
192.168.4.109:2048:3600:test:sip:test at 192.168.4.109:2048 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-05 01:20 cstadlmann     Note Added: 0091070                          
======================================================================




More information about the asterisk-bugs mailing list