[SOLVED] Connecting to Asterisk-Server using a softphone via openVPN

Hello together

I try to connect my android-handy using the CSipSimple-App with OpenVPN to my Asterisk-server, so that I can telephone with my internal telephones, as usual at home in the Lan.

Unfortunately, I do not hear the person at the iternal telephones. Strangely, they can hear me…

I really do not have any advice, because I can register with CSipSimple-App over OpenVPN at the Asterisk-server. The only problem is that I can not hear the the other side at the internal phone. Quite strange is that the announcement “Hello World” from the Asterisk-server I can hear…

The IPs I am using:

Asterisk-Server: 192.168.33.16

Cisco SPA504 Phone 1: 192.168.33.20
Cisco SPA504 Phone 2: 192.168.33.21

VPN-Server: 192.168.33.15 (10.8.0.1)

Android-handy: 10.8.0.6

The extension 10 in the sip.conf is one of the Cisco-Phones and the extension 11 should be my handy over openVPN

[general]
port=5060
bindaddr=0.0.0.0
context=default
allowguest=no
alwaysauthreject=yes
country=at
language=de
localnet=10.8.0.0/255.255.255.0
localnet=192.168.33.0/255.255.255.0

[10]
type=friend
secret=passwort10
context=intern
host=dynamic
permit=192.168.33.20/255.255.255.0
permit=10.8.0.0/255.255.255.0
mailbox=10@default
nat=yes

[11]
type=friend
secret=passwort11
context=intern
host=dynamic
permit=192.168.33.21/255.255.255.0
permit=10.8.0.0/255.255.255.0
mailbox=11@default
nat=yes

Thanks a lot for your help and sorry for my bad English!

Does someone have an idea, what the Problem could be?

I can’t remember what the default is for directmedia, but if it is set, can the local phone see the VPN?

Thank you very much david551! You did help me a lot.

The entry directmedia=no in sip.conf solved the problem. Now it is working! :sunglasses:

In Asterisk directmedia is on by default.

What does the entry “directmedia=yes or no” effectuate?

Direct media means that, everything else being equal, speech bypasses Asterisk and flows directly between the endpoints. That greatly reduces the CPU loading on Asterisk,l but does require that a direct route exists between the end points.