Summary:ASTERISK-00185: chan_sip keeps sockets open after trying a REGISTER to a non-responsive peer
Reporter:oliver (oliver)Labels:
Date Opened:2003-08-27 16:42:40Date Closed:2011-06-07 14:00:44
Versions:Frequency of
Description:chan_sip seems to fail to clean up it's sockets used during a REGISTER if the peer it's trying to register to fails to respond.  I first noticed it after FWD was non-responsive for a while, earlier today.

Try something like this in "sip.conf":

register => 1234:password@

Where "" is a non-responsive IP-address.  With each registration-attempt, chan_sip will fail to close the sockets used for this attempt.  You can see the amount of sockets held by chan_sip grow with `netstat', `lsof' and  `ls -la /proc/`cat /var/run/asterisk.pid`/fd | wc'.  At some point, the system will run out of FDs and require Asterisk to be restarted.

I also tried calling a non-responsive SIP-client, but in that case the sockets do seem to get cleaned up properly.


RedHat 9
Asterisk CVS-08/27/03-04:20:06

Note: I'm setting a bindaddr in my "sip.conf".
Comments:By: John Todd (jtodd) 2003-09-04 03:06:36

This may be related (or identical) to a bug I report in http://bugs.digium.com/bug_view_page.php?bug_id=0000055   - read that summary for similar symptoms.

By: oliver (oliver) 2003-09-04 20:23:23

Hey jtodd,

It indeed appears similar to bug "0000055".  It may be intresting to know that the box I'm seeing this problem the most frequent on and which has now completely run out of FD's twice because of it, also has multiple "register"-lines in it's "sip.conf".  I just tried the "sip show channels" you mention in your ticket and am also seeing the large amount of stuck channels.  I haven't seen any crashes that seemed related to this problem, though.  The channels just gradually accumulate, until the system runs out of available FD's, at which point Asterisk will (obviously) stop taking calls as well.

By: John Todd (jtodd) 2003-09-08 15:12:21

I'm closing this bug, since it seems to be the same problem as reported in 55.   I will note in 55 that some minor additional data can be found here.