[Asterisk-Dev] chan_sip goes "deaf" - SIP monitor thread stops

steve at daviesfam.org steve at daviesfam.org
Tue Feb 8 13:55:02 MST 2005


Hi,

I'm looking for any help or suggestions as to how to track down this 
issue, which sure looks like a bug to me:

We have a site where chan_sip will suddenly go deaf.  No untoward messages 
in the logs, except that it receives nothing (no Sip read: messages), nor 
do any retransmits take place.

This is often triggered when the operator blind-transfers a call into a 
queue.  The queue rings 14 SIP phones in parallel.  (This does usually 
work properly).

In the case which I examined closely, the first half or so of the phones
Asterisk sends INVITE and gets back trying/ringing.  For the other half
Asterisk says its sending the INVITE, but never gets anything back and
neither retransmits the INVITEs.

No further SIP packets are seen until Asterisk is restarted.  No "Sip 
read:" logs.

>From reviewing the code, I believe that the monitor thread has stopped 
running, or got blocked on a mutex.  This would account for no scheduled 
tasks being run (so no retransmits) and no socket input happening.

To try to debug, I #defined DEBUG_THREADS, and also defined 
DETECT_DEADLOCKS in include/asterisk/lock.h.  So far I didn't see anything 
from these.

I've also now added an ast_log in the SIP monitor thread loop to see that 
it is still going.

Is there anything else I can do to make sure I get the info I need on the 
next crash.  If it takes much longer it'll be moot as the Asterisk stuff 
will be kicked out of the site.

Thanks,
Steve Davies




More information about the asterisk-dev mailing list