Asterisk, SIP phone behind VPN

Hello,

I’m very new in Asterisk so please don’t bit me to hard.

Here is my situation.
I have asterisk with is located inside office net:
Asterisk Server IP:
10.51.0.7/24

Gateway/VPN Server:
Local Net: 10.51.0.1/24
VPN net: 10.61.0.1/24

I’m using OpenVPN server

Client is a soft phone:
grandstream.wave on android

I’ve added in Astersk:
localnet = 10.51.0.0/24
localnet = 10.61.0.0/24
nat = no

Now the issues:
I can see local network(10.51.0.0/24) from VPN client (10.61.0.0). Both directions is pingable.
I can call from vpn client but local clients cannot here me
I can see UDP trafic from VPN client to Asterisk, but I didn’t see the sip server sends data back to VPN cli (tested via tcpdump)
If set “eneble nat = comedia” sometime I do can here both sides and it does work, but most times I cannot even pick up respond to a call.

Could you please give me some hints ?

Thanks in advance

Try that for your peers:

nat=force_rport,comedia

An actual SIP trace of an attempt would need to be provided to see what IP addresses and ports were exchanged for where media should flow. This can be done using “sip set debug on” and attempting.

fsilvestre Thank you. looks like it does help! I will need to test it for some time.
Tank you so much for quick reply!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.