[Asterisk-Users] How to set the jitter buffer

Chris Orme chris at talisa.net
Sun Apr 11 12:41:15 MST 2004


Hi!

I just upgraded to the latest CVS and congratulations to me, I seem to
have also inherited the approx 500ms echo but on my snom200 that you
talked about with your ciscos.  Wow it is quite annoying when you're
speaking isn't it.  I got it when calling a POTS line, not internally.

Has anyone opened a new bug report about this ?  Might be an idea ?

Backing out rtp.c as suggested below wouldn't compile for me (it
didn't like the nested comments or somethings up with my typing) so my
altered rtp.c looks like I've shown below and then the echo goes away and
all is back to normal as far as I can tell.

Sorry it's mot a unified diff.  My diff seems to have gone on holiday and
isn't producing output today for some reason.

Thanks for the suggestion Andres / Brian.

Hope this helps someone - Chris


         }
                /* Re-calculate last TS */
                rtp->lastts = rtp->lastts + ms * 8;
/*              if (!f->delivery.tv_sec && !f->delivery.tv_usec) {
                        // If this isn't an absolute delivery time, Check
if it is close to our prediction,
                           and if so, go with our prediction
                        if (abs(rtp->lastts - pred) < 640)
                                rtp->lastts = pred;
                        else
                                ast_log(LOG_DEBUG, "Difference is %d, ms
is %d\n
", abs(rtp->lastts - pred), ms);
                } */
        } else {



On Sun, 11 Apr 2004, Brian Cuthie wrote:

> 
> So I've read the bug report and, I must admit, I'm totally unclear on why
> one would want to pass timestamps end-to-end through a system that was doing
> media conversions.
> 
> My experience, in case it helps, is that the recent CVS builds (4/9) don't
> work well at all with my SIP phone, while backing out the RTP.c mods results
> in a huge improvements. I'm using a 7960 and an IAX2 connection through
> VoicePulse.
> 
> -brian 
> 
> > -----Original Message-----
> > From: asterisk-users-admin at lists.digium.com 
> > [mailto:asterisk-users-admin at lists.digium.com] On Behalf Of Andres
> > Sent: Sunday, April 11, 2004 12:55 PM
> > To: asterisk-users at lists.digium.com
> > Subject: Re: [Asterisk-Users] How to set the jitter buffer
> > 
> > Rich Adamson wrote:
> > 
> > >Andres,
> > >
> > >Thanks, I applied the changes and simply dialed the * demo 
> > site. Seems 
> > >to have totally corrected the problem, although hitting that site is 
> > >probably not all that great of a test.
> > >
> > >Is this something that will changed in cvs / stable?
> > >
> > >  
> > >
> > This is the way it was **before** :)
> > 
> > We suggested to Mark that he should leave it like this 
> > instead of trying to "carry over" the Timestamp which is way 
> > more complicated.  So far I don't think he liked our 
> > suggestion.  Maybe if enough people complain he will revert 
> > to the old way.  Look at this bug for our discussion on the
> > subject:
> > http://bugs.digium.com/bug_view_page.php?bug_id=0001260
> > 
> > 
> > >What's the change actually doing (I'm not good at reading C code)?
> > >
> > >Rich
> > >
> > >
> > >  
> > >
> > >>>. As a result, both
> > >>>ends of the c7960 -> iax connection hear choppy audio and 
> > audio drop outs.
> > >>>I'm trying to use ethereal decodes to identify the issue, 
> > however its 
> > >>>rather tough to correlate the audio problems to exact 
> > packets within 
> > >>>a trace of thousands of packets. (My hearing verses finger 
> > response 
> > >>>time is not as quick as packet sniffers.)
> > >>>
> > >>> 
> > >>>
> > >>>      
> > >>>
> > >>Rich,
> > >>
> > >>If you are still testing out the Cisco phones give the 
> > following rtp.c 
> > >>modification a try.   It basically has the "Timestamp" 
> > carryover stuff 
> > >>commented out.  Asterisk thus generates evenly spaced out 
> > timestamps.  
> > >>(also note the 2560 change).  My hunch is this will fix your Cisco 
> > >>issues.  Let me know please.
> > >>
> > >>Andres
> > >>
> > >>
> > >>                /* Re-calculate last TS */
> > >>                rtp->lastts = rtp->lastts + ms * 8;
> > >>  /*              if (!f->delivery.tv_sec && 
> > !f->delivery.tv_usec) { */
> > >>                        /* If this isn't an absolute delivery time, 
> > >>Check if it is close to our prediction,
> > >>                           and if so, go with our prediction */
> > >>                        if (abs(rtp->lastts - pred) < 2560)
> > >>                                rtp->lastts = pred;
> > >>                        else
> > >>                                ast_log(LOG_DEBUG, 
> > "Difference is %d, 
> > >>ms is %d\n", abs(rtp->lastts - pred), ms);
> > >>/*                }*/
> > >>
> > >>    
> > >>
> > >>>Rich
> > >>>
> > >>>
> > >>>_______________________________________________
> > >>>Asterisk-Users mailing list
> > >>>Asterisk-Users at lists.digium.com
> > >>>http://lists.digium.com/mailman/listinfo/asterisk-users
> > >>>To UNSUBSCRIBE or update options visit:
> > >>>  http://lists.digium.com/mailman/listinfo/asterisk-users
> > >>>
> > >>> 
> > >>>
> > >>>      
> > >>>
> > >>_______________________________________________
> > >>Asterisk-Users mailing list
> > >>Asterisk-Users at lists.digium.com
> > >>http://lists.digium.com/mailman/listinfo/asterisk-users
> > >>To UNSUBSCRIBE or update options visit:
> > >>   http://lists.digium.com/mailman/listinfo/asterisk-users
> > >>    
> > >>
> > >
> > >---------------End of Original Message-----------------
> > >
> > >
> > >_______________________________________________
> > >Asterisk-Users mailing list
> > >Asterisk-Users at lists.digium.com
> > >http://lists.digium.com/mailman/listinfo/asterisk-users
> > >To UNSUBSCRIBE or update options visit:
> > >   http://lists.digium.com/mailman/listinfo/asterisk-users
> > >
> > >  
> > >
> > 
> > 
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-users
> > 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 




More information about the asterisk-users mailing list