4

I want to turn off buffering of SIP calls in freeswitch pbx software.

Freeswitch holds RTP data from clients in buffer and sends it every 20ms.

I want to freeswitch pass throught packets without holding.

How to configure it?

----- EDIT (additional info) -----

I have two SIP clients and FreeSwitch PBX.

Voice 8 kHz sample rate, A-Law coding (8 bytes per sample, no compression)

When I call directly from one client to another the tcpdump output on one client is:

00:00:00.000475 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.031599 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.032012 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.000315 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.031775 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.000384 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.031499 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.031986 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.000475 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.031578 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.031936 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.000419 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172
00:00:00.031573 IP 10.64.177.34.5440 > 10.64.0.42.5082: UDP, length 172

But when I connect from one client to another using pbx as middle point I got:

00:00:00.020013 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.019969 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.020017 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.019984 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.020078 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.020016 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.019850 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.020045 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.020012 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.019974 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.020054 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.019996 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172
00:00:00.019972 IP 10.64.72.24.30230 > 10.64.0.42.5078: UDP, length 172

The average time in both cases is aproximate 20ms (slighter less in direct case), but non regular data portions seems better for client because there is no gaps in heard voice (in speaker or headphones). I suppose that regular period portions of data cause problems due to clock drift problem.

So I want to turn off this feature in FreeSwitch, so the data will come in original timestamps.

2

I found a solution to my question.

You need to add line

<X-PRE-PROCESS cmd="set" data="rtp_notimer_during_bridge=true"/>

in file

/etc/freeswitch/vars.xml

This causes FreeSwitch in bridged mode to preserve original packet intervals.

1

As Sip communication use udp to send the voice Data, there is a mandatory buffer needed to fill each frame, 20 ms is the usual amount of data hold by an udp packet in a sip communication.
You won't be able to bypass it but you might be able to reduce it by configuration

I don't use freepbx but Asterisk as a pbx so I don't know if it's a feature or just the computation delay. Maybe you should consider use the equivalent of direct_media feature found in asterisk so the sip negotiation is done through the pbx but the rtp payload is direct between peers.

1
  • See my edit and additional info in my question. – sibislaw Aug 10 '17 at 5:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.