Can anyone help me

Hello I’m new with this stuff of VoIP currently I had a freepbx installation working but I’m having issues I think due to a bad configuration.

I have one freepbx working in America which are in the same network were I have an openvpn server.

In the other side of the world Europe I have another freepbx server configured with an iax2 trunk with an openvpn client.

So both freepbx figure in the same network.

The problem is that when I want to make a call from my Android phone I first need to connect to my openvpn server and then open csip phone app, doing this I get a ping about 500ms because my android phone connects to America vpn server and then login sip extension into the freepbx located in Europe.

It’s possible to just login sip extensions directly to my server here in Europe and have also the server connected to the other network via iax2 with the openvpn??

What should I do? I know this can be made. Need it just to have lower ping from Europe sip extensions. Because going to America vpn server and then get back to Europe to login sip extensions increase twice the ping.

Also sorry for my bad English my native language is Spanish. If anyone here can give me hint or a clue would be great.

i am not 100% sure i know what you are asking but will take a stab at the answer anyhow.

  1. you have 2 pbx’s, one in the US and one in Spain
  2. the pbx’s are connected via an iax trunk
  3. your iax trunk runs inside a vpn (openvpn)
  4. your android phone to make calls from the pbx located in spain

it sounds like you created a vpn client connection for your android phone on the server in the US. Why don’t you create the client for your android phone on the server in Spain? the iax trunk, if properly configured will allow you to call US extensions from the Spanish server, and people in the US can call Spanish extensions directly from the US server. What am i missing?

Yes that’s right, that’s the configuration, currently I can call to anyone in US and they can call me but from Spain side ping it’s too high because I need to login into vpn server in the US.

Do I need to have two vpn servers?? One in US and another one in Spain?

It’s possible to connect extensions here in Spain without another VPN server? Because have all the day the vpn client app opened in my mobile phone I get lower speed connection for other tasks in my mobile phone, also get a lot of battery drain.

I tried to put the Spain server for testing purposes (due to security issues) in DMZ and I cannot login any sip extensions in Spain server from LTE network of my mobile. The only thing I can do its login into the admin panel.

I just want to connect sip extensions from Spain side without the vpn. Also i have dynamic ip here in Spain but that it’s solved with no-ip dynamic service.

What’s the correct way to do it?

if you really want to fix this you need to find a better internet connection from spain or spend lots of money on a dedicated connection. i have done this between servers in california and germany - the response times were not great but it worked. i tried to do this between Israel and california but the delay was too great and the customer did not want to spend the money on a decent connection. if your US server is housed in a data center, you might talk to them to see if they have any peered network data centers in spain as that might be a cheaper way to go that buying your own dedicated connection. but if you are running these servers out of small offices or even worse, peoples homes, you are not going to have any success. if you get rid of the vpn you will use less bandwidth which might help a bit. try configuring a desk phone in spain directly on the US pbx and see how it works.

by the way you do not need a vpn to connect your phone to either pbx in spain or the US nor do you need a vpn to connect the two pbx’s.

In US office connection have a ping of 150ms and here in Spain 50ms, just have 2 phones attached one in US and the other just my mobile phone here in Spain so you suggest to get rid of the vpn and connect both servers directly by respective ip addresses.

ping uses a different protocol ( icmp) than SIP probably UPD but possibly TCP, so “ping times” are irrelevant and generally ICMP will get the lowest “Class of Service” and thus artificially high delay times, but that is also irrelevant, the SIP connection spawns a RTP connection on UDP that carries the audio, you have a little control over that within your network with proper cos/tos settings in your routers/switches to prefer VOIP over netflix but ultimately any delay or loss in that RTP stream (over UDP) that is significant above 80 msecs will cause your users stress. Openvpn is a processor intensive protocol, so make sure your machines have enough balls, IAX2 is a good option as all traffic signalling and audio goes over one connection, but a little tricky to prioritize on some routers.

i would certainly give it a try to see if it works better. ping times are interesting but not necessarily relevant. no matter what you do, the softphone on your cell phone is going to eat battery life pretty quickly. you are going to be better off installing a desk phone in spain and connect it to the pbx in spain and set a follow me to your cell phone. use the desk phone as much as possible to save battery on the cell phone. or if you don’t want to buy a desk phone, create a virtual extension on the spanish pbx and set the follow me to go to your cell. that way you are using the cellular connection on the phone. if you want to call the us, setup your system in spain so you can dial into it and have it dial the us extension for you.