Depends on the PBX and what interface cards it supports. For analogue inbterfaces, you can use FXO, FXS or E&M. E&M is preferable as it was designed for interfacing between PBXs and other devices and gives answer and disconnect supervision.
For digital, you can use CAS or PRI. PRI is preferable as it is a stateful protocol and it gives an indication of the progress of the call, full answer and disconnect indication and call clearing codes.