Developer Docs

Table of contents

ENUM Interface

ENUM stands for Electronic Numbering Mapping. With it, you can translate telephone numbers in E.164 format into a format that can be used in Internet communications.

ENUM protocol

The background process for translating an MSISDN into ENUM format is to:

  1. Remove all non-digit characters.
  2. Add dots between each digit.
  3. Reverse the order of the digits.
  4. Add the domain e164.arpa to the end.

For example, an MSISDN in E.164 format would be input as +123456789012. Using ENUM, it would translate to: 2.1.0.9.8.7.6.5.4.3.2.1.e164.arpa.

Authentication

All ENUM queries require authentication. This is essential for the ENUM to identify which user is making the call and return the appropriate results, as well as for security reasons. For this purpose, the ENUM API uses the client’s IP address and port for authentication.

During the implementation, BSG  will provide its IP addresses for querying the Supplier ENUM service.

The parameters used in addition to IP address and port number are:

ParameterDescription 
NAPTRThe record type used
e164.arpaThe domain

How to connect

Please find the IP address and port number for our ENUM Lookup Server in the table below. The only identifier needed to connect is the IP address you connect from.

Number Lookup ENUM ServerHost:Port
Primary MNP141.95.255.235:5003
Primary HLR141.95.255.235:5001
Test MNP141.95.255.235:5004
Test HLR141.95.255.235:5002

Examples

MNP

Example of ENUM query over BSG MNP Server

Example of ENUM Query from BSG MNP Server:

dig -p 5003 @141.95.255.235 X.X.3.2.9.6.1.3.6.0.8.3.e164 -t naptr

Query would be then for NAPTR record for  X.X.3.2.9.6.1.3.6.0.8.3.e164

A successful query response will return NAPTR record with Operator’s MCC and MNC or SPID in Answer section:

; <<>> DiG 9.18.1-1ubuntu1.2-Ubuntu <<>> -p 5003 @141.95.255.235 X.X.3.2.9.6.1.3.6.0.8.3.e164 -t naptr
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53336
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;X.X.3.2.9.6.1.3.6.0.8.3.e164.  IN      NAPTR

;; ANSWER SECTION:
X.X.3.2.9.6.1.3.6.0.8.3.e164. 300 IN    NAPTR   100 10 "U" "E2U+pstn:tel" "!^(.*)$!<result:1;mcc:255;mnc:06;status:active>!" .

;; Query time: 23 msec
;; SERVER: 141.95.255.235#5003(141.95.23.137) (UDP)
;; WHEN: Thu Nov 10 14:42:11 EET 2022
;; MSG SIZE  rcvd: 127

Our SMS Platform supports the following combination of response fields:

  • Fields “mcc” and “mnc”, for example mcc=255;mnc=06.
  • Field “ported” provides ported status (boolean value).

HLR

Example of ENUM query over BSG HLR Server

Example of ENUM Query from BSG MNP Server:

dig -p 5001 @141.95.255.235 X.X.3.2.9.6.1.3.6.0.8.3.e164 -t naptr

Query would be then for NAPTR record for X.X.3.2.9.6.1.3.6.0.8.3.e164

Example of ENUM response from Supplier ENUM HLR Server

; <<>> DiG 9.18.1-1ubuntu1.2-Ubuntu <<>> -p 5001 @141.95.255.235 2.1.3.2.9.6.1.3.6.0.8.3.e164 -t naptr
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22152
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;X.X.3.2.9.6.1.3.6.0.8.3.e164.  IN      NAPTR

;; ANSWER SECTION:
X.X.3.2.9.6.1.3.6.0.8.3.e164. 300 IN    NAPTR   100 10 "U" "E2U+pstn:tel" "!^(.*)$!<error:0;country_name:Ukraine;brand:lifecell;brand_name:lifecell LLC;msisdn:3806316923XX;network:25506;status:active>!" .

;; Query time: 256 msec
;; SERVER: 141.95.255.235#5001(141.95.255.235) (UDP)
;; WHEN: Tue Nov 10 14:42:21 EET 2022
;; MSG SIZE  rcvd: 205

ENUM Result code

All successful requests have a code: result=1.

All requests with errors have a code: error=1 and error description.