A CT54 in normal operation is managed via a central Payphone Management System via a V.22 modem IC built into the Payphone. Once a day, the Payphone will take itself out of service to briefly call the management platform and upload reporting data, whilst presumably at the same time to download any tariff changes, software updates and to synchronise the Payphone Real Time Clock (RTC). The frequency and timing of this "Phone home" facility must be set by the management platform itself in order to avoid having 40,000 Payphones all trying to call in at the same time, thereby requiring a large number of modems back at the BT data centres. This is further backed-up by the fact there doesn't appear to be any menu options within the Payphone config that allow the engineer to set a time for the Payphone to call home each day.
Obviously, the average home Payphone Kiosk enthusiast will never get access to this system, but it is possible to build an inexpensive basic reporting system with just a few components and a little know-how. This is the sort of thing you would need;
"Home-Brew" Payphone configuration
Components used;
Cisco 1721 router with a WIC-1A modem module fitted
An Analog Telephony Adaptor (ATA) - e.g. Cisco SPA122
A raspberry PI to act as the management/reporting server
The Payphone is connected via standard telephony cabling to the Voice over IP (VoIP) Analog Telephone Adaptor (ATA). These can be picked up either second-hand on eBay or new for around £20. In addition to this, you'll need a SIP account with a service provider such as Sipgate, who offer a free telephony service ("Sipgate Basic") that comes with a choice of area code for your phone line(s) and Pay-as-you-go billing for any calls you make. You'll need 2 SIP accounts in total; one for the Payphone and one for the dial-up modem.
On the ATA, configure a Dial-Plan (or Digit Translation) to essentially prevent the Payphone from reporting back to the official BT reporting system. The Dial-Plan looks for a set of dialled digits and replaces them with a second set of digits.
CTI and Management configuration
In order to find the set of digits to replace, put the CT54 into Maintenance Mode and from the main menu, press the # key to scroll down to option 8. CHECK DATA. This screen will show you the current Coin Telephone Identifier (CTI) and also the Management system dial-up numbers. The digits you need to put into the ATA dial plan are the MGMT_0 and MGMT_1 numbers (which may well be the same set of digits). The digit translation needs to replace these numbers with the number of your dial-up router
The CT54 Payphone communicates with the back-end management platform via its internal modem to establish a PPP dial-up link with a Remote Access Server (RAS). In the real-world, BT will operate a large bank of analog dial-up modems, sized to cater for the peak concurrency of Payphones reporting in at any one time. In this "home-brew" solution though, we only need a single modem to act as the RAS server and the Cisco 1721 fulfills this requirement nicely. Its an end-of-life (EoL) product and hence can be picked up cheaply on eBay for £15. The Cisco 1721 comes with two "WIC" (WAN Interface Card) slots into one of which can be fitted an Analog modem card (WIC-1A). Again, these can be sourced cheaply on eBay.
The Cisco router then needs to be configured appropriately to respond to incoming calls from the CT54. Below, is a basic config that fulfills this need.
Cisco 1721 sample configuration
The 3 lines that may require customising for your installation are;
Line 25: The IP address should be replaced with a suitable IP address from your home network range.
Line 38: The CT54 will send its reporting data to the default gateway that the router has provided. In this example, 5.5.5.1 on UDP Port 4001. This line translates this address to the address of your Raspberry PI server that is listening on UDP Port 4001 for incoming data. So the first IP address in this line should be replaced with the IP address of your Raspberry PI server.
Line 39: The address at the end of the line should be replaced with the IP address of your home router or gateway.
Finally, connect up the LINE 0 port on the WIC-1A card to a spare port on the ATA and then if you ring your SIP number, you should hear the traditional tones of a 1980's dial-up modem!
Ports on a WIC-1A card
A basic server, listening in UDP/4001 is needed in order to communicate with the CT54 Payphone. A Python version is shown below which simply displays any output it receives on screen. This can be easily adapted though to store any reporting data from the Payphone to a file instead.
Basic UDP listener script
Ordinarily, the CT54 will be configured to call the management platform every 24 hours at a pre-determined time and upload its daily data. The format of this is a 74-byte message which will be similar to that shown below. (I'm unsure of the purpose of a lot of the bytes contained in the message but have had a go at de-ciphering some of it).
Sample output from a CT54
Sadly, this is where the story ends. I do not know what acknowledgements or responses the CT54 is expecting for things like setting the Date/Time or uploading a new tariff table or commissioning the payphone. Without being able to reverse engineer the CT54 firmware or without a kindly soul from BT Payphones "spilling the beans", then I'm unlikely to get any further than this. If you have managed to get beyond this stage though or know more about the CT54 protocol, or you're a sympathetic BT Payphones person wanting to help out, please do get in touch though.
Once the Payphone has tried to make its initial contact with the management server (and fails), then unfortunately after every phone call, it tries to again connect to the management server, which puts the Payphone out of action for a few minutes each time. I've had to incorporate a power reset circuit that reboots the payphone each morning which stops this from happening and makes the payphone completely usable.