0

S50: Activating NAT for SIP brakes connection to ISP

Hi,

We got our S50 all working for local clients (Linkus Desktop). But as soon we tried to enable remote clients, we got into trouble:

The PBX is behind a NAT, but all necessary ports are forwarded: 8088,8111,5060,10000-12000 all with the fitting protocols.

The first attempt was not successful, because without special configuration the SIP packages contain private IP-addresses (192.168...) in their contact field.

So we activated the NAT support (Settings->General->SIP->NAT), and set it to "External IP Address". This helped the Linkus Clients, they now got the external IP advertised and were able to send audio throug the forwarded ports.

BUT....: We could not connect to the SIP trunk at the ISP anymore: All routes were the same, but the asterisk was outputting an error every few seconds:

[2021-10-19 17:23:58] WARNING[23743]: res_pjsip_outbound_registration.c:889 schedule_retry: No response received from 'sip:<OUR_ISP>:5060;transport=udp' on registration attempt to 'sip:<OUR_PHONE_NUMBER>@<OUR_ISP>:5060', retrying in '5'

Via SSH I could monitor the network with tcpdump I could see SIP  packages(SIP/2.0 200 OK) arriving IN THE PBX from the ISP's IP... still the asterisk was telling me 'No response received'.

In a forum I read something about a bug in asterisk 13, which seems to be fixed in asterisk 14... but this was about loosing the connection to the ISP's Trunk... we don't get a connection in the first place... at least I think, see below.

I can's find any explanation, why the asterisk won't accept the response packages from the ISP.

IPPBX*CLI> pjsip show transports

Transport: <TransportId........> <Type> <cos> <tos> <BindAddress....................>
Transport: transport-tcp-nat tcp 3 96 0.0.0.0:5060
Transport: transport-udp-nat udp 3 96 0.0.0.0:5060
After passing the NAT of our router, the UDP packages are addressed to the local IP of the PBX... maybe the asterisk is looking for packages addressed to the external IP?

Right after rebooting the trunk is shown as 'unregistered' :
IPPBX*CLI> pjsip show registrations

<Registration/ServerURI..............................> <Auth..........> <Status.......>
trunk-<OUR_TRUNK>-registeration/sip:<OUR_ISP> trunk-<OUR_TRUNK>-auth Unregistered
 

The file pjsip.conf contains:

[transport-udp-nat]
type=transport
protocol=udp
bind=0.0.0.0:5060
tos=96
cos=3
external_media_address=<OUR_EXTERNAL_IP>
external_signaling_address=<OUR_EXTERNAL_IP>
external_signaling_port=5060
local_net=192.168.79.2/255.255.255.0

[transport-tcp-nat]
type=transport
protocol=tcp
bind=0.0.0.0:5060
tos=96
cos=3
external_media_address=<OUR_EXTERNAL_IP>
external_signaling_address=<OUR_EXTERNAL_IP>
external_signaling_port=5060
local_net=192.168.79.2/255.255.255.0

[pjsip_global]
type=global
oemid=0
oem_support_contacts=yes
default_from_user=unknown
endpoint_identifier_order=username,ip,contactip,anonymous
identify_update_timer=30
user_agent=Yeastar S50-65.15.0.18
maxptime=0
p_early_media=no
notify_callerid=no
debug=no
csta_enable=no
csta_host=192.168.79.2:5060
csta_support_model=



2 comments

Please sign in to leave a comment.