[Asterisk-Dev] IAX2/SIP clicking

Tais M. Hansen tmh at comx.as
Tue May 18 12:41:26 MST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm experiencing occasional clicking in my setup. I've done a lot of testing 
on where and why these clicks could or would occur and have just found the 
following weirdness:

The setup (all Asterisk servers are running with CVS-05/11/04-12:04:17-CEST:

SIP endpoint via SIP to Ast1 via IAX2 (trunk) to Ast2 via IAX2 (trunk) to Ast3 
running playtones() to make a pulsating sound. I'm using G.711 alaw all the 
way.

I was mainly focusing on the packets coming from Ast3 to the SIP EP, as 
(reportedly) there are no clicks in the other direction. I used tethereal to 
dump RTP packets on Ast1 destined for the SIP endpoint. After a while I heard 
a click and here's what I found:

180.728134  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1869849270, Seq=20029, Time=3185736568
180.740570  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1869849270, Seq=20030, Time=3185736568

The Timestamps in the RTP packet is identical. I tried doing it again making a 
new call:

 31.414108  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1775937195, Seq=1556, Time=3167988768
 31.414130  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1775937195, Seq=1557, Time=3167988768

Than I made up a script to detect this and let a call run for a while:

Monitoring...
Capturing on eth1
***CLICK***
940.646955  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36274, Time=3250917144
940.664369  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36275, Time=3250917144

***CLICK***
940.786954  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36281, Time=3250918104
940.786974  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36282, Time=3250918104

***CLICK***
941.306955  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36307, Time=3250922104
941.306976  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36308, Time=3250922104

***CLICK***
941.526986  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36318, Time=3250923704
941.527005  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36319, Time=3250923704

***CLICK***
941.666953  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36325, Time=3250924664
941.666974  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36326, Time=3250924664

***CLICK***
944.406949  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36462, Time=3250946424
944.424374  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36463, Time=3250946424

***CLICK***
944.906949  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36487, Time=3250950264
944.906970  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1707021218, Seq=36488, Time=3250950264

Sure enough. At every "***CLICK***" I heard a click in the audio.

It then tried to minimize the setup:

SIP endpoint to Ast1 via IAX2 (trunk) to Ast2 running playtones().

***CLICK***
757.108068  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1246057884, Seq=35785, Time=3299522904
757.108087  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1246057884, Seq=35786, Time=3299522904

***CLICK***
2498.231657  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1246057884, Seq=57306, Time=3313451864
2498.248090  172.31.1.15 -> 172.31.1.133 RTP Payload type=ITU-T G.711 PCMA, 
SSRC=1246057884, Seq=57307, Time=3313451864

Less clicks, but it still occurs... Further minimizing:

SIP endpoint to Ast1 running playtones().

No clicks after more than an hour.

So the problem seems to be related to IAX2. I can't seem to retrieve 
timestamps from IAX2 voice frames, to compare with the SIP timestamps. Any 
suggestions on how to continue from here?

- -- 
Regards,
Tais M. Hansen
ComX Networks
Tel: +45-70257474
Fax: +45-70257374

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAqmbo2TEAILET3McRArPZAJ0fGHRt3M/lvMVSrVWuwW2bJgGSjQCgg246
ba/aOEnSqN7lzkcmDYin5LM=
=Hn/u
-----END PGP SIGNATURE-----



More information about the asterisk-dev mailing list