Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Solution to the problem of NAT traversing in elastix

Shulou Source: shulou.com Published: 2022-06-01 09:44:58 10月02日 Update

Recently, I want to set up the elastix 2.5 server of the company's intranet so that it can also be used on the public network, so I made a NAT mapping directly on the router to map the server directly to the public network. It is found that it is very smooth to register with the public network address in the intranet. Of course, the private network to use the public network address to access the private network server, the premise is to do a good two-way NAT mapping, in fact, is to do a NAT in the private network interface, there are a lot of tutorials will not be discussed. When I went home to use it, I found that although the softphone terminal could successfully register to the server, I could not make a phone call, so Baidu found that some said it was the problem of UDP traversing NAT, and some directly said it was the problem of NAT traversing. Not only UDP,RTP,TCP would have similar problems, there were a lot of theories about solutions, and my head was getting bigger, which seemed to be an impossible task.

Before a pile of nonsense, in fact, later found to solve the problem is very simple, in elastix pbx to add SIP extension, there is a NAT option, the default is not enabled, NAT can be changed to "yes". The specific practices are as follows: (excerpts from the following methods on the Internet)

one. Modify the sip extension settings in paragraph [615] of sip_additional.conf

Nat=yes

Qualify=yes; it seems that this item is not necessary.

two. Add in sip_nat.conf

; [general]; it seems that the paragraph name needs to be commented out.

Externip=55.66.77.88; Change to match our external IP address

Localnet=192.168.1.0/255.255.255.0; Change to match our network settings

three. Modify in rtp.conf

Rtpstart=10000

Rtpend=11000

four. Modify the settings of the wireless router where the asterisk is located

Map sip port 5060 and rtp port 10000-11000 to the private network IP address of asterisk or IP directly.

Tags: Problem server public network service address extension time phone port say route router method task practice company premise two-way that is nonsense Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei Docker OPPO Reno Xiaomi