[Freeswitch-users] How to inspect the jitterbuffer?

Holger Freyther holger at freyther.de
Sat Feb 11 02:31:33 MSK 2012


Anthony Minessale <anthony.minessale at ...> writes:


> You are pushing RTP up against TDM, RTP can start and stop, TDM
> cannot, When there is no RTP the TDM will carry on sending the
> IDLE_FLAG byte over the wire.
> 
> I made both the RTP stack and the TDM endpoint from scratch so you
> should assume I may have some insight.

What I am arguing with... is that if I say a word like 'two' and
RTP looks a bit like this.

RTP:
Wall Time   Seq.No   Time   'Sound'
0.0         1        0       'T'
20ms*     2        160       'W'
40ms*     3        320       'O'
...
some skew   100      100*160  'T'
+20ms       101      101*160  'W'
+20ms       102      102*160  'O'


and on the remote it arrives as:
'TW(?)O'..'T'..'O'

something is wrong with the playback speed/queue/buffer of the
audio stack. All I ask for is (because I didn't see anything
in the wiki about that):

1.) How do I check if the jitter buffer is enabled on a call.
2.) How do I check if arriving RTP packets arrived too late for
    the speed of the FreeTDM voice queue.


More details:
I started with a setup like this:

RTP/AMR -> FreeSWITCH (sangoma transcoder) -> FreeTDM..

For debugging I changed it to:

AMR -> FreeSWITCH -> RTP/PCMA -> FreeSWITCH -> FreeTDM.
       (SIP on 5060)             (SIP on 5062)

The idea was that the first FreeSWITCH has to deal with
the jitter and the second receives a clean linear in wall
clock time RTP stream. My sofia sip profile includes these
params:
    <param name="rtp-timer-name" value="soft"/>
    <param name="manual-rtp-bugs"
    value="SEND_LINEAR_TIMESTAMPS|NEVER_SEND_MARKER|\n
    IGNORE_DTMF_DURATION" />
    <param name="rtp-rewrite-timestamps" value="true"/>


The resulting output of the frontend FreeSWITCH is not
linear though (so no idea what rtp-timer-name soft should
do):
But the resulting stream has packets like this:
P.No  Wall Time       Codec
723 12.761045 G.711 PCMA, Seq=18533, Time=90720
731 12.841107 G.711 PCMA, Seq=18534, Time=90880

so somehow the expected arrival time was 17.78 but it
ended up being 12.84 and I think FreeSWITCH/FreeTDM/STFU
do not deal well with that.


any ideas?
  holger



* add a little jitter




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list