Hello friends,
For the longest time we have not been able to solve this NAT mystery.
The set up is a FreePBX 15 (other versions same thing) in a cloud vps with a public IP, a few of the Yealink IP phones, and an Adtran TA924e behind a Ubiquiti USG gateway.
The issue is, when SIP ALG is disabled in the USG, the Adtran which is behind the USG is not receiving calls form any of the phones. The phones, however are working fine both ways. The adtran can only call out, but not receive calls.
When I checked debug sip stack messages in the Adtran, it is clearly showing that when SIP ALG is disabled in the USG, the adtran is getting a request on a public IP, not Adtran’s private IP like it should. But when SIP ALG is enabled in the USG, the adtran is receiving a sip request on it’s private IP and port 5060, and the adtran then is ringing the phone.
The question is, we are trying to disable SIP ALG for our phone deployments, but disabling SIP ALG in the USG causes the Adtran to not receive calls. What should we do so that the USG handles this NAT issue properly, and translates to the Adtran’s private IP? Since the phones are working fine, why would the adtran not receive calls?
Here is the output of the SIP Invite to the adtran when SIP ALG is enabled and the adtran is ringing.
21:50:03.183 SIP.STACK MSG Rx: UDP src=104.156.27.116:5060 dst=192.168.5.32:5060
21:50:03.183 SIP.STACK MSG INVITE sip:[email protected]:5060 SIP/2.0
21:50:03.183 SIP.STACK MSG Via: SIP/2.0/UDP 104.156.227.116:5060;rport;branch=z9hG4bKPj86c93a49-668c-47cc-bd7f-8fc914eb5486
21:50:03.183 SIP.STACK MSG From: “Test” sip:[email protected];tag=925f1351-231c-4881-98d7-0af333b9370c
21:50:03.183 SIP.STACK MSG To: sip:[email protected]:5060
21:50:03.184 SIP.STACK MSG Contact: sip:[email protected]:5060
21:50:03.184 SIP.STACK MSG Call-ID: 5b294ae2-2c85-452a-8094-6f0e490e09db
21:50:03.184 SIP.STACK MSG CSeq: 20185 INVITE
21:50:03.184 SIP.STACK MSG Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
21:50:03.184 SIP.STACK MSG Supported: 100rel, timer, replaces, norefersub
21:50:03.185 SIP.STACK MSG Session-Expires: 1800
21:50:03.185 SIP.STACK MSG Min-SE: 90
21:50:03.185 SIP.STACK MSG P-Asserted-Identity: “Test” sip:[email protected]
21:50:03.185 SIP.STACK MSG Max-Forwards: 70
21:50:03.185 SIP.STACK MSG User-Agent: FPBX-15.0.16.75(16.11.1)
21:50:03.186 SIP.STACK MSG Content-Type: application/sdp
21:50:03.186 SIP.STACK MSG Content-Length: 343
Here is the output when SIP ALG is disabled in the USG and the Adtran is receiving the invite, but it is directed toward the public IP of the gateway and the Adtran is not ringing.
22:04:37.777 SIP.STACK MSG Rx: UDP src=104.156.27.116:5060 dst=192.168.5.32:5060
22:04:37.778 SIP.STACK MSG INVITE sip:[email protected]:5060 SIP/2.0
22:04:37.778 SIP.STACK MSG Via: SIP/2.0/UDP 104.156.227.116:5060;rport;branch=z9hG4bKPj678355eb-c287-4609-a052-48792cc6c766
22:04:37.778 SIP.STACK MSG From: “Test” sip:[email protected];tag=ca9c7fa6-dac7-494f-b298-fcfd6ee95877
22:04:37.778 SIP.STACK MSG To: sip:[email protected]
22:04:37.779 SIP.STACK MSG Contact: sip:[email protected]:5060
22:04:37.779 SIP.STACK MSG Call-ID: 74605085-0e41-49fb-8964-ed6c79de6d2a
22:04:37.779 SIP.STACK MSG CSeq: 15361 INVITE
22:04:37.779 SIP.STACK MSG Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
22:04:37.779 SIP.STACK MSG Supported: 100rel, timer, replaces, norefersub
22:04:37.780 SIP.STACK MSG Session-Expires: 1800
22:04:37.780 SIP.STACK MSG Min-SE: 90
22:04:37.780 SIP.STACK MSG P-Asserted-Identity: “Test” sip:[email protected]
22:04:37.780 SIP.STACK MSG Max-Forwards: 70
22:04:37.780 SIP.STACK MSG User-Agent: FPBX-15.0.16.75(16.11.1)
22:04:37.781 SIP.STACK MSG Content-Type: application/sdp
22:04:37.781 SIP.STACK MSG Content-Length: 345