Calls stuck in Asterisk forever

Channels seem to stay open even after calls are over. They build up forever. I haven’t tested enough, but I am pretty sure that eventually this locks new calls out. This list is about a day since the last Asterisk restart. The first few are current ulaw calls, but the rest are not active calls. 172.22.9.3 is my voip gateway.

asterisk*CLI> sip show channels
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Format           Hold     Last Message   
172.22.9.101     (None)      7fdc5ea8-2f  00101/05680  0x0 (nothing)    No       Rx: REGISTER              
172.22.12.148    448         678a18106e1  00102/00000  0x4 (ulaw)       No       Tx: ACK                   
172.22.9.3       +143567170  SEAMGC03200  00101/00001  0x4 (ulaw)       No       Rx: ACK                   
172.22.9.3       +120874730  5dfc527c2e5  00102/00000  0x4 (ulaw)       No       Tx: ACK                   
172.22.12.101    401         b55a3a4ae2f  00101/64069  0x4 (ulaw)       No       Rx: ACK                   
172.22.9.3       +180165328  28a21beb2c0  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120818016  5e6f606544b  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120818016  13d238543ce  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120818016  3f57996d083  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +180165328  04bfed4e2cb  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120874732  33e245f636a  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120885103  0c747a95680  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120885292  0da73f040ec  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120885292  67e78595218  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120824173  0b73e30424b  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120824173  5c0dbbea715  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120812084  2f26923a49a  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120833444  6ed334e3133  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120840768  50aa470039c  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120833984  5ceb86c6447  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120874731  101b0910720  00102/00000  0x0 (nothing)    No       Init: INVITE              
172.22.9.3       +120874734  3aecbc3457d  00102/00000  0x0 (nothing)    No       Init: INVITE 

Any help on this? Shouldn’t these calls be cleared out?

Here is a couple things to try:

put this in sip.conf
rtptimeout=60

cron job to restart asterisk every night.

Added rtptimeout=60 to [general] in sip.conf. Will see how it goes.

I guess a cron job restart would work, but that is just a band-aid. :neutral_face:

This is the kind of stuff that really erks me about Asterisk. In a lot of cases, a script to do this sort of thing ends up being the big fix. It seems like every revision only serves to fix a handful of bugs and create another. sigh