Skip to main content

smpp-connector — API Contracts

Status: populated | Last updated: 2026-04-18

smpp-connector is not fronted by Kong Gateway. It has no public HTTP API. Its primary interface is NATS JetStream (inbound consumption + outbound publication) and SMPP 3.4 (external MNO sessions).


1. NATS Subjects

1.1 Consumed Subjects

SubjectStreamConsumer groupPayload type
smpp.operator.{operatorId}SMS_DISPATCHsmpp-connector-{operatorId}SmsDispatchCommand

The subject is parameterised by operatorId (UUID). Each smpp-connector instance subscribes only to subjects for its assigned operators.

1.2 Published Subjects

SubjectStreamPayload typeTrigger
sms.dlr.inboundDLR_EVENTSDlrInboundEventMNO sends deliver_sm DLR PDU
operator.healthOPERATOR_EVENTSOperatorHealthEventSession state changes (BOUND/UNBOUND/FAILBACK)

2. Internal HTTP API (Management Only)

Served on port 3001. Not routed through Kong.

MethodPathDescription
GET/healthLiveness probe
GET/readyReadiness probe — checks SMPP session and Redis
GET/metricsPrometheus metrics scrape
GET/sessionsReturns current SMPP session states (internal ops use)

GET /sessions — Response

{
"sessions": [
{
"operatorId": "550e8400-e29b-41d4-a716-446655440001",
"operatorName": "Roshan-AF",
"state": "BOUND",
"bindMode": "TRANSCEIVER",
"lastBoundAt": "2026-04-18T10:00:00.000Z",
"reconnectAttempts": 0
}
]
}

3. Dependency: operator-management-service Internal API

smpp-connector calls this endpoint to retrieve credentials before each bind attempt.

GET /internal/operators/{operatorId}/smpp-credentials
Authorization: Bearer {internal-service-token}

Response 200:
{
"operatorId": "550e8400-...",
"host": "smpp1.roshan.af",
"port": 2775,
"systemId": "smsgtw01",
"password": "s3cr3t", ← only transmitted over mTLS; never logged
"tpsLimit": 100,
"bindMode": "TRANSCEIVER",
"backupOperatorId": "550e8400-...-0002" ← null if no backup
}

The password field is fetched from HashiCorp Vault by operator-management-service and proxied to smpp-connector over an internal mTLS connection. smpp-connector holds the password only in memory for the duration of the bind attempt.


4. SMPP 3.4 PDU Interface (External — MNO)

PDU typeDirectionPurpose
bind_transceiver→ MNOEstablish full-duplex session
bind_transceiver_resp← MNOConfirm bind
bind_transmitter→ MNOFallback TX-only bind
bind_receiver→ MNOFallback RX-only bind
submit_sm→ MNOSend outbound SMS
submit_sm_resp← MNOConfirm PDU received; contains message_id
deliver_sm← MNOInbound DLR receipt
deliver_sm_resp→ MNOAcknowledge DLR received
enquire_link→ MNOHeartbeat ping every 30 s
enquire_link_resp← MNOHeartbeat pong
unbind↔ MNOGraceful session teardown
unbind_resp↔ MNOConfirm unbind