LRN Data Overview

We’ve released a new version (1.1) of the Local Routing Number (LRN) Lookup API so you can take full advantage of NPAC 10-digit numbers. You’ll find step-by-step instructions on how to migrate to the latest version of the API here. It’s important you do this, because we plan to remove version 1 by the 31st of August 2019.

The LRN Data API allows you to look up Local Routing Number (LRN/LNP) information. There are two LRN endpoints: Get LRN and Get Extended LRN. The plain endpoint contains just the LRN while the extended endpoint contains the LRN and some additional data such as the carrier, whether or not the number was ported and native telephone block information.

The LRN Data API can be used in:

  • Routing (perform a dip to retrieve the LRN and based on whether the number has been ported route the call to its ultimate destination)
  • Billing (validating that the calls in the past were billed and or routed correctly by checking LRNs for the telephone number against the LRNs in the CDRs)
  • Billing (inter/intra regions or carriers are sometimes billed differently than normal calls based on your agreements)
  • Modeling legitimate calls in order to detect fraud

You can use the Standard LRN HTTP endpoint, or a ENUM (DNS), SIP or XML through UDP request to get the LRN for a number that's typically used for routing and/or rating.

If you need to look up detailed information regarding a number, such as the carrier name, carrier type, or the line type of a number, the Extended LRN endpoint should be used.

HTTP ENDPOINTS

ENUM, SIP, XML UDP ENDPOINT

  • lrnlookup.telnyx.com

Authenticating Requests

HTTP Token Authentication

HTTP requests will require an Authorization header with Token as the authentication type. To get the token value, generate a new API token from the Auth page. Name your token something unique to distinguish it from other platform API tokens, eg. "LRN Data".

HTTP HEADER

Copy
Copied
Authorization: Token MY_TOKEN

Note: After pasting the above content, Kindly check and remove any new line added

Enable ENUM, SIP and XML UDP IP Authentication

Contact us at support@telnyx.com to authorize your IP address to access the LRN Data API.

cURL

Copy
Copied
--header "Authorization: Token MY_TOKEN"

Note: After pasting the above content, Kindly check and remove any new line added

Getting Started with Telco Data: LRN

HTTP vs ENUM, SIP, or XML UDP Requests

The LRN Data HTTP REST endpoint can be used for most use cases if your system supports HTTP. If you are working with a system that has LRN query support built-in, you may choose to use ENUM (DNS), SIP or XML UDP requests to fetch LRN data instead. Note, as ENUM, SIP and UDP requires IP Authentication, you cannot use an API token generated on the Portal to authenticate API requests made using non-HTTP mechanisms.

Authentication Requirements

HTTP requests do not require any additional requirements other than an API token. You will need to contact Telnyx in order to authorize your IP address to access the LRN Data API through ENUM, SIP or XML UDP. Contact us at support@telnyx.com to get started.

Glossary

Telco Data Numbering and calling metadata, frequently used by telecom providers to query for call information