linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] oRTP pb during SIP refresh


From: Frédérik Rouleau
Subject: [Linphone-developers] oRTP pb during SIP refresh
Date: Tue, 12 Jan 2010 16:03:21 +0100

Hello all,

I am using oRTP and a SIP gateway which support SIP REFRESH (RFC 4028). So at a fixed interval (600 s) I receive a SIP UPDATE but the gateway also reinit the SSRC et seq number of the RTP flow.
The problem is that oRTP waits 1 second before it sends SSRC_CHANGED message and during that ime I am loosing RTP paquets. Looking into the code shows that there is a constant SSRC_CHANGED_THRESHOLD set at 50 setting this delay.

Reducing the threshold might have some side effects but can we add a kind of SSRC_change_pending state which set the flag RTP_SESSION_RECV_SYNC on the first SSRC change paquet. for example the rtp_parse code will look like:

            if (session->inc_same_ssrc_count>SSRC_CHANGED_THRESHOLD){

                /* store the sender rtp address to do symmetric RTP */
                if (!session->use_connect){
                    if (session->rtp.socket>0 && session->symmetric_rtp){
                        /* store the sender rtp address to do symmetric RTP */
                        memcpy(&session->rtp.rem_addr,addr,addrlen);
                        session->rtp.rem_addrlen=addrlen;
                    }
                }
                session->rtp.rcv_last_ts = rtp->timestamp;
                session->rcv.ssrc=rtp->ssrc;
                rtp_signal_table_emit(&session->on_ssrc_changed);
            }else if (session->ssrc_change_pending){
                session->ssrc_change_pending=FALSE;
                rtp_session_set_flag(session, RTP_SESSION_RECV_SYNC);
            }else{
                /*discard the packet*/
                ortp_debug("Receiving packet with unknown ssrc.");
                stats->bad++;
                ortp_global_stats.bad++;
                freemsg(mp);
                return;
            }

What do you think about it ? If you agree I can make changes and propose a patch.

Regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]