Index: res/res_rtp_multicast.c =================================================================== --- res/res_rtp_multicast.c (revision 341429) +++ res/res_rtp_multicast.c (working copy) @@ -228,10 +228,13 @@ /* Construct an RTP header for our packet */ rtpheader = (unsigned char *)(f->data.ptr - hdrlen); - put_unaligned_uint32(rtpheader, htonl((2 << 30) | (codec << 16) | (multicast->seqno++) | (0 << 23))); + put_unaligned_uint32(rtpheader, htonl((2 << 30) | (codec << 16) | (multicast->seqno) | (0 << 23))); put_unaligned_uint32(rtpheader + 4, htonl(f->ts * 8)); put_unaligned_uint32(rtpheader + 8, htonl(multicast->ssrc)); + /* Increment sequence number and reset to 0 if it would overflow allocated 8 bits in RTP packet */ + multicast->seqno = (multicast->seqno + 1) % 65535; + /* Finally send it out to the eager phones listening for us */ ast_rtp_instance_get_remote_address(instance, &remote_address); res = ast_sendto(multicast->socket, (void *) rtpheader, f->datalen + hdrlen, 0, &remote_address);