[asterisk-dev] IAX internet draft (draft-guy-iax-00)
Derek Smithies
derek at indranet.co.nz
Mon Mar 6 13:01:51 MST 2006
Hi,
> > Consequently, there are times when the timestamp (on the sending
> > side)
> > has to be "tweaked" high by 3, to differentiate between two
> > different
> > frames. A lagrq frame does not increase the oseqno at the sending
> > side.
>
> I don't see why you say that. I think the +3 stuff is a work around
> for a
> specific implementation problem, not a protocol requirement.
> The combination of oseqno with ack'ness makes a packet unique.
>
I am sorry - I do remember reading something about this +3 business was a
jiter buffer saviour. From the code:
/* On a dataframe, use last value + 3 (to accomodate jitter buffer
shrinking) if appropriate unless it's a genuine frame */
if (genuine) {
/* genuine (IAX LAGRQ etc) must keep their clock-based stamps */
if (ms <= p->lastsent)
ms = p->lastsent + 3;
} else if (abs(ms - p->lastsent) <= MAX_TIMESTAMP_SKEW) {
/* non-genuine frames (!?) (DTMF, CONTROL) should be pulled into
the predicted stream stamps */
ms = p->lastsent + 3;
}
=====================
> > A timestamp MUST also be assigned for the
> > call, beginning at 0 and incrementing each millisecond
> > is unclear.
> > Incrementing by what value??
> >
> > In fact::
> > The timestamp has units of milliseconds.
> > Thus, the maximum timestamp in a 16bit field is 65.535 seconds.
>
> No, timestamp is either a 32 bit field (fullframe) or a 15 bit field
> (miniframes).
>
> If you wrap a 32 bit counter in a single call, you have other
> problems.......
>
No, you misunderstand me completetly. completely.
The maximum timestamp value you can squeeze into a 16 bit field, such as
in a mini frame, 65.535 ms. From iax2 packet dumps, immediately prior
to this value wrapping around when this value wraps, one full frame
of voice is sent.
I was not talking about the 32 bit value wrapping around.
I was talking about the 16 bit value wrappng around.
Derek.
--
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