Interconnect remote Asterisk servers

Hi,Guys

I am new to asterisk, Can anyone there tell me is it possible to interconnect two (or more) remote asterisk box? i.e. two branch office have their own asterisk based PBXs and wish to connect each other via internet (or VPN), so one branch can call the other via voip and reach the opposite side’s PSTN as well.
I have look around a few tutorials for the answer and haven’t got it.

Thanks

I got the answer from voip-info, there is an article about connecting two server using iax trunk…

IAX is the way to go.

voip-info.org/wiki-IAX

you could connect them with sip too, but iax2 is way better for this…