[Asterisk-Dev] IAX timing of VOICE frames

Derek Smithies derek at indranet.co.nz
Mon Sep 12 18:49:08 MST 2005


Hi,
 I found in the C++ version of IAX2 that I wrote for the OPAL library at 
www.voxgratia.org that

the timestamps had to represent the time at which the frame was 
generated, not when it was actually sent.

thus, the tenth GSM audio frame was at (some offset) + 10*20ms
and the
         25th GSM audio frames were at (some offset) + 25*20ms


=========================================

I found that a full frame voice had to be sent before the timestamp rolls 
past 65535.- which means that full frame voice need only be sent every 
65.5 seconds.  I have had iax2 calls lasting half an hour (at which 
time I decided that my end correctly handled iseqno and oseqno 
rolling past 255 and hungup).

==========================================

Question:
Why is the received audio sounding choppy?

Have you looked at the packet dump with ethereal? what do you observe - 
are the packets coming too quickly, or are there some missing ??


What jitter buffer are you using ?
Despite any urban myths you might have heard, a quality jitter buffer is
essential to copy with variability in the rate at which packets are
transmitted, and variability in network performance.


Derek.


On Mon, 12 Sep 2005, Lee Howard wrote:

> What is the right way for an IAX client (softphone) to time the sending 
> of VOICE frames to the peer?
> 
> The voice frames are 20ms in length, of course, but I find that if I 
> send them 20ms apart that very short periods of silence happen in the 
> other end's audio stream (the audio sounds "choppy").  If I send a VOICE 
> frame exactly when I receive a VOICE frame then that works out quite 
> well... so long as the other end initiates it, but that is not always true.
> 
> Any insight appreciated.
> 
> Thanks,
> 
> Lee.
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
> 

-- 
Derek Smithies Ph.D.                 Any fool can write code that 
IndraNet Technologies Ltd.                a computer can understand.        
Email: derek at indranet.co.nz         Good programmers write code 
ph +64 3 365 6485                          that humans can understand.
Web: http://www.indranet-technologies.com/            Martin Fowler




More information about the asterisk-dev mailing list