First thing to do is see what kind your old pbx can support (E1 or T1).
Second search devices like digium to implement.
Buy cards and coax cables to connect them.
One very good tip is search and download trixbox or elastix to configure your system. They have support to many services that u can use with this integration.