[Home]

Summary:ASTERISK-12270: iax2 hangs with jitterbuffer or timestamps - after hang it does not accept calls
Reporter:kalus meier (-minime-)Labels:
Date Opened:2008-06-27 13:38:09Date Closed:2008-06-30 11:10:09
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:i have following setup :

nokia_sip_client A-----sip-----B  1.asterisk B------iax2--------C 2.asterisk

ip-addr A,B is public
ip-addr C is private

1.asterisk (Asterisk 1.4.21 or 080626_asterisk 1.6beta) is only there to accept calls to forward them to 2.asterisk (Asterisk 1.4.21-BRIstuffed-0.4.0-RC3a) via iax2

1.asterisk has ztdummy(rtc) and 2.asterisk has zaphfc as timing (ztdummy(rtc) is also loaded )

both asterisk use 1000hz kernel timing

here the problem:
- having on both asterisk turned on jitterbuffer (jb) and timestamps (ts) or on both asterisk either only jb or ts
- sip_client calls voicebox at 1.asterisk - 2.asterisk forwards call via iax2 to 1.asterisk
- call gets going - with dtmf and so on - i stress test a bit (push often dtmf) to reproduce error
- after a while - nothing goes and the call gets closed via 1.asterisk eventually

problem solving:
- turn off jb AND ts
- on 1.asterisk works fine - i can reload chan_iax2
- on 2.asterisk reload chan_iax2 says - Soft unload failed, 'chan_iax2.so' has use count 1 - only "killall -9 2.asterisk" helps !

see also debug log ...

****** ADDITIONAL INFORMATION ******

here debug log on 2.asterisk - 1.asterisk keeps sending until it times out:

Tx-Frame Retry[-01] -- OSeqno: 019 ISeqno: 057 Type: IAX     Subclass: ACK
  Timestamp: 50035ms  SCall: 00710  DCall: 16384 [193.184.xx.xx:4569]
Rx-Frame Retry[ No] -- OSeqno: 057 ISeqno: 019 Type: DTMF_E  Subclass: *
  Timestamp: 50276ms  SCall: 16384  DCall: 00710 [193.184.xx.xx:4569]
Tx-Frame Retry[-01] -- OSeqno: 019 ISeqno: 058 Type: IAX     Subclass: ACK
  Timestamp: 50276ms  SCall: 00710  DCall: 16384 [193.184.xx.xx:4569]
   -- <IAX2/1.asterisk-710> Playing 'vm-opts' (language 'en')
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
  Timestamp: 00002ms  SCall: 02196  DCall: 00000 [193.184.xx.xx:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: PONG
  Timestamp: 00002ms  SCall: 11402  DCall: 02196 [193.184.xx.xx:4569]
Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: ACK
  Timestamp: 00002ms  SCall: 02196  DCall: 11402 [193.184.xx.xx:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
  Timestamp: 00018ms  SCall: 01407  DCall: 00000 [10.0.21.1:4569]
Rx-Frame Retry[ No] -- OSeqno: 058 ISeqno: 019 Type: DTMF_B  Subclass: 0
  Timestamp: 52632ms  SCall: 16384  DCall: 00710 [193.184.xx.xx:4569]
Tx-Frame Retry[-01] -- OSeqno: 019 ISeqno: 059 Type: IAX     Subclass: ACK
  Timestamp: 52632ms  SCall: 00710  DCall: 16384 [193.184.xx.xx:4569]
Rx-Frame Retry[ No] -- OSeqno: 059 ISeqno: 019 Type: DTMF_E  Subclass: 0
  Timestamp: 52904ms  SCall: 16384  DCall: 00710 [193.184.xx.xx:4569]
Tx-Frame Retry[-01] -- OSeqno: 019 ISeqno: 060 Type: IAX     Subclass: ACK
  Timestamp: 52904ms  SCall: 00710  DCall: 16384 [193.184.xx.xx:4569]
   -- <IAX2/1.asterisk-710> Playing 'vm-tmpexists' (language 'en')
Tx-Frame Retry[001] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
  Timestamp: 00018ms  SCall: 01407  DCall: 00000 [10.0.21.1:4569]
Rx-Frame Retry[ No] -- OSeqno: 060 ISeqno: 019 Type: DTMF_B  Subclass: 0
  Timestamp: 57372ms  SCall: 16384  DCall: 00710 [193.184.xx.xx:4569]

here also the iax.conf on 2.asterisk

[general]
; i tryed 4 different options jb&ts or jb or ts or none
;jitterbuffer=yes  
trunktimestamps=yes
bindport = 4569 ; Port to bind to (IAX is 4569)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
; use alaw or ulaw if you dont have the g729 codec
disallow=all
allow=alaw
allow=ulaw
;allow=g726
allow=gsm
allow=ilbc

[1.asterisk]
type=friend
host=193.184.xx.xx ; or static ip
secret=is_secret
context=sip_clt_in
trunk=yes
qualify=yes
Comments:By: kalus meier (-minime-) 2008-06-27 13:41:38

- sip_client calls voicebox at 1.asterisk - 2.asterisk forwards call via iax2 to 1.asterisk

it should be :

- sip_client calls voicebox at 2.asterisk - 1.asterisk forwards call via iax2 to 2.asterisk

By: Digium Subversion (svnbot) 2008-06-30 10:58:41

Repository: asterisk
Revision: 126573

U   branches/1.4/include/asterisk/lock.h

------------------------------------------------------------------------
r126573 | russell | 2008-06-30 10:57:56 -0500 (Mon, 30 Jun 2008) | 10 lines

Fix a typo in the non-DEBUG_THREADS version of the recently added DEADLOCK_AVOIDANCE()
macro.  This caused the lock to not actually be released, and as a result, not
avoid deadlocks at all.  This resolves the issues reported in the last while about
Asterisk locking up all over the place (and most commonly, in chan_iax2).

(closes issue ASTERISK-12258)
(closes issue ASTERISK-12270)
(closes issue ASTERISK-12256)
(potentially closes others ...)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=126573

By: Digium Subversion (svnbot) 2008-06-30 11:10:09

Repository: asterisk
Revision: 126578

U   tags/1.4.21.1/include/asterisk/lock.h

------------------------------------------------------------------------
r126578 | russell | 2008-06-30 11:09:42 -0500 (Mon, 30 Jun 2008) | 10 lines

Fix a typo in the non-DEBUG_THREADS version of the recently added DEADLOCK_AVOIDANCE()
macro.  This caused the lock to not actually be released, and as a result, not
avoid deadlocks at all.  This resolves the issues reported in the last while about
Asterisk locking up all over the place (and most commonly, in chan_iax2).

(closes issue ASTERISK-12258)
(closes issue ASTERISK-12270)
(closes issue ASTERISK-12256)
(potentially closes others ...)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=126578