My telco was charging $8/month for visual voicemail, so I opted to buy a Twilio number for $1/month, and set my phone to forward no answer/busy/unavailable to a simple Twilio app I wrote that handles voicemail.
When someone leaves me a message, I get an SMS with the message and caller details. I've been using OpenCNAM (https://www.opencnam.com) for the caller ID look-up.
I implemented something similar for our office so that each person has a proxy number that can be given out to clients. Voicemail is handled by a similar app, and each person also receives a Slack notification for an incoming call or voice message.
Lookup by Twilio is a bit different than OpenCNAM, but also pretty similar. They're both pretty affordable, though in the end, I'll likely create our own lookup database that we can customize.
For me, the most immediately useful info is the state/province as well as country of the incoming call. It appears that with Twilio Local, on the latter comes through. I did some tests of Lookup with a bunch of numbers, and the additional info that comes through for the paid portion of things doesn't seem that particularly useful. The (free) "national_format" is nice, but I'd say the most valuable part of the service is quickly identifying invalid and VoIP-based numbers.
Thanks for the opencnam mention. We are about to launch www.everyoneapi.com -- version 2. The current everyoneapi offers the same lookups that Twilio offers, but we will be lowering our price and adding even more data-points. Our reverse phone append product offers a lot more than just linetype and carrier. The parent company to both opencnam and everyoneapi is telo (www.telo.com). If anyone has any questions or requests, feel free to contact support@telo.com!
A Slack notification is a great idea. I just have the Voicemail Twimlet set up for my personal numbers but I've been wanting something more sophisticated for awhile. Thanks for the ideas, and the OpenCNAM link.
I worked on a very similar project a few years back, but without lookup and with an altogether different (physical) interface: http://iamsaul.co.uk/projects/message-box/
For the same reasons ($1/month<<$8/month, even though it means I burn a precious NANPA DID), I've set up the same without writing a single line of code.
With VOIP.ms, I ordered a DID and set it to auto-answer any call. They have a voicemail feature you can use, so it handles the recorded message and recording after the beep. Voip.ms then emails you the voicemail (nice for recordkeeping). If your cellular provider has an email to SMS gateway, you can forward the email there, and you'll see the callerid in the subject, but no CNAM to speak of.
Once working, I set my cellphone to auto-direct any unanswered calls to the DID I setup.
Any plans on open sourcing the formatting library?
It's a good functionality, but (at least for me) would mainly be useful for view-layer on-the-fly formatting, and we wouldn't use an remote API request for that.
Sort of like Strip's jQuery.payment[1], it would be a simple and clever marketing trick. People searching for a phone number formatting library are just the people you want to sell your services to.
EDIT: just found libphonenumber, which does local formatting[2]
I would agree that libphonenumber is the go-to for what you want to do. The JS build process for it is... involved, but you can find pre-built versions of it for Node, UMD, etc.
I find it interesting that you can get the mobile carrier from this. The first thing I pictured was a voice phishing attack: "Hello, this is T-Mobile, there's a problem with your account..." you get the gist.
Have you seen those GoDaddy commercials with Danica Patrick? Those commercials appeal to people who, I'd gander, have a lot more to lose (and aren't as wise to the potential sly tricks... of the internet) than what could be phished over the phone from your telco provider.
Not in the US, so I don't see that ad. Good point about lot more to lose, though I wonder if 2FA through phones makes losing phone access a risk as well.
Security through obscurity doesn't always work. You could do the same by calling a list of numbers and playing the odds by using like AT&T or Verizon randomly and get a lot of people that way too.
See my answer here - https://news.ycombinator.com/item?id=9300690 - about why you're getting O2 for a Giffgaff number (Giffgaff is an O2 MVNO, and owned by O2's parent Telefonica as it happens).
Re: a Twilio UK landline number coming up as JT, as you're probably looking at the results of a SS7-MAP command that returns the SMS routing info for a particular number, in this case it's likely that JT look after the SMS side of that number (routing for voice and SMS and the networks themselves are generally quite separate).
Someone is going to have bad analytics for this link.
utm_medium=email&utm_source=prodlnch&utm_campaign=introducing_lookup_from_twilio_20150331&utm_content=prdlnch
It seems to be more than that. For example, I typed in my mobile phone number, and it correctly identified the operator as "Hutchison 3G UK" (i.e. 3), which it now is - but it's a number that was originally Virgin and which has been ported a couple of times since then.
For mobile numbers it sounds like this uses an HLR Lookup service, which will (in simple terms) return the Mobile Country Code (MCC) and Mobile Network Code (MNC) - e.g. MCC 234 is the UK, and MNC 20 is Hutchinson 3G (aka 3). If you were to check the number itself against a numbering plan (for the UK http://www.telecom-tariffs.co.uk/codelook.htm is a useful tool) it'd show the original operator.
Wow, $0.005 is incredibly expensive for carrier lookups. I run an SMS gateway and our cost for this is $0.0001 per lookup from our primary provider and $0.0002 from our backup provider. Of course we are dealing in bulk but Twilio should be too...
Pretty solid! Only minor issues I could spot were:
1. Wrong carrier for my mobile - number started out life with a UK MVNO (sainsbury's mobile), I have since ported it to Virgin UK (another MVNO) but Twillio lists the carrier as being EE (which is sort of correct in so much as that's who Virgin resell capacity from).
2. No carrier type info for UK voip numbers - tried two numbers, one from Telappliant and one from Andrews & Arnold, got nulls back each time :(
Re: 1, Sainsbury's Mobile is an MVNO on Vodafone, and Virgin is an MVNO on EE, so strictly speaking that's correct (see my previous answer here about how it's probably getting this info: https://news.ycombinator.com/item?id=9300690)
Re: 2, the data is available from Ofcom - maybe if you ask Twilio nicely they'll load it :)
How are you doing HLR lookups for numbers in vodafone range in the UK? I thought companies were barred from sharing this information? Apparently txtnation is not allowed to do this. Not sure how current this blog post is.
'The UK is an unusual country as far as number portability is concerned. There is no central number administration database, and Vodafone UK prevent HLR Lookups to all parties. Hence, we currently fully resolve all UK mobile numbers except Vodafone ported out. - If you query a Vodafone number our Gateway responds based on number range info. - If the Vodafone number has been ported out, our Gateway response will still come up as a Vodafone number. - If a number has been ported in to Vodafone, our Gateway response will be correct. NOTE: Vodafone UK is only reachable with the NPLU, it is still blocked with RTLU. To be more accurate, it's blocked if the number range belongs to Vodafone.'
Looks interesting but seems to be lacking a bit in the mobile number lookup department. The current service we use for mobile numbers can provide:
- Is the phone number not only valid in terms of syntax but a number actually registered to a subscriber?
- Is the subscriber currently connected to the network? (Normally indicates if their phone is switched on or off with the exception of not having a signal)
- Has the phone number or subscriber been barred or blacklisted in any way?
- Network that the number originally belonged to
- Network that the number is currently registered with. For example if they ported their number from another provider this will be different from the network the number originally belonged to.
- Network that the subscriber is currently connected to. So say if you were roaming in a different country this would return the network the phone is currently roaming on. Can be used to see if someone is out of the country.
This works mostly worldwide with a few exceptions. In a few countries we can actually determine if you are on a prepay or contract plan as well.
Yeah, I don't even know how that would be possible unless it's owned by one of the phone companies and is only available for their users. I highly doubt any telco would share that data publicly, especially if all you need is the subscriber's number.
This is likely done with something called an HLR lookup via SS7. I believe it was explained to me that HLR lookups are meant for call setup and SMS routing, NOT for exposing network information via web services, but that doesn't stop companies with SS7 access from doing it anyway since there are plenty of people willing to pay for that information.
Good feedback - appreciate you sharing. We do have geographic information with each webhook sharing city, state and zip - agree it would be useful to have this in the Lookup resources as well.
Are you able verify that the user's billing address is within a given area or return information related to that? nextdoor.com uses it to verify that you live where you say you do and I'd definitely pay to validate that information.
I don't think that'd be possible with [Local number portability](http://en.wikipedia.org/wiki/Local_number_portability). You can move your number anywhere, with a mobile number you can get a number anywhere, and with VoIP services, you don't even necessarily need to be in the US to get a US number. There's absolutely no way to verify the person actually lives where the number is supposed to be.
It would be based on the number itself. Obviously with local number portability this is not super accurate, but we do have some customers that find the data useful nevertheless.
I filed a support ticket the other day because I was curious, and this was the response I got:
```
Right now there are no plans to add this ability to this feature but I'm sure it's something we would look at as we go along. We really weren't sure this was a viable feature but enough people made noise so we developed it to help companies be more efficient when sending and calling the people they need to connect with.
```
That's because there's no real way for them to know you moved a number. Nobody knows you moved the number except the two companies involved. So, unless they had direct access to the customer records of each telco, they can only guess by the original owner.
That can't be true. If a number was ported from Carrier X to Carrier Y and someone makes a call originating from carrier Z, I am pretty sure carrier X is not involved any more in the routing of the call, which means that carrier Z has some way to figure out which carrier to route to (Y in this case). So it's not just those two companies involved.
At least in India, there exists a central database of ported numbers which every carrier uses to do the routing.
This is not true at all. I can give you the current provider of a number that had been ported and my data will reflect a new port within minutes of it taking effect. Oh, and it's an order of magnitude cheaper than what Twilio is charging for this... I couldn't tell you why Twilio's implementation is out of date and so expensive.
I don't understand what is so good about this, I've been working with this technology in Australia for years. I can get the carrier and details of any number in the world with MNP Lookups.
Swedish landlines seems to not work. I manage to lookup my old mobile phone number and it say Sweden correctly. But if I input +4686736000 I get 404 back.
Although I wouldn't go so far as to say I'm a "Twilio dev" I do implement the service whenever I need to spin up some sort of easy SMS functionality.
That said, any ideas for what you could use this for? I'm actually interested in building a sample app for it, I'm just trying to think of a sexier use case than localization and spam-detection. Is that as good as it gets?
Rob from Twilio here - thanks for using the service. Localization and fraud/spam protection are definitely the two most useful for Twilio Lookup, but suspect there are a couple more than might be less obvious.
1) Smarter Routing - quite a few developers have expressed they'd like to know whether or not a phone number is a landline or not before attempting to send a text message. Twilio Lookup will describe whether the number is mobile, landline, or voip so you can choose the appropriate communication to reach the number.
2) Error Checking - While libraries like libphonenumber are useful for determining if a number can possibly exist, there are some conditions where determining if a number does exist is more valuable. This can be used for error checking - if I as a user input a typo in my phone number (e.g. I mistype my personal phone number as '(347) 193-6073' which does not exist instead of '(347) 923-6073')
I also suspect across larger applications carrier info might also contain useful demography. For example, knowing that your users in Montana mostly use Verizon might inform your advertising to surface more CDMA devices in that market.
Ultimately this will probably end up like every other product we release - the killer use case is one we never even considered.
"Some number types don’t accept all communications -- for example, most landline numbers and many VoIP numbers do not accept SMS messages. Identify which kind of communications users can accept, based on their number type. This allows businesses to optimally decide whether to send voice or text communications for $0.005 per lookup" - from that page
When you type a landline number into my app that sends text messages it will fail. So I can choose to pay Twilio to confirm that the number can receive SMS. My users have mistyped their numbers in the past and that can be awkward when some random stranger gets a text from my system in the middle of the night.
That being said, they would charge me half a cent per lookup. I probably won't bother with local numbers, but I think I will use this for international numbers.
Additionally, since Twilio is giving me national format preference data for free, I might as well reformat a user's entered number to match their usual preference as eye candy. Although, I will just use http://www.phoneformat.com/ JavaScript library like I planned since I want to auto-format numbers as they are typed.
If you are making a site like Craigslist and want to enforce phone verification for making new accounts, you can require that users use a cell phone number instead of easily obtainable VoIP numbers. Craigslist implemented something like this in-house.
Another good use is now you can see if the robocall you received originated from a Twilio number. I looked up my Twilio numbers and they show up as "Twilio" under carrier. The page is live, so you can lookup numbers for free. You can then file a ticket with Twilio and make that person's life miserable.
FYI, there is a VoIP service from Tmobile, called t-mobile@home. The number I looked up showed up as a T-mobile mobile number. Might not be anything you can do about that.
Mmmm - great feedback. We do provide this service for our phone numbers to do a CNAM lookup on inbound communications - can see how it would be useful for Twilio Lookup as well.
When someone leaves me a message, I get an SMS with the message and caller details. I've been using OpenCNAM (https://www.opencnam.com) for the caller ID look-up.
I implemented something similar for our office so that each person has a proxy number that can be given out to clients. Voicemail is handled by a similar app, and each person also receives a Slack notification for an incoming call or voice message.
Lookup by Twilio is a bit different than OpenCNAM, but also pretty similar. They're both pretty affordable, though in the end, I'll likely create our own lookup database that we can customize.
For me, the most immediately useful info is the state/province as well as country of the incoming call. It appears that with Twilio Local, on the latter comes through. I did some tests of Lookup with a bunch of numbers, and the additional info that comes through for the paid portion of things doesn't seem that particularly useful. The (free) "national_format" is nice, but I'd say the most valuable part of the service is quickly identifying invalid and VoIP-based numbers.