[asterisk-bugs] [Asterisk 0015807]: rtt should be stored as double in struct ast_rtp_instance_stats

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Sep 2 04:58:05 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15807 
====================================================================== 
Reported By:                klaus3000
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   15807
Category:                   Core/RTP
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 214938 
Request Review:              
====================================================================== 
Date Submitted:             2009-09-01 09:36 CDT
Last Modified:              2009-09-02 04:58 CDT
====================================================================== 
Summary:                    rtt should be stored as double in struct
ast_rtp_instance_stats
Description: 
Hi!

AFAIS member "rtt" in struct ast_rtp_instance_stats stored the RTT in
seconds, using an usigned int. 

As RTTs usually are below 0.5 (at least on earth and for VoIP useable
links) this member is useless as it is always 0.

Shouldn't that be changed to double?
====================================================================== 

---------------------------------------------------------------------- 
 (0110009) klaus3000 (reporter) - 2009-09-02 04:58
 https://issues.asterisk.org/view.php?id=15807#c110009 
---------------------------------------------------------------------- 
Some more statistics issues:

1. in include/asterisk/rtp_engine.h, macro AST_RTP_STAT_SET:

#define AST_RTP_STAT_SET(current_stat, combined, placement, value) \
if (stat == current_stat || stat == AST_RTP_INSTANCE_STAT_ALL || (combined
>= 0 && combined == current_stat)) { \
placement = value; \
if (stat == current_stat) { \
return 0; \
} \
}

The last condition (combined >= 0 && combined == current_stat) IMO makes
no sense - I think this is a bug and should be:
  (combined >= 0 && combined == stat) 

2. in main/rtp_engine.c function ast_rtp_instance_get_quality:
In case AST_RTP_INSTANCE_STAT_FIELD_QUALITY, "stat" is set to
AST_RTP_INSTANCE_STAT_ALL, which means that ALL stats or copied from the
RTP engine to the "stats" strcuture, but only a few of them are actually
copied into the buffer. Why not make this really usefull and copy ALL stats
into the buffer? This would make it possible to retrieve ALL stats with
just a single query.

btw: I would be willing to write the patches ....







in include/asterisk/rtp_engine.h
 * Properties allow behavior of the RTP engine and RTP engine core to be
 * changed. For example, there is a property named AST_RTP_PROPERTY_NAT
which is
 * used to tell the RTP engine to enable symmetric RTP if it supports it.
It is
 * not required for an RTP engine to support all properties.
 * 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-09-02 04:58 klaus3000      Note Added: 0110009                          
======================================================================




More information about the asterisk-bugs mailing list