Index: chan_iax2.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v retrieving revision 1.278 diff -u -r1.278 chan_iax2.c --- chan_iax2.c 4 May 2005 04:49:32 -0000 1.278 +++ chan_iax2.c 9 May 2005 20:36:35 -0000 @@ -369,7 +369,7 @@ #define DEFAULT_TRUNKDATA 640 * 10 /* 40ms, uncompressed linear * 10 channels */ #define MAX_TRUNKDATA 640 * 200 /* 40ms, uncompressed linear * 200 channels */ -#define MAX_TIMESTAMP_SKEW 640 +#define MAX_TIMESTAMP_SKEW 160 /* maximum difference between actual and predicted ts for sending */ /* If consecutive voice frame timestamps jump by more than this many milliseconds, then jitter buffer will resync */ #define TS_GAP_FOR_JB_RESYNC 5000 @@ -3466,6 +3466,11 @@ * next multiple of frame size (so our * silent periods are multiples of * frame size too) */ + + if (abs(ms - p->nextpred) > MAX_TIMESTAMP_SKEW) + ast_log(LOG_DEBUG,"predicted timestamp skew (%u) > max (%u), using real ts instead.", + abs(ms - p->nextpred), MAX_TIMESTAMP_SKEW); + if (f->samples >= 8) /* check to make sure we dont core dump */ { int diff = ms % (f->samples / 8);