Code used in TelephoneRewired and TelephoneRewiredTesting