Tech Talk #1: How imp Works
Andy Dale here, I have been working at imp since very early on and have largely been responsible for designing and building the systems that make imp work. I want to share with you some of the underlying architecture and technology that makes imp… well, impish.
There are 3 main components of the imp system, the imp box itself, the mobile app that you use to monitor and control the imp box, and the network servers that keep your imp box and mobile app in sync. Let's take a look at how these components work to screen your incoming calls.
The imp box is a box that gets plugged into your phone line between the wall outlet and the landline handset. The box is also plugged into power. There were a couple of key functional requirements for the imp box beyond the basic screening functionality.
One of the most important things is that the imp box does not interfere with the smooth functioning of the phone system. As such we designed the imp box so that if it loses wifi connectivity or power, or someone pours a glass of water on it disrupting the box’s functionality, the imp box will not stop the phone from working. Note that some phones need their own power to work so in a power outage those phones will still not work. Phones that work in a power outage will still work with imp in the mix.
It was also important that the imp box be able to weather the inconsistencies of home internet systems. If calls come into the home landline while your internet is down, the imp will store the messages and the information about the calls until the internet connection is restored. The information can then be delivered to the network and onward to your mobile device.
The core call screening functionality of the imp system is dependent on 2 things, the list of your contacts’ phone numbers that are stored on the imp box and the caller ID service provided by your landline phone provider. When a call comes into your landline, shortly after the first audible ring there is a burst of data on the line that carries the caller ID information. The imp box has the time between that data bust and the start of the next phone ring to decide if it should let the phone ring, take a message, or hang up on the caller. This decision is made by looking up the incoming caller ID, ‘from number’ data in the locally stored ‘your phone number list’ to see if the number is there and if it is, what list is it on. This function is all performed locally and is not dependent on network connectivity at the time of the call.
There is a lack of standardization in both the caller ID systems and address book systems that make the simple screening function surprisingly hard. You can save phone numbers in your mobile phone's address book in many ways. Similarly, different phone providers put the caller ID ‘from number’ data in different formats.
When a call comes into your landline your imp box has less than 1 second, the time between rings, to determine if the incoming number is on your phone number list. The way that the imp system solves this problem is split between the imp box and the network components.
When your mobile address book is brought into the imp system the servers standardize the representation of the phone numbers. There is an international standard for formatting phone numbers1, we take each of your contacts' phone numbers and put them into that format. When a call comes into your landline the imp box gets the number from the caller ID data, manipulates it into the same standard format, and performs the look-up: “Is +15108154109 in my caller list?” Without these standardization steps the imp might ask: “is (510) 815-4109 in my phone list?” but because it was in your address book as “510.815.4109” it would not match.
There are 4 possible outcomes of the matching algorithm:
- The number is found on your Greenlist and the phone rings
- The number is found on your Greylist and the imp box takes a message
- The number is found on your Redlist and the imp box hangs up on the caller
- The number is not found on any of your lists and the imp box takes a message.
The data about any incoming call and what the imp did is saved locally on the imp box along with any message that the caller may have left. After the call is completed the imp box checks to see if it has an internet connection, when it does, it delivers the information to the network that in turn sends it to the Home view of your imp app.
I hope this gives you some insight into how imp works. If you have any questions please feel free to reach out to me at firstname.lastname@example.org
1Phone number formatting standard - https://en.wikipedia.org/wiki/E.164