Main Components

📦v1.0.0📅2026-03-10🔄Updated 2026-04-28👤Admin Team
conceptssms-gateway-proxysmssmppcomponentsarchitecture

1. SMS Service Layer

Implements the core business logic for SMS submission through a multi-step validation and processing pipeline.

  • Validation Steps: Validates ESME ID, application existence, ESME connectivity, and transaction UUID
  • Contact Policy Checks: Applies blacklist validation and registration filter checks
  • Message Submission: Routes approved messages through the SMPP gateway
  • Journal Recording: Records all submission attempts together with message statistics
  • Monitoring: Captures metrics for each processing step, including success/failure rates and execution timing

2. SMPP Infrastructure

Manages SMPP connectivity, session lifecycle, and message transmission.

  • Multiple ESME Support: Supports concurrent operation of multiple SMPP client connections
  • Connection Management: Handles bind/unbind operations, connection state monitoring, and automatic reconnection
  • Message Processing Strategies:
    • Single-part messages using standard submission
    • Multi-part messages using UDH concatenation
    • Payload mode using TLV field transmission
  • Encoding Support: Supports GSM7 (DefaultType), Latin-1, and UCS-2 (Unicode) encodings
  • Rate Limiting: Provides configurable per-ESME throughput control as a planned feature

3. Statistics & Journaling

Tracks message lifecycle events and persists operational records.

  • In-Memory Cache: Uses a TTL-based cache for active message sessions
  • Journal System: Implements asynchronous file-based logging with rotation and export support
  • State Tracking: Stores message lifecycle states such as scheduled, submitted, delivered, and failed
  • Export to S3: Automatically exports journal files to external object storage

4. SMPP Listener

Processes incoming SMPP PDUs, primarily delivery receipts.

  • Delivery Reports: Handles deliver_sm messages containing delivery status updates
  • Status Mapping: Maps SMPP delivery states to internal application states
  • Binary Parsing: Extracts delivery metadata from TLV fields
  • Statistics Updates: Updates message status in the statistics cache

5. Data Models

Defines the core domain entities used across the system.

  • SMS Model: Represents the full SMS entity, including addressing and validation attributes
  • Statistics Model: Extends SMS data with tracking fields such as errors and SMPP states
  • Delivery Status: Parses and structures delivery receipt information
  • Helper Methods: Provides utility methods such as address normalization and privacy-safe hashing

6. Validation Helper

Analyzes message payload characteristics before submission.

  • Length Calculation: Calculates message length and required segment count
  • Encoding Detection: Detects the character encoding required for transmission
  • Part Estimation: Determines how many SMS parts are needed for delivery