...it always looked like the data was corrupt, it never looked anything like the data in the procomm terminal window
VT100 uses many escape sequences to provide various coloring, positioning and cursor functions needed for advanced terminal applications. You should study VT100 escape sequences, see what they consist of, and filter them out to get clean ASCII text. Then you parse data you need. Depending on data, you might even get out without VT100 filtering at all and parse right away. It seams this is not your case and your data is complex so you need to filter first.
www.google.com/search?q=vt100+escape+sequencesNext advice is valid only if your PBX blindly sends data without any user intervention on PC side (and ProComm not having some automated macros which do the same job). That advice would be to wire TX pin from PBX not only to RX pin on PC side cable in DB9 RS232, but also to RX pin on another port of the same pc or even another pc (
http://pinouts.ru/SerialPorts/Serial9_pinout.shtml). That way you can listen to the messages, analyze them without interfering, and write your Lazarus application. Alternatively, you might want to write a spy-through application on a separate pc with 2 serial ports, which will receive all data from PBX, and forward it without any changes to ProComm. You will need more cables for this idea. And finally, you might want to skip cabling trouble at all and do the same with just 2 virtual serial ports (
http://www.hw-group.com/products/hw_vsp/index_en.html) installed on the same pc where ProComm is located. So, at the end your config could look something like this: PBX sends data to physical port COM1, COM1 is set to forward to virtual COM2, your application reads virtual COM2, parses and extract data and logs it, but forwards without changes immediately each received byte to virtual COM3, and ProComm is attached to virtual COM3 and it does it's business as usual. Of course, to avoid trouble all virtual COM ports would need to have the same settings as COM1. Once you have your application fully working, you can get rid of virtual COm ports and ProComm.
Btw, if ProComm pc is running 24/7 and the only reason is logging PBX data, then you might consider writing a Lazarus application for some cheap Linux ARM board like Raspberry Pi or BeagleBone Black, since they use hundred times less power then traditional pc.