Record a time when the company's DotAsterisk PBX (DotAsterisk) is mapped to the external network, and the external SIP extension is registered and dialed, and there is no sound.

1. Environmental description

The Dianxing PBX call system is deployed on the company's local area network, the internal network segment is 192.168.2.0, and its IP address is 192.168.2.200. The company is connected to the Internet through a H3C router, as shown in the figure below.

 

2. Requirements

Because employees need to register to Dianxing PBX outside to make business calls, they need to map Dianxing PBX's SIP port (5060) and rtp port (10000~20000) to the external network for employees' mobile phone softphone registration and dialing. After negotiating with the operator, the operator has successfully opened the UDP 1w-2w port of the external network IP. I chose 14531 as the sip port mapped to the 5060 of Dianxing pbx for the external network softphone registration.

1) Gateway h3c router port mapping

The h3c router has also done port mapping, as shown in the figure below:

2) Dianxing PBX configuration sip nat is as follows:

[root@dotasterisk:~]#cat /opt/app/ast/asterisk/sip_nat_custom.conf
externhost = <*****Hidden company public IP address*****>:14531
localnet = 192.168.2.0/ 255.255.255.0

 

 

Three, test failure

SIP extensions on the external network can be registered to Dianxing via softphone, but the registered extensions between the external networks cannot hear each other's voice after the call is off-hook.

 

Four, failure analysis

1) Open rtp debugging through dotstar pbx

dotasterisk*CLI> rtp set debug on

Observation found that Dianxing pbx did not receive any rtp voice data packets, it is suspected that there is a problem with rtp.
Use the extension 5060 registered with the external softphone to dial the shortcut key " *65 " of Dianxing pbx to broadcast your own extension number, and you cannot hear the voice content from Dianxing pbx.

2) Use wireshark to capture packets on the local machine of softphone 5060, as shown in the figure below.

By analyzing the sip sdp message, it is found that the IP address (100.64.53.104) of the local client softphone sending and receiving the rtp stream is not the company’s public IP at all. This IP address is just the virtual IP (building IP) inside the operator, and it is also The IP address obtained by the pppoe of the h3c router after dialing. As shown below.

 

Five, the solution

At this point of analysis, it is basically clear that the h3c router "smartly" modified the rtp ip address of the sdp message carried by the sip INVITE message. Generally, this is because the router's default ALG application has enabled SIP. Enter the h3c router and cancel " Enable SIP " to solve the problem, as shown in the figure below.

So far, the external softphone extension has a voice for incoming calls, and everything is normal.

 

Guess you like

Origin blog.csdn.net/nullundefined/article/details/109305478