RTCP XR not updated

HA
Henoc Agbota
Fri, Jul 29, 2016 10:37 AM

Hi

Just want to report that in pjsip 2.4.5 even when enabled, the RTCP
XR reports are not sent. The function check_tx_rtcp() in pjmedia/stream.c
which is used to transmit periodic RTCP SR/RR reports could be used for
that purpose but there appears to be a bug preventing that. Basically, the
"with_xr" flag is never set. The issue is fixed by replacing

#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
if (stream->rtcp.xr_enabled) {
if (stream->rtcp_xr_last_tx == 0) {
stream->rtcp_xr_last_tx = timestamp;
} else if (timestamp - stream->rtcp_xr_last_tx

= stream->rtcp_xr_interval)

{
with_xr = PJ_TRUE;

/* Update last tx RTCP XR */
stream->rtcp_xr_last_tx = timestamp;
}
}
#endif

by

#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
if (stream->rtcp.xr_enabled) {
if (stream->rtcp_xr_last_tx == 0) {
stream->rtcp_xr_last_tx = timestamp;
} else if (timestamp - stream->rtcp_xr_last_tx

= stream->rtcp_xr_interval)

{
/* Update last tx RTCP XR */
stream->rtcp_xr_last_tx = timestamp;
}

with_xr = PJ_TRUE;
}
#endif

Thanks,
Henoc

Henoc Agbota
SamKnows Limited
E-mail          henoc@samknows.com
Office          +44 (0) 20 3111 4336
Web            www.samknows.com

Hi Just want to report that in pjsip 2.4.5 even when enabled, the RTCP XR reports are not sent. The function check_tx_rtcp() in pjmedia/stream.c which is used to transmit periodic RTCP SR/RR reports could be used for that purpose but there appears to be a bug preventing that. Basically, the "with_xr" flag is never set. The issue is fixed by replacing #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) if (stream->rtcp.xr_enabled) { if (stream->rtcp_xr_last_tx == 0) { stream->rtcp_xr_last_tx = timestamp; } else if (timestamp - stream->rtcp_xr_last_tx >= stream->rtcp_xr_interval) { with_xr = PJ_TRUE; /* Update last tx RTCP XR */ stream->rtcp_xr_last_tx = timestamp; } } #endif by #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) if (stream->rtcp.xr_enabled) { if (stream->rtcp_xr_last_tx == 0) { stream->rtcp_xr_last_tx = timestamp; } else if (timestamp - stream->rtcp_xr_last_tx >= stream->rtcp_xr_interval) { /* Update last tx RTCP XR */ stream->rtcp_xr_last_tx = timestamp; } with_xr = PJ_TRUE; } #endif Thanks, Henoc -- Henoc Agbota SamKnows Limited E-mail henoc@samknows.com Office +44 (0) 20 3111 4336 Web www.samknows.com
M
Ming
Mon, Aug 1, 2016 2:39 AM

Hi Henoc,

Why is "with_xr" never set?
if (timestamp - stream->rtcp_xr_last_tx >= stream->rtcp_xr_interval),
which it eventually will, then it will be set (unless there's
something wrong with the timestamp, or rtcp_xr_interval is too big).
In those cases, it would be better to fix the problem itself
(timestamp/interval), instead of forcing to send RTCP XR everytime,
which is what you proposed.

Regards,
Ming

On Fri, Jul 29, 2016 at 6:37 PM, Henoc Agbota henoc@samknows.com wrote:

Hi

Just want to report that in pjsip 2.4.5 even when enabled, the RTCP XR
reports are not sent. The function check_tx_rtcp() in pjmedia/stream.c which
is used to transmit periodic RTCP SR/RR reports could be used for that
purpose but there appears to be a bug preventing that. Basically, the
"with_xr" flag is never set. The issue is fixed by replacing

#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
if (stream->rtcp.xr_enabled) {
if (stream->rtcp_xr_last_tx == 0) {
stream->rtcp_xr_last_tx = timestamp;
} else if (timestamp - stream->rtcp_xr_last_tx >=
stream->rtcp_xr_interval)
{
with_xr = PJ_TRUE;

/* Update last tx RTCP XR */
stream->rtcp_xr_last_tx = timestamp;
}
}
#endif

by

#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
if (stream->rtcp.xr_enabled) {
if (stream->rtcp_xr_last_tx == 0) {
stream->rtcp_xr_last_tx = timestamp;
} else if (timestamp - stream->rtcp_xr_last_tx >=
stream->rtcp_xr_interval)
{
/* Update last tx RTCP XR */
stream->rtcp_xr_last_tx = timestamp;
}

with_xr = PJ_TRUE;
}
#endif

Thanks,
Henoc

Henoc Agbota
SamKnows Limited
E-mail          henoc@samknows.com
Office          +44 (0) 20 3111 4336
Web            www.samknows.com


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Henoc, Why is "with_xr" never set? if (timestamp - stream->rtcp_xr_last_tx >= stream->rtcp_xr_interval), which it eventually will, then it will be set (unless there's something wrong with the timestamp, or rtcp_xr_interval is too big). In those cases, it would be better to fix the problem itself (timestamp/interval), instead of forcing to send RTCP XR everytime, which is what you proposed. Regards, Ming On Fri, Jul 29, 2016 at 6:37 PM, Henoc Agbota <henoc@samknows.com> wrote: > Hi > > Just want to report that in pjsip 2.4.5 even when enabled, the RTCP XR > reports are not sent. The function check_tx_rtcp() in pjmedia/stream.c which > is used to transmit periodic RTCP SR/RR reports could be used for that > purpose but there appears to be a bug preventing that. Basically, the > "with_xr" flag is never set. The issue is fixed by replacing > > #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) > if (stream->rtcp.xr_enabled) { > if (stream->rtcp_xr_last_tx == 0) { > stream->rtcp_xr_last_tx = timestamp; > } else if (timestamp - stream->rtcp_xr_last_tx >= > stream->rtcp_xr_interval) > { > with_xr = PJ_TRUE; > > /* Update last tx RTCP XR */ > stream->rtcp_xr_last_tx = timestamp; > } > } > #endif > > by > > #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) > if (stream->rtcp.xr_enabled) { > if (stream->rtcp_xr_last_tx == 0) { > stream->rtcp_xr_last_tx = timestamp; > } else if (timestamp - stream->rtcp_xr_last_tx >= > stream->rtcp_xr_interval) > { > /* Update last tx RTCP XR */ > stream->rtcp_xr_last_tx = timestamp; > } > > with_xr = PJ_TRUE; > } > #endif > > Thanks, > Henoc > -- > Henoc Agbota > SamKnows Limited > E-mail henoc@samknows.com > Office +44 (0) 20 3111 4336 > Web www.samknows.com > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
HA
Henoc Agbota
Mon, Aug 1, 2016 7:14 AM

Hi Ming
Thanks for looking into this. My issue was indeed more related to the
rtcp_xr_interval and can be resolved without any modification to the
library.
Best,
Henoc

On 1 Aug 2016 03:40, "Ming" ming@teluu.com wrote:

Hi Henoc,

Why is "with_xr" never set?
if (timestamp - stream->rtcp_xr_last_tx >= stream->rtcp_xr_interval),
which it eventually will, then it will be set (unless there's
something wrong with the timestamp, or rtcp_xr_interval is too big).
In those cases, it would be better to fix the problem itself
(timestamp/interval), instead of forcing to send RTCP XR everytime,
which is what you proposed.

Regards,
Ming

On Fri, Jul 29, 2016 at 6:37 PM, Henoc Agbota henoc@samknows.com wrote:

Hi

Just want to report that in pjsip 2.4.5 even when enabled, the RTCP XR
reports are not sent. The function check_tx_rtcp() in pjmedia/stream.c

which

is used to transmit periodic RTCP SR/RR reports could be used for that
purpose but there appears to be a bug preventing that. Basically, the
"with_xr" flag is never set. The issue is fixed by replacing

#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
if (stream->rtcp.xr_enabled) {
if (stream->rtcp_xr_last_tx == 0) {
stream->rtcp_xr_last_tx = timestamp;
} else if (timestamp - stream->rtcp_xr_last_tx >=
stream->rtcp_xr_interval)
{
with_xr = PJ_TRUE;

/* Update last tx RTCP XR */
stream->rtcp_xr_last_tx = timestamp;
}
}
#endif

by

#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
if (stream->rtcp.xr_enabled) {
if (stream->rtcp_xr_last_tx == 0) {
stream->rtcp_xr_last_tx = timestamp;
} else if (timestamp - stream->rtcp_xr_last_tx >=
stream->rtcp_xr_interval)
{
/* Update last tx RTCP XR */
stream->rtcp_xr_last_tx = timestamp;
}

with_xr = PJ_TRUE;
}
#endif

Thanks,
Henoc

Henoc Agbota
SamKnows Limited
E-mail          henoc@samknows.com
Office          +44 (0) 20 3111 4336
Web            www.samknows.com


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Ming Thanks for looking into this. My issue was indeed more related to the rtcp_xr_interval and can be resolved without any modification to the library. Best, Henoc On 1 Aug 2016 03:40, "Ming" <ming@teluu.com> wrote: > Hi Henoc, > > Why is "with_xr" never set? > if (timestamp - stream->rtcp_xr_last_tx >= stream->rtcp_xr_interval), > which it eventually will, then it will be set (unless there's > something wrong with the timestamp, or rtcp_xr_interval is too big). > In those cases, it would be better to fix the problem itself > (timestamp/interval), instead of forcing to send RTCP XR everytime, > which is what you proposed. > > Regards, > Ming > > On Fri, Jul 29, 2016 at 6:37 PM, Henoc Agbota <henoc@samknows.com> wrote: > > Hi > > > > Just want to report that in pjsip 2.4.5 even when enabled, the RTCP XR > > reports are not sent. The function check_tx_rtcp() in pjmedia/stream.c > which > > is used to transmit periodic RTCP SR/RR reports could be used for that > > purpose but there appears to be a bug preventing that. Basically, the > > "with_xr" flag is never set. The issue is fixed by replacing > > > > #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) > > if (stream->rtcp.xr_enabled) { > > if (stream->rtcp_xr_last_tx == 0) { > > stream->rtcp_xr_last_tx = timestamp; > > } else if (timestamp - stream->rtcp_xr_last_tx >= > > stream->rtcp_xr_interval) > > { > > with_xr = PJ_TRUE; > > > > /* Update last tx RTCP XR */ > > stream->rtcp_xr_last_tx = timestamp; > > } > > } > > #endif > > > > by > > > > #if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0) > > if (stream->rtcp.xr_enabled) { > > if (stream->rtcp_xr_last_tx == 0) { > > stream->rtcp_xr_last_tx = timestamp; > > } else if (timestamp - stream->rtcp_xr_last_tx >= > > stream->rtcp_xr_interval) > > { > > /* Update last tx RTCP XR */ > > stream->rtcp_xr_last_tx = timestamp; > > } > > > > with_xr = PJ_TRUE; > > } > > #endif > > > > Thanks, > > Henoc > > -- > > Henoc Agbota > > SamKnows Limited > > E-mail henoc@samknows.com > > Office +44 (0) 20 3111 4336 > > Web www.samknows.com > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >