[pjsip] Bug. RTP seq number is reset after hold/resume.

Nikolay Popok nikolay.popok at gmail.com
Tue Nov 3 08:52:09 CST 2009


Hi guys. I used search, but didnt find anything about this.
I'm using pjproject 1.4.5. Looks like after remote side makes hold/resume,
local sequence number for rtp packets is reset. I've investigated the
problem a little bit.
In pjsua_media.c :

static void stop_media_session(pjsua_call_id call_id)
{
 ...

    if (pjmedia_session_get_stream_stat(call->session, 0, &stat)
        == PJ_SUCCESS)
    {
        /* Save RTP timestamp & sequence, so when media session is
         * restarted, those values will be restored as the initial
         * RTP timestamp & sequence of the new media session. So in
         * the same call session, RTP timestamp and sequence are
         * guaranteed to be contigue.
         */
        call->rtp_tx_seq_ts_set = 1 | (1 << 1);
        call->rtp_tx_seq = stat.rtp_tx_last_seq;
        call->rtp_tx_ts = stat.rtp_tx_last_ts;
    }


If remote side makes hold, this code is called twice. First time everyting
is ok, but second time stat.rtp_tx_last_seq == 0. So after resume next
sequence of rtp packet will be 0 too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091103/2a0dc0b6/attachment.html>


More information about the pjsip mailing list