? chan_iax2.iax_fr_ts.patch Index: channels/chan_iax2.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v retrieving revision 1.269 diff -u -a -r1.269 chan_iax2.c --- channels/chan_iax2.c 6 Apr 2005 21:12:32 -0000 1.269 +++ channels/chan_iax2.c 7 Apr 2005 13:45:01 -0000 @@ -6517,8 +6517,17 @@ /* Handle the IAX pseudo frame itself */ if (option_debug) ast_log(LOG_DEBUG, "IAX subclass %d received\n", f.subclass); - /* Go through the motions of delivering the packet without actually doing so */ - schedule_delivery(&fr, 0, updatehistory, 0); + + /* Update last ts unless the frame's timestamp originated with us. */ + if (iaxs[fr.callno]->last < fr.ts && + f.subclass != IAX_COMMAND_ACK && + f.subclass != IAX_COMMAND_PONG && + f.subclass != IAX_COMMAND_LAGRP) { + iaxs[fr.callno]->last = fr.ts; + if (option_debug) + ast_log(LOG_DEBUG, "For call=%d, set last=%d\n", fr.callno, fr.ts); + } + switch(f.subclass) { case IAX_COMMAND_ACK: /* Do nothing */