by deliberateJack · 5y ago · 0 comments
Especially in a world of number portability where you can't just say "oh, that's an old number, it must be POTS".
But I guess, here, if a number is from your contact list, it may still be POTS.
But at least you have higher assurance that it's an active user. If you wardial one day, you quickly find out how many numbers never lead to a human for various reasons. In theory, some of these are trap numbers and quickly flag the caller as suspicious, but I doubt it.
This isn't difficult - I wrote a shell script named "lookup" that will give me background info for any phone number I feed it and tell me what kind of number it is, what carrier it is, who it belongs to, etc.:
# lookup 415-333-2222
{"caller_name": {"caller_name": "WIRELESS CALLER", "caller_type": null, "error_code": null}, "country_code": "US", "phone_number": "+14153332222", "national_format": "(415) 333-2222", "carrier": {"mobile_country_code": "311", "mobile_network_code": "489", "name": "Verizon Wireless", "type": "mobile", "error_code": null}, "add_ons": null, "url": "https://lookups.twilio.com/v1/PhoneNumbers/+14153332222?Type=carrier&Type=caller-name"}
... which is very useful since I often send (personal) SMS from the command line and sometimes I need to know if a number can receive it ...I'm not going to paste the entire script here 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
... and each lookup costs a penny or a half a penny or something ... I forget ...https://news.ycombinator.com/item?id=27549075 ("Sorted Integer Compression")
main = traverse print [1..99999999]
In fact, I now wonder if you can even compress the 3.8b phone number set to less than 1 bit per phone number. It should be pretty doable since a significant chunk of the number space is not valid.