I can establish a TCP connection to the PABX. It prompts and I can log in, and receive a few call records. But after not very long the PABX drops the connection for no reason I can fathom. It's definitely getting ACKs, I checked with Wireshark.
In this related question CharlesO says
You simply write a TCP Listener to accept connection from the PBX and parse the incoming Call Detail Records (CDR).
Have done this successfully with Avaya, Panasonic and other PABX Products
Does this mean the problem is simply that the design is "don't call us, we'll call you" ?
Sniffing the traffic between the PABX and a commercial call logger reveals that the PABX frequently drops the connection for no good reason and any app wishing to log call data must monitor the state of the connection.
Since TcpClient won't detect a change of state until a write fails and this is strictly a listening socket, a more direct approach to connection status is required:
It is also necessary to handle redundant call logs since these are often repeated when the connection is re-established.