[asterisk-bugs] [Asterisk 0018699]: SIP Realtime: Peer isn't deleted/cleared from 'sip show peers' when the phone unregister
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Feb 10 12:39:45 CST 2011
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=18699
======================================================================
Reported By: ibercom
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18699
Category: Channels/chan_sip/Registration
Reproducibility: always
Severity: minor
Priority: normal
Status: acknowledged
Asterisk Version: 1.4.39.1
JIRA: SWP-3028
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2011-01-28 14:17 CST
Last Modified: 2011-02-10 12:39 CST
======================================================================
Summary: SIP Realtime: Peer isn't deleted/cleared from 'sip
show peers' when the phone unregister
Description:
I use cache realtime friends. When the registration expires
(rtautoclear=yes), the friend vanish from the configuration until requested
again. It is ok. But when the phone unregisters (x-lite) the friend
continues existing. 'sip show peer' shows the peer in UNKNOWN status
forever.
In a multiserver environment it is a problem because the phone can be
registered in other server and the database have correct information, but
the first server can't call this phone because it is in memory and it don't
load information from the database. You need use sip prune realtime xxxx
and then it is ok.
======================================================================
----------------------------------------------------------------------
(0131803) ibercom (reporter) - 2011-02-10 12:39
https://issues.asterisk.org/view.php?id=18699#c131803
----------------------------------------------------------------------
I don't know C language. But afterwards seek inside the code of the
chan_sip.c, if I comment the part of the code where the phone unregister it
works better. The peer expire ok and it's not in unknown state and the
cached peer is cleared.
Although more slowly, max. 3600 sec. since it is not immediate. But this
isn't the solutions.
Asterisk 1.4.38 - chan_sip.c - Commented lines:
8847 /* This means remove all registrations and return OK */
8848 memset(&peer->addr, 0, sizeof(peer->addr));
8849 if (!AST_SCHED_DEL(sched, peer->expire)) {
8850 struct sip_peer *peer_ptr = peer;
8851 ASTOBJ_UNREF(peer_ptr, sip_destroy_peer);
8852 }
8853
8854 destroy_association(peer);
8855
8856 register_peer_exten(peer, 0); /* Add extension from regexten=
setting in sip.conf */
8857 peer->fullcontact[0] = '\0';
8858 peer->useragent[0] = '\0';
8859 peer->sipoptions = 0;
8860 peer->lastms = 0;
8861 peer->portinuri = 0;
8862 pvt->expiry = 0;
Issue History
Date Modified Username Field Change
======================================================================
2011-02-10 12:39 ibercom Note Added: 0131803
======================================================================
More information about the asterisk-bugs
mailing list