[Freeswitch-dev] Help: how to disable dynamic RTP mapping?
Hi, 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 follows. I have added static rule into router -- map UDP ports 20000~25000 to FS box. And, in the FS_box, I added into file ./autoload_configs/switch.conf.xml <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. Thanks, Oleg 2011-04-22 18:14:45.590723 [DEBUG] switch_channel.c:2813 (sofia/internal/sip:1001@192.168.1.151:5060) Callstate Change RINGING -> ACTIVE . . . . 2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1116 Send signal sofia/internal/sip:1000@192.168.1.152:5060 [BREAK] 2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1288 Session 57 (sofia/internal/sip:1000@192.168.1.152:5060) Locked, Waiting on external entities <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@66.54.140.46] 192.168.1.5 port 20794 -> 204.11.192.22 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
run freeswitch -nonat On Fri, Apr 22, 2011 at 5:31 PM, Oleg Khovayko <khovayko@gmail.com> wrote:
Hi,
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 follows.
I have added static rule into router -- map UDP ports 20000~25000 to FS box. And, in the FS_box, I added into file ./autoload_configs/switch.conf.xml
<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.
Thanks,
Oleg
2011-04-22 18:14:45.590723 [DEBUG] switch_channel.c:2813 (sofia/internal/sip:1001@192.168.1.151:5060) Callstate Change RINGING -> ACTIVE
. . . . 2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1116 Send signal sofia/internal/sip:1000@192.168.1.152:5060 [BREAK] 2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1288 Session 57 (sofia/internal/sip:1000@192.168.1.152:5060) Locked, Waiting on external entities <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@66.54.140.46] 192.168.1.5 port 20794 -> 204.11.192.22 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
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Anthony Minessale wrote:
run freeswitch -nonat
Antony, Thank you very much, I run FreeSWITCH with this option, and really, 10s delay is gone. And, works almost everything, but one thing: I have IpKall forwarding number, which forwards calls to number@mysite.cx:5080. With the old NAT mode, it was work OK. In the -nonat mode, call comes in, I picked up handset - but heard only one-side voice: from fs_client to IPKALL PSTN caller. Voice from the caller to client does not traversing. When I set in the IpKall account forward to in.callcentric.com, and FS is registered as client on that CallCentric account - everything works OK, voice goes to both directions. This time, I keep this workaround. I noticed, when call establishing correctly, following debug-message presents in the log-file twice per call: switch_rtp.c:3082 Correct ip/port confirmed. With this problem call, I see this message only once. I assume, something wrong with RTP connection establishing. Please, suggest me, how can I fix this trouble, or idea, what to see myself. Log of one-side-call in there: http://olegh.ath.cx/fs_log-2010-04-24.txt Thanks, Oleg
Anthony Minessale wrote:
run freeswitch -nonat
Antony, I solved the problem, I removed default "auto" from internal/external profiles, and set up: <param name="ext-sip-ip" value="$${external_sip_ip}"/> <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> Everything according Wiki page: http://wiki.freeswitch.org/wiki/NAT_Traversal Just strange behavior: When I press F9 in the fs_cli, I see strange value for "Ext-RTP-IP" RTP-IP 192.168.1.5 Ext-RTP-IP stun:stun.freeswitch.org SIP-IP 192.168.1.5 Ext-SIP-IP 173.79.237.112 Line from vars.xml looks OK: <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/> I assume, Ext-RTP-IP must be 173.79.237.112 - as same as 173.79.237.112.
On Fri, Apr 22, 2011 at 5:31 PM, Oleg Khovayko<khovayko@gmail.com> wrote:
Hi,
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 follows.
I have added static rule into router -- map UDP ports 20000~25000 to FS box. And, in the FS_box, I added into file ./autoload_configs/switch.conf.xml
<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.
Thanks,
Oleg
2011-04-22 18:14:45.590723 [DEBUG] switch_channel.c:2813 (sofia/internal/sip:1001@192.168.1.151:5060) Callstate Change RINGING -> ACTIVE
. . . . 2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1116 Send signal sofia/internal/sip:1000@192.168.1.152:5060 [BREAK] 2011-04-22 18:14:45.750984 [DEBUG] switch_core_session.c:1288 Session 57 (sofia/internal/sip:1000@192.168.1.152:5060) Locked, Waiting on external entities <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@66.54.140.46] 192.168.1.5 port 20794 -> 204.11.192.22 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
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (2)
-
Anthony Minessale
-
Oleg Khovayko