YepMsg documentation

Routing through the control plane

The HTTP hooks YepMsg calls on your control plane: provisioning, per-message routing, receipts, records and screening, with rejects and failure behaviour.

YepMsg documentation

YepMsg documentation

  1. Overview
  2. Binds, accounts and carriers
  3. Routing through the control plane
  4. Delivery receipts
  5. Encodings and concatenation
  6. HTTPS send API and webhooks
  7. High availability and durability
  8. Operations and monitoring

Other products

The control plane decides and the gateway executes. YepMsg is always the HTTP client. It polls for accounts and carriers, asks for a decision per message, and reports receipts and records. Nothing on the message path requires the control plane to reach the gateway.

YepBoss implements these hooks. A system of your own can implement them too, and without a routing hook YepMsg routes statically to a default carrier.

The hooks

HookWhenPurpose
Provisioning (or account registry)At start and at an intervalAccounts, and with provisioning also carriers and their settings
RoutingOnce per message, synchronouslyWhich carrier, and whether to rewrite or refuse
ReceiptsPer correlated carrier receipt, asynchronouslyTell the control plane a message's delivery state
RecordsPer message, asynchronouslyBilling records, delivered from a queue of their own
ScreenOnce per message, before routingFirewall verdict from YepShield, optional

Request paths are configurable. All hooks use JSON over HTTP(S), with a bearer token configured per hook. TLS validation is on by default.

The routing hook

For each customer submit, and for each inbound message from a carrier, YepMsg sends the message as received: sender, receiver, body (readable and as exact bytes), coding, the submitting account, the time accepted, the receipt mask and a segment count. The gateway's message ID is stable across its own retries, so answer a retry the same way.

An answer can:

  • name a carrier connection, and for inbound traffic the owning account;
  • replace the sender or receiver used on the carrier leg;
  • rewrite the body, in which case the gateway re-segments it;
  • carry a decision ID and policy revision, which the gateway stamps on the message and its record;
  • refuse the message with an SMPP status and a reason.

An empty answer blocks the message. Outbound, the gateway dead-ends it: the customer sees an acceptance, the message goes nowhere and any receipt follows the customer's mask. Inbound, it is dropped.

Rejects

A reject answers the customer with the status you choose, drops the gateway's copy, returns the quota and writes a record with the status. No receipt is sent. A reject wins over any carrier in the same answer and is never retried. Typical use:

ReasonSMPP status
Account unknown, suspended or blocked by policyESME_RSUBMITFAIL
Sender not allowedESME_RINVSRCADR
Insufficient creditESME_RTHROTTLED
No rate for the destinationESME_RINVDSTADR

Failure behaviour

Control planeGateway
Registry or provisioning unreachableKeeps the last good list and retries with backoff. A cold start runs on the bootstrap configuration
Routing answers with a planExecutes it
Routing answers 5xx, times out or fails to connectRetries, then answers the customer ESME_RMSGQFUL so they resubmit
Routing answers 4xxRefuses the message with a system error, logs it and does not retry
Receipts endpoint downRetries and counts failures. The customer's receipt is never delayed
Records endpoint downThe records queue grows, and the CDR files keep being written

Screening before routing

With a screen block configured, YepMsg asks YepShield for a verdict before it calls the routing hook, for outbound and inbound messages. It performs the returned action: allow, label by rewriting the body or sender, throttle, hold, reject, dead-end or drop. The call has a hard deadline and one attempt. If it cannot be answered, the message passes as unscreened, or is refused, depending on the failure mode set per route. The verdict is passed to the routing hook and written to the record. See YepShield.

Records

YepMsg writes one record per accepted message, per inbound message delivered and per receipt delivered. Records go to append-only JSON Lines files, one per UTC day and synced per record, and optionally to the control plane. Records may arrive after the receipt for the same message and may arrive twice, so deduplicate on message ID and direction. A record the control plane refuses with a 4xx is counted and dropped, so one bad record never blocks the queue. Each record carries the decision ID, policy revision, node name, segment count and any firewall verdict.

Contract and conformance

The hook payloads are specified in a versioned contract, with minor versions additive so either side can upgrade first. A minimal conforming control plane for load tests and a set of conformance cases ship with the gateway. The contract and the tooling are provided to customers and evaluating teams on request. Get in touch.

Contact sales

Questions about YepMsg?

Ask an engineer about your deployment, or request the full interface specifications and a demonstration of YepMsg on a traffic profile like yours.

  1. We reply within one business day to arrange a time.
  2. A scoping call about your traffic, network and billing model.
  3. A demonstration on a traffic profile like yours, and a lab deployment if your engineers want one.

Prefer email? hello@yeptelcosoft.com

What would you like?
Interested in

We reply within one business day. We use your details only to respond to your request. Privacy notice