I emailed this to a user in response to an earlier forum that has been locked. Figured i would post it here for anyone else to see and comment on :)
You have a few options when it comes to getting your lines over to VoIP.
1) Full VoIP internal & external
Use a VoIP provider like Slingshot iTalk, World Exchange, (you could even use multiple providers) etc to move your PSTN lines over to VoIP lines that connect with the provider's servers over the internet (or maybe a dedicated link). This will rely on them having lines available in your area code. It doesn't require any gateways at the exchange as such, it just requires the exchange to know to direct your numbers to their network (this is done by them when you sign up). Then you use a VoIP pbx system at your end (eg an open source one is the Asterisk system or sipX, and a multitude of commercial ones). This system will use something like SIP trunking or similar to connect to the VoIP provider and map DIDs to internal lines etc etc.
2) VoIP internal PBX, analogue PSTN external.
Get a VoIP PBX system (eg Asterisk) in conjunction with an analogue PSTN gateway (the reverse of a VoIP ATA). The gateway connects to your normal voice lines for incoming/outgoing calls. You can also use this in a mix with VoIP lines to get cost advantages (eg use a VoIP provider for overseas tolls, local lines for local calls etc).
3) VoIP internal PBX, ISDN external lines.
This is the setup we have just implemented at my work. We have a VoIP pbx with VoIP phones at desks etc, and have ISDN gateways with PRA connections to the exchange - we went this way because we have a bunch of lines so it would be impractical to use analogue gateways (using isdn means a 2 pair cable can carry a whole bunch of digital "lines" or channels instead of having to have a pair for each line).
4) Multiple independent VoIP lines
This might be a cheaper option and simpler from an implementation point of view, but not so good for a business. You could sign up for a VoIP line for each of your staff, and give them VoIP phones that connect over your internet to the provider. Essentially the same as getting a phone line installed for each person, but using VoIP instead of analogue lines. Not so good when you want to have transfers, call groups, receptionists etc etc. Fine for a very small business with only a couple of people.
I'm not sure if any NZ providers do it yet, but another option could be to have a hosted VoIP PBX, where a provider hosts the PBX system, and all you do is tell them the number of extensions you want and the way you want them set up. Similar to all the options above, except the PBX system is hosted offsite, and the handsets just connect to it over the internet. Would reduce upfront cost maybe, but would require a large amount of internet bandwidth, especially if you have lots of extensions. This is kind of similar to the old telecom Centrex system where they essentially created virtual private analogue PBXs using fancy software at the exchanges.
You can use a mix of the above, and can go for cheaper DIY setups with relatively cheap gateways and a PC as your PBX, all the way up to fully managed commercial setups with redundancy and support etc. One of the things you need to watch out for is network contention & prioritisation. We have switches that use VLANs to seperate the VoIP and pc traffic and have multiple ISDN gateways for the phone lines so we don't rely on our internet connection. If you go for a Full VoIP setup you might want to consider getting a 2nd and/or dedicated internet connection, and set up your router(s) and switch(s) so that VoIP traffic gets highest priority if you can. We spent over $100k replacing all our network infrastructure to support VoIP (as well as improve the LAN) for around 200 staff spread over 3 sites + offsite reps (the system also incorporates an IVR system which increased the cost a bit). Was costly because we used enterprise class equipment from the servers to the switches, right down to the handsets and have multiple sites and multiple redundancy, but this is probably the extreme end of the expense scale for a business that size.
Just remember that while VoIP can give you a bunch of cost savings and smart features in the long run, it means that all your phone equipment now uses computers, and computers are complex machines with complex software setups that break sometimes! Analogue phones aren't very smart, but at least they are generally reliable without having to add too much redundancy!