Connecting 2 servers via VPN Tunnel

Due to not being able to move my extension numbers to a new building I have been asked to create a second asterisk server and connect to my first one over a VPN tunnel to use the same extensions in the new building.

Can this be done and what would be the best way to do it. Currently we have one asterisk server.

I need the same functionality on the new server.

How are your clients connected to your Asterisk server?

Bear with me as I am new to this phone system!

We all use Linksys SPA941 phones connected to the network via ethernet cables, obtaining addresses via DHCP.

good. so if you have ip network in a new building, you can connect your phones to your unique Asterisk server.
If your ‘new’ building’s ip network is unreachable from an ‘old’ place, I would take a cisco vpn router to connect networks together. Afterwards, your phones would ‘see’ your Asterisk server in an ‘old’ place!

So I would not need 2 asterisk servers? Just connect the phones over the VPN?

Explain your ip-network topology

  1. Maybe you dont need VPN :smile:
  2. You should think about bandwidth: Are you planning to have lots of calls ‘new building’<->‘new building’?

No, not lost of calls, the only reason the old asterisk server has to stay in the old building is due to the numbers we can not move.

The old network is a standard Windows 2003 server domain as will the new.

We do not have alot of bandwidth therefore the reason for 2 asterisk servers. I do not want internal calls in the new building going down the VPN tunnel to the old building and back again.

Ideally a replicated phone system (one in the old building and one in the new building so that we can keep the numbers) and then some clever routing to deal with internal calls.

The 2 sites will be connected together using a PPTP VPN.

Good. Then duplicate you asterisk server, change its ip-address. As soon, as your network is ready and you can ‘ping’ one server from the other, edit h323.conf to configure h323 trunks between your servers.
extensions 1100-1199 are the ‘old building’, 1200-1299 are in a ‘new’ building…
something like that.

p.s. AFAIK, M$ pptp is buggy. As I’ve said, I would use cisco vpn solutions. If you want some M$ products here :smiley: it’s fast (and secure) enough to start with http://en.wikipedia.org/wiki/X.509

What about IAX?

Sometimes, it fails for me… (donno why, once a month I have to restart one of the two connected servers to reestablish connection) :frowning: so,personally, I cant recommend it, maybe somebody else will add some words…

thanks - and one more question - how about using SIP to connect the 2 phone systems together?

Sorry, I didn’t understand your question. You have two hard-phone-systems and you want to call from one phone to the other without ‘the server’?

I think the VPN is irrelevant here. The solution is the same as for a real IP link.

I think it is however I need to ensure I have enough bandwidth.

I think IAX uses the least.

VPN, no VPN, does not really matter. The question is really this. Which building is connected to your telco provider? And how much bandwidth between offices.

If only the old building is connected. Leave the old asterisk server there. The new office can ‘hang’ off the old office, phones register over the VPN connection. (mind the bandwidth consumption)

If the new and the old building are connected (and telco is not letting you move the DIDs) put in a new asterisk server in the new building. Connect the old and the new via IAX, home phones in the old office to the old asterisk, new office to the new asterisk, and create a dial plan so “internal” calls go across the VPN, and “extenal” go out the appropriate local connection to the telco.

If it is just you that needs to connect to the Asterisk box in the other building then you need to establish connectivity to that other server in some manner(vpn, just a long ass lan cable running to the other building, etc.)

Make sure you can ping the asterisk server in the other building.

Once you can do that just reconfigure your phone to point to the asterisk server in the other building. You may need to talk with the DHCP admins to make sure that your settings do not get overwritten if they are defined by dhcp.

Your phone will always take up a bit of bandwidth(about 64kbps) for any calls whether internal or external, but that probably wont be a big problem.