[Home]

Summary:ASTERISK-08457: IAX2 appears to deadlock on OS X
Reporter:Steven Sokol (ssokol)Labels:
Date Opened:2006-12-29 19:48:32.000-0600Date Closed:2006-12-29 21:49:31.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Whenever I attempt to register Idefisk (an IAX2 soft phone) to Asterisk (1.4.0 stable) Asterisk accepts the registration and apparently deadlocks.  No further IAX2 communications take place.  Enabling IAX2 debugging shows nothing -- just the initial registration.  Logging and verbose at full show nothing out of the ordinary.

I've tried this on multiple Intel-based Macs and the results appear to be the same.
Comments:By: Steven Sokol (ssokol) 2006-12-29 20:21:49.000-0600

Ok, I traced it out and it did appear to work after registration until I sent a call, then it deadlocked.  Here's a trace:

Asterisk Ready.
*CLI> iax2 set debug
IAX2 Debugging Enabled
*CLI> Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
  Timestamp: 00003ms  SCall: 09513  DCall: 00000 [127.0.0.1:49205]
  USERNAME        : 6000
  REFRESH         : 300

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: REGAUTH
  Timestamp: 00008ms  SCall: 00001  DCall: 09513 [127.0.0.1:49205]
  AUTHMETHODS     : 3
  CHALLENGE       : 130194632
  USERNAME        : 6000

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: REGREQ
  Timestamp: 00006ms  SCall: 09513  DCall: 00001 [127.0.0.1:49205]
  USERNAME        : 6000
  REFRESH         : 300
  MD5 RESULT      : fdacc6840b754375e3cf83f8b9d1b346

   -- Registered IAX2 '6000' (AUTHENTICATED) at 127.0.0.1:49205
[Dec 29 20:23:16] NOTICE[4585]: chan_iax2.c:5622 update_registry: Restricting registration for peer '6000' to 60 seconds (requested 300)
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE  
  Timestamp: 00015ms  SCall: 00002  DCall: 00000 [127.0.0.1:49205]
Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REGACK
  Timestamp: 00015ms  SCall: 00001  DCall: 09513 [127.0.0.1:49205]
  USERNAME        : 6000
  DATE TIME       : 2006-12-29  20:23:16
  REFRESH         : 60
  APPARENT ADDRES : IPV4 127.0.0.1:49205

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: ACK    
  Timestamp: 00015ms  SCall: 09514  DCall: 00002 [127.0.0.1:49205]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: PONG  
  Timestamp: 00015ms  SCall: 09514  DCall: 00002 [127.0.0.1:49205]
  RR_JITTER       : 0
  RR_LOSS         : 0
  RR_PKTS         : 1
  RR_DELAY        : 40
  RR_DROPPED      : 0
  RR_OUTOFORDER   : 0

Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: ACK    
  Timestamp: 00015ms  SCall: 00002  DCall: 09514 [127.0.0.1:49205]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK    
  Timestamp: 00015ms  SCall: 09513  DCall: 00001 [127.0.0.1:49205]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW    
  Timestamp: 00003ms  SCall: 09515  DCall: 00000 [127.0.0.1:49205]
  VERSION         : 2
  CALLING NUMBER  : 6000
  CALLING NAME    : User 6000
  FORMAT          : 2
  CAPABILITY      : 1550
  USERNAME        : 6000
  CALLED NUMBER   : 1000
  DNID            : 1000

At this point it hung.  I ran the scenario several time and it hung at exactly the same place each time.

By: Joshua C. Colp (jcolp) 2006-12-29 21:49:31.000-0600

Fixed in 1.4 as of revision 49063 and trunk as of revision 49064. Thanks Evil Sokol!