5 ms·
I have a shell script named 'lookup' that lets me know (through twilio) the location, mobile carrier, and registered name of a phone number. I wrote it to quic
by rsync 6y ago
I have a shell script named 'lookup' that lets me know (through twilio) the location, mobile carrier, and registered name of a phone number.
I wrote it to quickly identify mobile vs. non-mobile numbers that I might text - also from the command line.
I won't paste the entire script here (mostly authentication and argument parsing) but the meat of it is:
/usr/local/bin/curl -X GET "https://lookups.twilio.com/v1/PhoneNumbers/$number?Type=carrier&Type=caller-name" -u $accountsid:$authtoken
I use this several times weekly.
EDIT: by "location" I mean their mobile country code - not their actual location which, of course, you cannot get without (ab)using SS7 which is beyond the scope of twilio ...
- Merman_Mike 6y agoWhat does a few lookups a week cost you? Just a few cents per?
- janzer 6y agoAccording to https://www.twilio.com/lookup https://www.twilio.com/lookup 1.5 cents per lookup, would be 1 cent without the carrier information.
- Merman_Mike 6y agoThanks. I've wanted to do this. Didn't know if there was some account overhead or other fees.
- fy20 6y agoIn countries which have number portability this may not always be right. For example my phone number returns Vodafone, which was the carrier it was originally assigned to 15 years ago, but I've been on other networks for over a decade.
- usr1106 6y agoWhen Finland got number portability some 15 years ago it also got a free look-up service to see the real operator of every number. This was required for price transparency. Calling within your own network can be cheaper than to a competitor and you should be able to know so before making the call. Not sure how other countries have handled that. The US had the different approach, callee pays for the mobile part. Have not looked into the issue for a decade...
- hadrien01 6y agoWhere do they get the names from?
- mct 6y agoCallerID information. There are a bunch of lookup services available for it: https://www.voip-info.org/cnam/ https://www.voip-info.org/cnam/