@@ -2309,6 +2309,7 @@ len = ast_codec_get_samples(&fr->af) / 8; } else if(fr->af.frametype == AST_FRAME_CNG) { type = JB_TYPE_SILENCE; + ast_log(LOG_WARNING,"found a CNG frame\n"); } if ( (!ast_test_flag(iaxs[fr->callno], IAX_USEJITTERBUF)) ) { @@ -3392,6 +3393,7 @@ genuine = 1; } else if (f->frametype == AST_FRAME_CNG) { p->notsilenttx = 0; + ast_log(LOG_WARNING,"found a CNG frame\n"); } } if (!p->offset.tv_sec && !p->offset.tv_usec) { @@ -3436,6 +3438,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); @@ -4486,6 +4493,10 @@ if (iaxs[callno]) { /* If there's an outstanding error, return failure now */ if (!iaxs[callno]->error) { + if(f->frametype == AST_FRAME_CNG) { + ast_log(LOG_WARNING,"found CNG frame\n"); + } + if (ast_test_flag(iaxs[callno], IAX_ALREADYGONE)) res = 0; /* Don't waste bandwidth sending null frames */