Index: pjproject/trunk/pjmedia/include/pjmedia/config.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 393)
+++ pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 394)
@@ -76,4 +76,47 @@
 
 
+/**
+ * Maximum frame duration (in msec) to be supported.
+ */
+#ifndef PJMEDIA_MAX_FRAME_DURATION_MS   
+#   define PJMEDIA_MAX_FRAME_DURATION_MS   	200
+#endif
+
+
+/**
+ * Max packet size to support.
+ */
+#ifndef PJMEDIA_MAX_MTU			
+#  define PJMEDIA_MAX_MTU			1500
+#endif
+
+
+/**
+ * DTMF/telephone-event duration, in timestamp.
+ */
+#ifndef PJMEDIA_DTMF_DURATION		
+#  define PJMEDIA_DTMF_DURATION			1600	/* in timestamp */
+#endif
+
+
+/**
+ * Number of packets received from different source IP address from the
+ * remote address required to make the stream switch transmission
+ * to the source address.
+ */
+#ifndef PJMEDIA_RTP_NAT_PROBATION_CNT	
+#  define PJMEDIA_RTP_NAT_PROBATION_CNT		10
+#endif
+
+
+/**
+ * Interval to send RTCP packets, in msec
+ */
+#ifndef PJMEDIA_RTCP_INTERVAL
+#	define PJMEDIA_RTCP_INTERVAL		5000	/* msec*/
+#endif
+
+
 #endif	/* __PJMEDIA_CONFIG_H__ */
 
+
Index: pjproject/trunk/pjmedia/src/pjmedia/rtcp.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/rtcp.c	(revision 393)
+++ pjproject/trunk/pjmedia/src/pjmedia/rtcp.c	(revision 394)
@@ -340,7 +340,9 @@
 	    } else {
 		PJ_LOG(3, (THIS_FILE, "Internal NTP clock skew detected: "
-				       "lsr=%p, now=%p, dlsr=%p (%d:%03dms)",
+				       "lsr=%p, now=%p, dlsr=%p (%d:%03dms), "
+				       "diff=%d",
 				       lsr, now, dlsr, dlsr/65536,
-				       (dlsr%65536)*1000/65536));
+				       (dlsr%65536)*1000/65536,
+				       dlsr-(now-lsr)));
 	    }
 	}
Index: pjproject/trunk/pjmedia/src/pjmedia/stream.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/stream.c	(revision 393)
+++ pjproject/trunk/pjmedia/src/pjmedia/stream.c	(revision 394)
@@ -39,11 +39,4 @@
 #define TRACE_(expr)			stream_perror expr
 #define TRC_(expr)			PJ_LOG(4,expr)
-#define PJMEDIA_MAX_FRAME_DURATION_MS   200
-#define PJMEDIA_MAX_BUFFER_SIZE_MS	2000
-#define PJMEDIA_MAX_MTU			1500
-#define PJMEDIA_DTMF_DURATION		1600	/* in timestamp */
-#define PJMEDIA_RTP_NAT_PROBATION_CNT	10
-#define PJMEDIA_RTCP_INTERVAL		5	/* seconds	*/
-
 
 /**
@@ -342,11 +335,15 @@
     /* Check if this is the time to transmit RTCP packet */
     if (stream->rtcp_tx_time == 0) {
+	unsigned first_interval;
+
+	first_interval = PJMEDIA_RTCP_INTERVAL + (pj_rand() % 2000);
 	stream->rtcp_tx_time = pj_ntohl(channel->rtp.out_hdr.ts) +
-			       PJMEDIA_RTCP_INTERVAL * 
-			       stream->port.info.sample_rate;
+			       first_interval* stream->port.info.sample_rate /
+			       1000;
     } else if (pj_ntohl(channel->rtp.out_hdr.ts) >= stream->rtcp_tx_time) {
 	
 	pjmedia_rtcp_pkt *rtcp_pkt;
 	pj_ssize_t size;
+	unsigned interval;
 	int len;
 
@@ -356,11 +353,18 @@
 				&stream->rem_rtcp_addr, 
 				sizeof(stream->rem_rtcp_addr));
+#if 0
 	if (status != PJ_SUCCESS) {
-	    ;
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(THIS_FILE, "Error sending RTCP: %s [%d]",
+				 errmsg, status));
 	}
-	
+#endif
+
+	interval = PJMEDIA_RTCP_INTERVAL + (pj_rand() % 500);
 	stream->rtcp_tx_time = pj_ntohl(channel->rtp.out_hdr.ts) +
-			       PJMEDIA_RTCP_INTERVAL * 
-			       stream->port.info.sample_rate;
+			       interval * stream->port.info.sample_rate /
+			       1000;
     }
 
Index: pjproject/trunk/pjsip-apps/src/samples/siprtp.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 393)
+++ pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 394)
@@ -991,5 +991,5 @@
 static int media_thread(void *arg)
 {
-    enum { RTCP_INTERVAL = 5 };
+    enum { RTCP_INTERVAL = 5000, RTCP_RAND = 2000 };
     struct media_stream *strm = arg;
     char packet[1500];
@@ -1004,5 +1004,5 @@
 
     next_rtcp = next_rtp;
-    next_rtcp.u64 += (freq.u64 * RTCP_INTERVAL);
+    next_rtcp.u64 += (freq.u64 * (RTCP_INTERVAL+(pj_rand()%RTCP_RAND)) / 1000);
 
 
@@ -1166,5 +1166,6 @@
 	    
 	    /* Schedule next send */
-	    next_rtcp.u64 += (freq.u64 * RTCP_INTERVAL);
+    	    next_rtcp.u64 += (freq.u64 * (RTCP_INTERVAL+(pj_rand()%RTCP_RAND)) /
+			      1000);
 	}
     }
