[asterisk-bugs] [JIRA] (ASTERISK-23611) sip registration expiry is not updated on shutdown

klaus3000 (JIRA) noreply at issues.asterisk.org
Thu Apr 10 04:47:18 CDT 2014


klaus3000 created ASTERISK-23611:
------------------------------------

             Summary: sip registration expiry is not updated on shutdown
                 Key: ASTERISK-23611
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23611
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_sip/Registration
    Affects Versions: 11.8.1
         Environment: Standard sip.conf, no realtime.
            Reporter: klaus3000
            Severity: Minor


When Asterisk is shutdown, the registration expiration does not ge updated, eg:

sip show peer u+437203102510212
..
  Expire       : 124


sip show peer u+437203102510212
..
  Expire       : 102


core restart now
sip show peer u+437203102510212
  Expire       : 125

It seems that the registration in asdb only gets updated on REGISTER or on expiration, but not on shutdown. I think the problem is related how Asterisk stores the registration in astbd:

sqlite> select * from astdb;
/SIP/Registry/u+437203102510212|83.136.33.25:45228:120:u+437203102510212:sip:u+437203102510212 at 192.168.0.7:45228;rinstance=5f057e1ec5c005e4

Asterisk stores the registration expiry in seconds - without any absolute anchor. I think a quick fix would be to not only store the expiration value, but also the timestamp of the last update in the astdb. Then, on Asterisk reload, Asterisk can calculate if the registration is meanwhile expired and ignore it.

I know there are pros and cons of the current behavior. For example if the clients still use the same source address, the client is immediately available when Asterisk is started again after some downtime. On the other hand, it is sending lots of OPTIONS requests to clients which are already gone (or have a new source IP address).





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



More information about the asterisk-bugs mailing list