Essentials
API Essentials
ENUM integration manual

ENUM integration manual

In this article, you can learn more about how to use the Infobip ENUM interface for HLR lookups.

Connectivity

To enable connectivity between the Infobip ENUM interface and the client system, the client needs to provide a list of IP addresses which will be safelisted in the Infobip ENUM system.

ENUM query packet

There are requirements that each ENUM query must fulfill. QTYPE in the ENUM query must be NAPTR and there are additional restrictions to ENUM query parameters that must be compiled so that the query is not rejected by the ENUM server.

ENUM query packet format

ENUM Integration Manual - ENUM query packet

HEADER section of ENUM query packet

The HEADER section of ENUM query packet
  1. QR bit must be set to 0 representing DNS query.
  2. Opcode must be 0 representing a standard DNS query.
  3. It is only possible to make one ENUM query per DNS packet. Therefore, QDCOUNT value must be 1.
  4. ANCOUNTNSCOUNT, and ARCOUNT must be 0.

QUESTION section of ENUM query packet

QUESTION section of ENUM query packet
  1. QNAME must be as specified in RFC 3761. It is a E.164 number on which first a well-known rule is applied with a mandatory appended Infobip ENUM root (e.g., +442079460148 after applying first a well-known rule and appending the Infobip ENUM root 8.4.1.0.6.4.9.7.0.2.4.4.infobip.net).
  2. QTYPE must be NAPTR specified in RFC 2168.
  3. QCLASS can be any defined in RFC 1035, a standard for this service should be the internet class (IN).

Example of Valid ENUM query using dig is:

dig naptr 5.4.3.7.1.0.5.1.9.5.8.3.infobip.net @x.x.x.x

(where X.X.X.X represents IP address of the ENUM server)

ENUM server responses

ENUM server response format is compliant to RFC 1035 and RFC 3761 which means that RR that are returned only contain NAPTR RDATA, also the ENUM error responses are returned in case of error while processing the ENUM query.

ENUM response packet format

ENUM response packet format

HEADER section of ENUM response

  1. QR bit is set to 1, representing DNS response.
  2. RCODE value can be any value as per specification.

QUESTION section of ENUM response packet

It is the same as Question in the ENUM query that response is for. The Answer section is present in case there were no errors while processing the ENUM query request.

ENUM responses in case of error processing ENUM query

In case the ENUM query is successfully processed and the HLR query was successful (there was no timeout reached), an ENUM server sends a response which contains the Answer section. The Answer section contains the HLR query result in the RR for which RDATA type is NAPTR.

ENUM error response packet format

ENUM error response packet format

HEADER section of ENUM error response

  1. QR bit is set to 1, representing DNS response.
  2. RCODE value representing an error, zero value in ENUM error response will never be returned.

RCODE values in case of specific error are shown in the table below:

RCODE value

ERROR CAUSE

Packet discardedHEADER section parsing error.
FORMERRAny other ENUM query section parsing error.
SERVFAILInvalid Query
SERVFAILFailed sending HLR query
SERVFAILTimeout while for waiting HLR query response.
NXDOMAINInvalid E.164 number in the ENUM query Validity of E.164. number is checked based on the prefix (Country Code and Identification Code of number). List of all valid number prefixes which are updated on daily basis is maintained. In case that number prefix which is submitted via ENUM is not in that list HLR query is not sent to SS7 network and ENUM server responds with NXDOMAIN error.
NOTIMPLSystem failure.
REFUSEDUnknown Error 

ENUM responses in case of successfully processed ENUM query

In case the ENUM query is successfully processed and the HLR query was successful (there was no timeout reached), the ENUM server sends a response which contains the Answer section. The Answer section contains the HLR query result in the RR for which RDATA type is NAPTR.

ENUM successful response packet format

ENUM successful response packet format

PR format

ENUM RR format
  1. NAME represents the RR name, it the same as the ENUM query QNAME.
  2. TYPE is the same as the ENUM query QTYPE which is NAPTR.
  3. CLASS default returning class is internet class (IN).
  4. TTL default value is 86400 seconds (24h).
  5. RDLENGTH represents the length in bytes of NAPTR.

RDATA

NAPTR RDATA values returned by ENUM server are:

Order10
Preference100
Flags“u“
Services“E2U+pstn:tel”
Regular Expression"!^.*!tel:\1;hlr=xxxxxx;imsi=xxxxxx;msc=xxxxxx;msisdn=xxxxxx;status=xxxx"
Replacement.
hlr=xxxxxxHLR GT which is returned in the HLR response.
imsi=xxxxxxIMSI which is returned in the HLR response.
msc=xxxxxServing MSC GT which is returned in the HLR response (last 4 digits of MSC are not returned because of the possibility of SMS Fraud/Spoof using obtained routing information).
status=xxxxxxStatus of HLR query (HLR error code).
Regular Expression"!^.*!tel:\1;hlr=xxxxxx;imsi=xxxxxx;msc=xxxxxx;msisdn=xxxxxx;status=xxxx"

Example of ENUM query response using dig in case of successful HLR query:

;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 195 ;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;5.4.3.7.1.0.5.1.9.5.8.3.infobip.net. IN NAPTR ;; ANSWER SECTION: 5.4.3.7.1.0.5.1.9.5.8.3.infobip.net. 86400 IN NAPTR 10 100 "u" "E2U+pstn:tel" "!^ .*!tel:\\1\;hlr=385915017345\;imsi=219101100165275\;msc=3859\;msisdn=38591501734 5\;status=00 00" . ;; Query time: 546 msec

Example of ENUM query response using dig in case of HLR query error:

;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1696 ;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;7.0.0.0.0.6.8.9.5.8.3.infobip.net. IN NAPTR ;; ANSWER SECTION: 7.0.0.0.0.6.8.9.5.8.3.infobip.net. 86400 IN NAPTR 10 100 "u" "E2U+pstn:tel" "!^.* !tel:\\1\;msisdn=38598600007\;status=0006 ;; Query time: 383 msec

Need assistance

Explore Infobip Tutorials

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Service Terms & ConditionsPrivacy policyTerms of use