question

$$ANON_USER$$ avatar image
$$ANON_USER$$ asked

How to determine if a number is likely to be able to receive an SMS before sending

I'm attempting to use the Telnyx number lookup (https://developers.telnyx.com/docs/api/v2/number-lookup) to determine if a number is able to receive an SMS before I attempt to send the message. I was assuming that I could use the ["data"]["portability"]["line_type"] field in the response for this but I'm finding that it isn't terribly accurate. Specifically, for VOIP numbers that I know can receive an SMS, the response is "fixed line" which suggests to me that it cannot receive an SMS. In this past I have done with with AWS (https://docs.aws.amazon.com/pinpoint/latest/developerguide/validate-phone-numbers.html) and receive better information about the line type than Telnyx provides.

Is what I am attempting to do reasonable? Is there some other option/field I should be using?

number-lookup
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

klane@telnyx.com avatar image
klane@telnyx.com answered

Hey! Good question. Totally makes sense what you are trying to do. It is not well documented but I believe the line types are mobile, voip, or fixed line.

Here is a sample response:

 {
 "data": {
 "caller_name": {
 "caller_name": "TELNYX LLC",
 "error_code": "10001"
 },
 "carrier": {
 "error_code": null,
 "mobile_country_code": "US",
 "mobile_network_code": 866,
 "name": "Telnyx/4",
 "type": "voip"
 },
 "country_code": "US",
 "fraud": null,
 "national_format": "(0312) 945-7420",
 "phone_number": "+13129457420",
 "portability": {
 "altspid": "073H",
 "altspid_carrier_name": "Telnyx/4",
 "altspid_carrier_type": "3",
 "city": "WAUKEGAN",
 "line_type": "voip",
 "lrn": "2245701999",
 "ocn": "073H",
 "ported_date": "2017-10-20",
 "ported_status": "Y",
 "spid": "073H",
 "spid_carrier_name": "Telnyx/4",
 "spid_carrier_type": "3",
 "state": "Illinois"
 },
 "record_type": "number_lookup"
 }
 }

For your purposes I believe line type is the most helpful field. If you have any examples where a mobile or voip number is being returned as fixed line, I'd be happy to take it to the team for investigation and clarification.

10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

$$ANON_USER$$ avatar image
$$ANON_USER$$ answered

Thanks @klane@telnyx.com. I have specific examples of Google Voice numbers being returned as "fixed line" even though I am able to send/receive SMS from/to them. I imagine this is true for all Google Voice numbers and not just mine. If you provide me a nonpublic way to send you my number, happy to share the example.

1 comment
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

klane@telnyx.com avatar image klane@telnyx.com ♦♦ commented ·

Thanks! You may share the example by email to klane@telnyx.com. Look forward to hearing from you.

0 Likes 0 ·

Manage Your Content