Disclosed is an improved external cable box assembly and external trial stimulator (ETS) for use with an implantable medical device. The improved external cable box assembly has memory and logic circuitry embedded in it which allows the cable box to be identified. Associated logic circuitry in the improved ETS allows the ETS to read and write characteristics—such as electronic identifiers or cable addresses—of the external cable box assemblies and to store the values of those characteristics in its memory, associating characteristic values with each of its ports. If the external cable box assemblies become unplugged from the ETS and then are reconnected to incorrect ports on the ETS, logic in the ETS will either alert the patient to swap the port locations of the external stimulation cables, or the ETS will automatically reroute the correct therapy through each port.