No Audio for SIP calls through OpenVPN

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
D1
OpenVpn Newbie
Posts: 3
Joined: Sun Jul 14, 2013 6:35 pm

No Audio for SIP calls through OpenVPN

Post by D1 » Sun Jul 14, 2013 7:04 pm

Hi All,

This is my first post here.

I am having problems with audio when connecting a Yealink SIP T20 phone through an OpenVPN server to an Asterisk PBX. The VPN is established successfully, and the phone's sip account is registered as well. But there is no audio with some phones, and one way audio with the other. I have read about problems with SIP over NAT, please let me know if there is a solution for this.

Here is a brief description of my scenario:

I have a Yealink SIP T20 phone which can be configured to connect to the openVPN server. The openVPN and the Asterisk server are on the same LAN. Where as the phone is on a different LAN. I have configured the necessary NAT rule on the openVPN server, it is :

Code: Select all

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
10.8.0.0/24 is the vpn client's LAN.

This set up works perfectly on my laptop when I connect to the openVPN from the same LAN as the phone. I can even use a softphone on the laptop and there is no problem with the audio.

The settings on the phone are also correct because when I put the phone on the same LAN as the Asterisk Server, I can make calls as expected without any audio problems ( i.e. without connecting through the openvpn, even if its on the same LAN and I connect through the openVPN I still get audio probs)

I have spent 3 days searching for an answer, I would really appreciate it if anyone could share their knowledge with me to overcome this problem.

Thanks in advance,

D1.

D1
OpenVpn Newbie
Posts: 3
Joined: Sun Jul 14, 2013 6:35 pm

Re: No Audio for SIP calls through OpenVPN

Post by D1 » Mon Jul 15, 2013 5:21 pm

Any input would be highly appreciated? I've been stuck on this for days now... :(

mwandelaar
OpenVPN Super User
Posts: 219
Joined: Mon Nov 23, 2009 8:24 pm

Re: No Audio for SIP calls through OpenVPN

Post by mwandelaar » Mon Jul 15, 2013 9:12 pm

SIP and NAT are a real problem.
And you made a setup with NAT, so i think that might be a problem.

There's a nice tutorial over here which describes how to setup this without the need for NAT.

If that really is not an option you might try, as a last resort, using a STUN server to solve this. However, it's not failsafe.

magran17
OpenVpn Newbie
Posts: 1
Joined: Wed Jul 30, 2014 9:55 pm

Re: No Audio for SIP calls through OpenVPN

Post by magran17 » Wed Jul 30, 2014 9:56 pm

I was using Elastix 2.4 and had a very similar problem. Two LANs - one with Elastix in datacenter, two at remote offices. IPSec LAN-LAN VPN between them. If using the LAN-LAN VPN, I would get no audio. However, if the softphone or phone would VPN to the datacenter, then connect, everything was good.

For me, the solution was to go to the FreePBX, and specify the remote LAN segments as "local"

1) From Elastix menu, select pull down arrow, -> Security, -> Advanced Settings.
2) Set "Enable direct access (Non-embedded) to FreePBX" to ON. Save, Return to PBX menu.
3) Unembedded freePBX -> login -> Tools menu -> Asterisk SIP Settings
4) Select autoconfigure to populate external IP and local datacenter network.
5) Click add local network field (in my case non-datacenter LAN-LAN VPN networks)
6) Add 192.168.8.0 / 255.255.255.0 and 10.243.250.0 / 255.255.255.0
7) Save and apply changes

Puviarasu
OpenVpn Newbie
Posts: 1
Joined: Wed Sep 09, 2020 11:39 am

Re: No Audio for SIP calls through OpenVPN

Post by Puviarasu » Wed Sep 09, 2020 11:46 am

I am having the same issue. But I don't think, this is related to SIP and NAT issue. Probably ISP is blocking our OVPN traffic across their Network. Because I have tested with the same OVPN setup for two users whom I made them to connect VPN with different ISPs and I can see one user is not having issues and other user is having voice issues(no voice on SIP phones, calls are just blank). @Open VPN Team can you guys please help us on this?

Post Reply