Hi, Thanks a lot, I was too focused on sequence numbers and timestamps... BR Georg From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx]
On Behalf Of JOHAN LANTZ Inside pjmedia_rtcp_stat that you already have you can find the pjmedia_rtcp_stream_stat struct for
rx. In that struct you can see how many packets you have received. If you do not receive any packets during N seconds, you can probably assume your rtp stream has been cut.
/Johan From: pjsip <pjsip-bounces@xxxxxxxxxxxxxxx> on behalf of Piewald Georg <gpi@xxxxxxxxxxxxxxxxxxxx> Hi, I need to implement a mechanism to shut down a SIP session, when no RTP packets are received for a given time. I found two email discussions about exactly this question: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2012-March/014274.html http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2016-August/019465.html To quote part of the answers: > Periodically calling pjmedia_session_get_stream_stat(...). As a response you > get a pjmedia_rtcp_stat struct from where you can get the last received RTP > sequence number. It sounds very reasonable to me (just that from pjsua I’d use pjsua_call_get_stream_stat instead, which would output the same structure). However, trying to implement it, I noticed that the returned structure pjmedia_rtcp_stat has
only a member about the last *transmitted* sequence number (rtp_tx_last_seq), but nothing about the last *received* sequence number. Did I overlook something? Where can I find the last received sequence number or timestamp? Thanks and BR, Georg
|
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org