IAX losing audio

I’m setting up a simple PBX for conferencing and have the following problem with Asterisk.

When I connect using IAX2 (client is kiax, but I tried others too), I lose incoming audio after 1 to ~15 seconds. My config is this:

asterisk: 10.254.254.16
softphone: 10.31.41.20
no NAT between them

When I connect using SIP, there’s no such problem. Using SIP is however not an option, because of NAT (which will be used, I’m using no-NAT just now for testing)

I ran tcpdump during the call. While there was audio, I saw packets sent both ways. When the audio stopped, there were no more packets from asterisk (10.254.254.16) to the softphone (10.31.41.20). I could hangup the call and the call was properly terminated (i.e. signalling works fine).

Asterisk is version 1.6.2.2-1ubuntu2 (current package in Ubuntu 10.04 beta distribution).

my iax.conf:[general] bandwidth=low disallow=lpc10 jitterbuffer=yes forcejitterbuffer=no minregexpire = 30 maxregexpire = 600 autokill=yes [peto] type=friend host=dynamic secret=password context=default regexten=101 requirecalltoken=no

IAX2 debug log (there was only about 300ms of audio, then silence):

[code]Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW
Timestamp: 00003ms SCall: 07401 DCall: 00000 [10.31.41.20:4569]
VERSION : 2
CALLING NUMBER :
CALLING NAME :
FORMAT : 5259734
CAPABILITY : 258
USERNAME : peto
CALLED NUMBER : 600
DNID : 600

Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: AUTHREQ
Timestamp: 00007ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
AUTHMETHODS : 3
CHALLENGE : \x31\x30\x33\x39\x37\x37\x37\x39\x30
USERNAME : peto

Rx-Frame Retry[ No] – OSeqno: 001 ISeqno: 001 Type: IAX Subclass: AUTHREP
Timestamp: 00187ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
MD5 RESULT : 056037eb0d515f1c8260bbc4cbb7769c

-- Accepting AUTHENTICATED call from 10.31.41.20:
   > requested format = unknown,
   > requested prefs = (),
   > actual format = gsm,
   > host prefs = (),
   > priority = mine

Tx-Frame Retry[000] – OSeqno: 001 ISeqno: 002 Type: IAX Subclass: ACCEPT
Timestamp: 00186ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
FORMAT : 2
– Executing [600@default:1] playback(“IAX2/peto-48”, “demo-echotest”)
Tx-Frame Retry[000] – OSeqno: 002 ISeqno: 002 Type: CONTROL Subclass: ANSWER
Timestamp: 00189ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
Tx-Frame Retry[000] – OSeqno: 003 ISeqno: 002 Type: CONTROL Subclass: (255?)
Timestamp: 00192ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 002 Type: IAX Subclass: ACK
Timestamp: 00186ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 003 Type: IAX Subclass: ACK
Timestamp: 00189ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 004 Type: VOICE Subclass: 2
Timestamp: 00500ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Tx-Frame Retry[-01] – OSeqno: 004 ISeqno: 003 Type: IAX Subclass: ACK
Timestamp: 00500ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
– <IAX2/peto-48> Playing ‘demo-echotest.gsm’ (language ‘en’)
Tx-Frame Retry[000] – OSeqno: 004 ISeqno: 003 Type: VOICE Subclass: 2
Timestamp: 00540ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 003 ISeqno: 005 Type: IAX Subclass: ACK
Timestamp: 00540ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
----------> no more audio at this point
Rx-Frame Retry[ No] – OSeqno: 003 ISeqno: 005 Type: IAX Subclass: PING
Timestamp: 02048ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Tx-Frame Retry[000] – OSeqno: 005 ISeqno: 004 Type: IAX Subclass: PONG
Timestamp: 02048ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
RR_JITTER : 50
RR_LOSS : 0
RR_PKTS : 77
RR_DELAY : 90
RR_DROPPED : 0
RR_OUTOFORDER : 0

Rx-Frame Retry[ No] – OSeqno: 004 ISeqno: 006 Type: IAX Subclass: ACK
Timestamp: 02048ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]

Tx-Frame Retry[000] – OSeqno: 006 ISeqno: 004 Type: IAX Subclass: LAGRQ
Timestamp: 10010ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 004 ISeqno: 007 Type: IAX Subclass: ACK
Timestamp: 10010ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 004 ISeqno: 007 Type: IAX Subclass: LAGRP
Timestamp: 10010ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Tx-Frame Retry[-01] – OSeqno: 007 ISeqno: 005 Type: IAX Subclass: ACK
Timestamp: 10010ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 005 ISeqno: 007 Type: IAX Subclass: PING
Timestamp: 12047ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Tx-Frame Retry[000] – OSeqno: 007 ISeqno: 006 Type: IAX Subclass: PONG
Timestamp: 12047ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
RR_JITTER : 50
RR_LOSS : 0
RR_PKTS : 576
RR_DELAY : 90
RR_DROPPED : 0
RR_OUTOFORDER : 0

Rx-Frame Retry[ No] – OSeqno: 006 ISeqno: 008 Type: IAX Subclass: ACK
Timestamp: 12047ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 006 ISeqno: 008 Type: IAX Subclass: HANGUP
Timestamp: 13200ms SCall: 07401 DCall: 00048 [10.31.41.20:4569]
CAUSE : Dumped Call

Tx-Frame Retry[-01] – OSeqno: 008 ISeqno: 007 Type: IAX Subclass: ACK
Timestamp: 13200ms SCall: 00048 DCall: 07401 [10.31.41.20:4569]
== Spawn extension (default, 600, 1) exited non-zero on ‘IAX2/peto-48’
– Hungup 'IAX2/peto-48’
Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00003ms SCall: 07402 DCall: 00000 [10.31.41.20:4569]
USERNAME : peto
REFRESH : 60

Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: REGAUTH
Timestamp: 00016ms SCall: 08578 DCall: 07402 [10.31.41.20:4569]
AUTHMETHODS : 3
CHALLENGE : \x34\x30\x36\x36\x35\x38\x35\x34\x38
USERNAME : peto

Rx-Frame Retry[ No] – OSeqno: 001 ISeqno: 001 Type: IAX Subclass: REGREQ
Timestamp: 00031ms SCall: 07402 DCall: 08578 [10.31.41.20:4569]
USERNAME : peto
REFRESH : 60
MD5 RESULT : 77ae1dacb2fc99016a737dc9fad888d7

Tx-Frame Retry[000] – OSeqno: 001 ISeqno: 002 Type: IAX Subclass: REGACK
Timestamp: 00047ms SCall: 08578 DCall: 07402 [10.31.41.20:4569]
USERNAME : peto
DATE TIME : 2010-04-15 09:32:30
REFRESH : 60
APPARENT ADDRES : IPV4 10.31.41.20:4569

Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 002 Type: IAX Subclass: ACK
Timestamp: 00047ms SCall: 07402 DCall: 08578 [10.31.41.20:4569]
Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00003ms SCall: 07403 DCall: 00000 [10.31.41.20:4569]
USERNAME : peto
REFRESH : 60

Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: REGAUTH
Timestamp: 00006ms SCall: 00381 DCall: 07403 [10.31.41.20:4569]
AUTHMETHODS : 3
CHALLENGE : \x31\x35\x33\x36\x39\x33\x38\x39\x33
USERNAME : peto

Rx-Frame Retry[ No] – OSeqno: 001 ISeqno: 001 Type: IAX Subclass: REGREQ
Timestamp: 00031ms SCall: 07403 DCall: 00381 [10.31.41.20:4569]
USERNAME : peto
REFRESH : 60
MD5 RESULT : f8ab0b8bb91ddb6f637793c43d479c44

Tx-Frame Retry[000] – OSeqno: 001 ISeqno: 002 Type: IAX Subclass: REGACK
Timestamp: 00041ms SCall: 00381 DCall: 07403 [10.31.41.20:4569]
USERNAME : peto
DATE TIME : 2010-04-15 09:33:30
REFRESH : 60
APPARENT ADDRES : IPV4 10.31.41.20:4569

Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 002 Type: IAX Subclass: ACK
Timestamp: 00041ms SCall: 07403 DCall: 00381 [10.31.41.20:4569][/code]

Any suggestions? Thanks a lot for help…