Hi everybody.
i've set up a voip nettwork usinf android clients and asterisk server, this one connected also to a pstn central in order to reach usual corporate numbers of my organizations.
The clients, once connected, receive an ip in the class 10.10.10.x
The asterisk server has an address of the 192.100.100.x class, and also the vpn server.
Apparently everything works.
the clients connect to the ovpn server and can reach the asterisk server (they can ping it).
If i open the voip sw on the client (e.g 3cx, sipdroid or csipsimple) it connects correctly with the asterisk server, an registers.
If i call a voip client from a voip client, the quality is pretty good.
my only problem arises when i call a pstn internal number.
voip client side : perfect quality
pstn phone : bad quality (the sound is often interrupted, the conversation is hard to understand).
If i connect the client DIRECTLY to the 192.100.100.x network, the quality is perfect on both sides, so the problem seems to be something related to the ovpn
I cannot post the server conf at the moment, i will do tomorrow.
This is the tipical client (android) conf :
client
dev tun
tun-mtu 1500
proto tcp-client
remote "my ip address" 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert xxxx.crt
key xxxx.key
tls-auth ta.key 1
comp-lzo
verb 3
redirect-gateway def1
Now my questions :
1) most important of all : any ideas about improving/solving the issue?
2) if I try to register the voip client using tcp transport, it fails. When the client is connected directly to the asterisk network, without ovpn, the tcp transport process success. I would like to try this option as in the past it seemed to improve the quality. So... why tcp does not work in this scenario while udp seems to work perfectly?
3) if i remove "redirect-gateway def1" the voip process does not work. Why? how coul i change this directive in order to have only the correct traffic tunneled through the tun interface?
At the moment my ovpn server is an ubuntu 12.04 32bit machine.
In the past it was an windows xp machine with a swyx (windows ) server.
Everything worked perfectly (even the sound problem i outlined before) but i want to use opensource and not windows...