Index: corelib/rtp.c
===================================================================
--- corelib/rtp.c	(.../trunk)	(revision 1510)
+++ corelib/rtp.c	(.../branches/egnarf/timestamps)	(working copy)
@@ -1643,6 +1643,7 @@
 	int mark = 0;
 
 	ms = calc_txstamp(rtp, &f->delivery);
+
 	/* Default prediction */
 	if (f->subclass < OPBX_FORMAT_MAX_AUDIO) {
 		pred = rtp->lastts + f->samples;
@@ -1683,6 +1684,13 @@
 	if (rtp->lastts > rtp->lastdigitts)
 		rtp->lastdigitts = rtp->lastts;
 
+#ifdef AST_JB
+	/* Take the timestamp from the openpbx frame if it has timing */
+	if (f->has_timing_info) {
+		rtp->lastts = f->ts * 8;
+	}
+#endif /* AST_JB */
+
 	/* Get a pointer to the header */
 	rtpheader = (unsigned char *)(f->data - hdrlen);
 
