Repository avatar
Other Tools
v1.0.0
active

nbrain-mena-telecom-e164

io.github.NBrain-Studio/nbrain-mena-telecom-e164

18-Arab-Country ITU-T E.164 phone normalizer, MNO carrier & 3GPP GSM-7 vs UCS-2 SMS optimizer

Documentation

nbrain-mena-telecom-e164 — 18-Arab-Country ITU-T E.164 Numbering Plan, Carrier Resolver, 3GPP GSM-7 vs UCS-2 SMS Cost Optimizer & WhatsApp HSM Linter

Engineered by Eng. Nadeem Mohamed Badr El-Din (ORCID 0009-0005-5836-2631) — Founder of NBrain (nbra.in).

Enterprise OTP, CRM, and e-commerce messaging across Saudi Arabia, Egypt, UAE, and the wider Arab world routinely suffers from two expensive failure modes:

  1. Arabic-Indic digits & Trunk-Zero E.164 corruption (+966(0)50…, ٠٠٢٠١٠…, Saudi 9200 unified vs 800 toll-free).
  2. Silent SMS Tripling (GSM-7 → UCS-2): A single curly quote (“), em-dash (—), or zero-width joiner drops SMS capacity from 160/153 septets down to 70/67 UTF-16 code units, doubling or tripling carrier gateway invoices.

Features

  • 18 Arab Countries ITU-T E.164 Normalizer: EG, SA, AE, KW, QA, BH, OM, JO, LB, IQ, PS, MA, TN, DZ, LY, SD, YE, MR with initial MNO carrier mapping and Saudi 9200/800 + UAE 800 support.
  • Exact 3GPP TS 23.038 Segment Calculator & GSM-7 Sanitizer: Counts 2-septet GSM-7 extension characters (€ [ ] { } \ ^ ~ |) and astral UTF-16 surrogate pairs accurately, and rescues smart-quote English texts back to GSM-7.
  • Saudi CST (CITC), UAE TDRA & Egypt NTRA Promotional Compliance: Enforces -AD promotional Sender-ID suffixes and 07:00–22:00 local quiet hours.
  • Meta WhatsApp Cloud API v21.0 HSM Template Linter: Catches non-sequential {{1}}..{{N}}, adjacent placeholders, and leading/trailing variables before Graph API rejection.
  • Python + JavaScript/Node + Rust (Cargo.toml) Parity: Verified across all 3 runtimes.

License: MIT