Hi, In pjmedia/transport_udp.c, the transport_attach() and transport_detach() is used to attach and detach the transport. AFAIK, detach is merely removing the callbacks, but the actual UDP sockets are still active. So the UDP socket buffer still receives packets until it is full. Afterward packets are discard. So what happen when we attach again? Via ioqueue, we read packets in this UDP socket buffer, which are old ???? Imagine we attach 1 minute after detaching, we hear our friend's 1-minute-ago-voice !!!??? So how to clear this UDP socket buffer ? -- Khoa Pham HCMC University of Science www.fantageek.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20131003/7f9d0016/attachment-0001.html>