I would recommend an Asterisk system too.
Depending on your needs, there are a lot of flavors of Asterisk that will do the trick.
If you need "full control", and customization freedom...then I suggest going with a recent open source version of Asterisk.
You can connect any kind of softphone or hardware phone, as long as it is SIP capable. (or IAX).
X-lite is free... I sometimes use x-lite from my house, through a sonicwall global vpn client on my computer.
Bandwidth considerations should also be made since you are planning on integrating more than one office, who probably have varying speeds of connectivity.
A good desk phone that I recommend is LynkSys SPA942. It's cheap and has a lot of features. Looks just like the cisco phones (who oddly enough purchased linksys).
If you need any help in the setup/planning, I would be glad to help.