[Freeswitch-dev] Help: how to disable dynamic RTP mapping?

Oleg Khovayko khovayko at gmail.com
Sat Apr 23 02:31:45 MSD 2011


My FreeSWITCH machine is located behind the NAT-device.

When I receive incoming call, I see 10 secs delay between I picked up 
handset and voice connection establishing.
During these 10s, caller hears long beeps, as same as "ringing" signal.

I investigated problem, and found: after recipient pick up handset, 
FreeSWITCH tried dynamically map two UDP ports for RTP-connections.

I use Fios router from Verizon, and I assume, it slowly adding dynamic 
port mapping. It adds one RTP port per 5s.
So, when FS dynamically maps both ports, it loose 10 seconds (5+5). Log 

I have added static rule into router -- map UDP ports 20000~25000 to FS 
box. And, in the FS_box, I added into file 

<param name="rtp-start-port" value="20000"/>
<param name="rtp-end-port" value="25000"/>

But, anyway, FS tries dynamically assign ports for each income call, and 
lost 10s every time.

Please suggest, how to disable dynamic port mapping, and use static port 
range mapping (20000-25000) only?
I assume, this will increase speedup of my system.



2011-04-22 18:14:45.590723 [DEBUG] switch_channel.c:2813 
(sofia/internal/sip:1001 at Callstate Change RINGING -> 

. . . .
2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1116 Send 
signal sofia/internal/sip:1000 at [BREAK]
2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1288 Session 57 
(sofia/internal/sip:1000 at Locked, Waiting on external 
<5s delay>
2011-04-22 18:14:50.018621 [DEBUG] sofia_reg.c:1765 Changing expire time 
to 109 by request of proxy sip:callcentric.com
2011-04-22 18:14:50.209565 [DEBUG] switch_nat.c:502 mapped public port 
20794 protocol UDP to localport 20794
2011-04-22 18:14:50.341416 [DEBUG] sofia_reg.c:1765 Changing expire time 
to 104 by request of proxy sip:callcentric.com
<5s delay>
2011-04-22 18:14:55.213775 [DEBUG] switch_nat.c:502 mapped public port 
20795 protocol UDP to localport 20795
2011-04-22 18:14:55.213775 [DEBUG] sofia_glue.c:3001 AUDIO RTP 
[sofia/external/2404760839 at] port 20794 -> port 60140 codec: 0 ms: 20
2011-04-22 18:14:55.213775 [DEBUG] switch_rtp.c:1623 Starting timer 
[soft] 160 bytes per 20ms

More information about the FreeSWITCH-dev mailing list