[Asterisk-Dev] iax2 bridge optimization screwing with timestamps
Andrew Kohlsmith
akohlsmith-asterisk at benshaw.com
Fri Feb 11 21:11:10 MST 2005
On February 11, 2005 10:59 pm, Andrew Kohlsmith wrote:
> /* FIXME? SLD would rather remove this and leave it to the end system to
> deal with */
> if (fakets <= p2->lastsent)
> fakets = p2->lastsent + 1;
> p2->lastsent = fakets;
>
> Now this isn't intuitive to me -- What exactly is this code fragment trying
> to do, and why on earth would you send it as the lastpacket+1 when it's
> supposed to be 20ms (or more generally, a codec frametime) later?
I love replying to myself.
I'm wondering if this may be a bug caused by p2->lastsent not taking into
account whether the last sent packet was a "genuine" frame or not.
calc_timestamp() goes to great pains to figure out whether a frame needs a
clock-based or voiceframe-based timestamp but calc_fakestamp() does not do
this. If a genuine frame slipped in last and thus incorrectly set
p2->lastsent, I *think* it could cause this kind of nastiness.
Not being an IAX2 expert though I am posting here to see how good my aim
is. :-)
-A.
More information about the asterisk-dev
mailing list