[Freeswitch-users] Call is interrupted in 30 seconds, configuring NAT on Amazon EC2
Oleg Stolyar
olegstolyar at gmail.com
Fri Apr 8 18:19:09 MSD 2016
Try disabling session timers in the sip profile. I think that line is
commented out by default, so uncomment it.
<param name="enable-timer" value="false"/>
On Fri, Apr 8, 2016 at 6:59 AM, Стас Тельнов <stasan89 at gmail.com> wrote:
> Hello.
>
> When using a call or conference through sip — freeswitch with external
> provider there is a problem – the call is interrupted in 30 seconds. Though
> the sound goes all right.
> I think that it caused by the NAT settings for freeswitch, but I don't
> understand how to adjust it correctly.
> At start of freeswitch I see the following mistakes in the tracking data:
> 2016-04-08 07:04:50.903529 [INFO] switch_nat.c:417 Scanning for NAT
> 2016-04-08 07:04:50.903678 [DEBUG] switch_nat.c:170 Checking for PMP 1/5
> 2016-04-08 07:04:51.903843 [DEBUG] switch_nat.c:170 Checking for PMP 2/5
> 2016-04-08 07:04:52.904023 [DEBUG] switch_nat.c:170 Checking for PMP 3/5
> 2016-04-08 07:04:53.904185 [DEBUG] switch_nat.c:170 Checking for PMP 4/5
> 2016-04-08 07:04:54.904360 [DEBUG] switch_nat.c:170 Checking for PMP 5/5
> 2016-04-08 07:04:55.904495 [ERR] switch_nat.c:199 Error checking for PMP
> [general error]
> 2016-04-08 07:04:55.904548 [DEBUG] switch_nat.c:422 Checking for UPnP
> 2016-04-08 07:05:07.905219 [INFO] switch_nat.c:438 No PMP or UPnP NAT
> devices detected!
>
> Despite of this mistake, conference communication between two internal
> users works normally. The problem arises at a call through external
> provider.
>
> We have the following architecture:
> In a cloud of Amazon EC2 there are 2 servers – opensips and freeswitch,
> both for NAT for external clients, but have an opportunity to work with
> each other directly.
> opensips has the internal address 172.31.0.169 and external 52. *.*.177
> freeswitch has the internal address 172.31.22.124 and external 52. *.*.198
>
> In fact, freeswitch acts only for conferences, and is ready for use of a
> remote DB on opensips.
> The auto-nat settings by default didn't work. The problem is in the
> external profile settings as far as I understand.
>
> I have filled and created the following configuration:
> vars.xml
> <X-PRE-PROCESS cmd="set" data="bind_server_ip=auto”/>
> <X-PRE-PROCESS cmd="set" data="external_rtp_ip=52.*.*.198”/> <!— public
> freeswitch ip —>
> <X-PRE-PROCESS cmd="set" data="external_sip_ip=52.*.*.198”/> <!— public
> freeswitch ip —>
> <!-- External SIP Profile -->
> <X-PRE-PROCESS cmd="set" data="external_auth_calls=true"/>
> <X-PRE-PROCESS cmd="set" data="external_sip_port=5060"/>
> <X-PRE-PROCESS cmd="set" data="external_tls_port=5061"/>
> <X-PRE-PROCESS cmd="set" data="external_ssl_enable=true"/>
> <X-PRE-PROCESS cmd="set" data="external_ssl_dir=$${base_dir}/conf/tls"/>
>
> sip_profile/external.xml
> <param name="rtp-ip" value="$${local_ip_v4}"/>
> <param name="sip-ip" value="$${local_ip_v4}"/>
>
> <param name="ext-rtp-ip" value=“52.*.*.198”/> <!— public freeswitch ip
> —>
> <param name="ext-sip-ip" value=“52.*.*.198”/> <!— public freeswitch ip
> —>
> In this sip_profile/external.xml I tried to fill rtp-ip/sip-ip and
> ext-rtp-ip/ext-sip-ip with the corresponding addresses of opensips server
> (that would be logical), but in that case conferences didn't work at all
> and errors below appeared:
> [ERR] sofia.c:2935 Error Creating SIP UA for profile: external ...
> Also I tried to put such configuration:
> <param name="rtp-ip" value="auto"/>
> <param name="sip-ip" value="52.*.*.198”/>
> but it also hasn't helped to solve the problem.
>
> autoload_configs/switch.conf.xml
> <param name="rtp-start-port" value="16384"/>
> <param name="rtp-end-port" value="32768"/>
>
> "sofia status" looks as follows:
> Name Type
> Data State
>
> =================================================================================================
> 172.31.22.124 alias
> internal ALIASED
> external profile sip:mod_sofia at 52.*.*.198:5060
> RUNNING (0)
> external profile sip:mod_sofia at 52.*.*.198:5061
> RUNNING (0) (TLS)
> external::*********.com gateway sip:USER@*********.com
> REGED
> internal profile sip:mod_sofia at 52.*.*.198:5080
> RUNNING (0)
> internal profile sip:mod_sofia at 52.*.*.198:5081
> RUNNING (0) (TLS)
>
> =================================================================================================
> 2 profiles 1 alias
>
> "sofia status profile external" looks as follows:
>
> =================================================================================================
> Name external
> Domain Name N/A
> Auto-NAT false
> DBName sofia_reg_external
> Pres Hosts
> Dialplan XML
> Context public
> Challenge Realm auto_to
> RTP-IP 172.31.22.124
> Ext-RTP-IP 52.*.*.198
> SIP-IP 172.31.22.124
> Ext-SIP-IP 52.*.*.198
> URL sip:mod_sofia at 52.*.*.198:5060
> BIND-URL sip:mod_sofia at 52.
> *.*.198:5060;maddr=172.31.22.124;transport=udp,tcp
> TLS-URL sip:mod_sofia at 52.*.*.198:5061
> TLS-BIND-URL sips:mod_sofia at 52.
> *.*.198:5061;maddr=172.31.22.124;transport=tls
> HOLD-MUSIC local_stream://moh
> OUTBOUND-PROXY N/A
> CODECS IN PCMA
> CODECS OUT PCMA
> TEL-EVENT 101
> DTMF-MODE rfc2833
> CNG 13
> SESSION-TO 0
> MAX-DIALOG 0
> NOMEDIA false
> LATE-NEG true
> PROXY-MEDIA false
> ZRTP-PASSTHRU true
> AGGRESSIVENAT false
> CALLS-IN 0
> FAILED-CALLS-IN 0
> CALLS-OUT 0
> FAILED-CALLS-OUT 0
> REGISTRATIONS 0
>
>
>
> What do I adjust wrong? Whether there is some opportunity, to tell
> freeswitch not to break off a call in 30 seconds even if NAT isn't adjusted?
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160408/cec3c3c8/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list