All posts

USSD Gateway: What It Does, Where It Breaks, and What to Ask Before You Buy One

December 1, 202622 min read
ussd-gateway

Someone dials *123# and a menu appears in under a second on a phone with no data plan, no app, and forty units of battery left. That still feels slightly unreasonable to me, thirty years after the standard was written.

It works because USSD never touches a data bearer. The whole exchange rides the signalling channel your handset already uses to tell the network where it is. Which is also why USSD behaves nothing like SMS, and why teams who come to it from a messaging background tend to design services that fall over in ways they didn't expect. They build a seven-level menu. They put a 900ms database call behind step four. Then they spend a quarter wondering why 40% of users vanish before they finish.

ussd-gateway

This is the long version: what the gateway is doing, what the protocol will and won't let you do, where deployments actually fail, and the questions that separate vendors once the datasheets start looking identical.

What a USSD Gateway Actually Sits Between

USSD is Unstructured Supplementary Service Data. It's in 3GPP TS 22.090 and 23.090 and has been part of GSM since roughly forever. The "unstructured" bit is the interesting part. The standard pins down the transport and the session mechanics but says close to nothing about what you're allowed to put in the string. Operators noticed. That gap is how a diagnostic mechanism ended up carrying agent banking.

A USSD gateway terminates those sessions on the network side and hands the content to something capable of making a decision about it. South side, it talks MAP over SS7 or SIGTRAN to the MSC, VLR and HLR. North side, HTTP or REST to whatever application server actually owns the logic.

Take that gateway out, and a dial code can only reach the HLR, which will return whatever supplementary service data it happens to hold and nothing else. Put it in and 1234*2# reaches a core banking ledger, pulls a real balance, and renders a menu, inside the session, while the subscriber waits. The translation layer is the entire product. Everything else in the box is plumbing around it. Almuqeet's USSD gateway platform occupies that slot, next to the SS7 and SMSC infrastructure handling messaging on the same core.

The thing to get into your head before anything else: there is no store-and-forward. None. An SMSC will sit on a message for six hours and keep retrying, and the way it absorbs delivery failures is so reliable that most people stop thinking about it. A USSD gateway holds a live session. Subscriber steps into a lift, session is gone. Nothing queued, nothing retried, no delivery receipt to reconcile later. Just gone.

A USSD Gateway Session, Traced End-to-End

Worth walking through slowly, because in my experience, most USSD problems are session-lifecycle problems wearing a different hat.

Subscriber dials a code ending in #. The handset recognises it as a supplementary service string rather than a phone number and pushes it up the control channel to the serving MSC/VLR. The MSC doesn't parse the digits in any meaningful sense. It matches the prefix against a routing table and, for codes provisioned to an external service, fires a MAP processUnstructuredSS-Request at the gateway's global title.

Now the gateway owns a session. It pulls out the string, maps the short code to a registered application, and opens an HTTP call carrying the MSISDN, a session ID, and whatever the subscriber typed. The app replies with text and a flag: keep going, or we're done.

Keep going means the gateway wraps the text in a MAP unstructuredSS-Request and pushes it back down. The handset shows it with an input box. Subscriber types that come back as the response to the same operation, loop repeats. We're done means a final response or an unstructured SS-Notify; the handset shows the text with an OK button, and the dialogue closes.

Three separate timers are watching all of this, and any of them can end it. The handset runs its own dialogue timer. The MSC/VLR runs a transaction timer, typically somewhere in the 30- to 180-second range, depending on the vendor and how someone configured it in 2014. And the gateway runs an application timeout of its own.

That last one has to be shorter than the network's. Not roughly similar, shorter, with margin. If your app server hangs and the gateway is still politely waiting when the MSC tears the dialogue down, you get the classic USSD failure: the subscriber sees "service temporarily unavailable," your logs show the request completed fine 400ms after the network gave up, and nobody can explain the mismatch for two weeks. Most of the time, the underlying cause is boring. A backend query took six seconds because someone deployed without an index.

Push USSD Is Where Most of the Trouble Starts

Phase 1 USSD was one direction only. Subscriber asks, network answers, done. Phase 2 added network-initiated sessions, and that split still shapes how you architect things. Pull is what everyone pictures. Dial, navigate, exit. Billing is clean because the subscriber chose to be there.

Push is the network opening a session on someone's handset without them touching anything. The gateway sends a MAP unstructuredSS-Request towards whichever VLR is currently serving that subscriber, and a menu appears on their screen while they're doing something else entirely. Operators use it for low-balance prompts, in-session upsells, and confirmation dialogues for transactions kicked off somewhere else, which is the useful case: an agent initiates a cash-out and the customer approves it on their own handset.

It's also where the abuse lives. A gateway that accepts push requests from any provisioned partner without checking whether that partner has any right to interrupt that specific MSISDN is a complaint machine, and in a few regulators' reading, a straightforward breach. If you already run consent and opt-out handling for messaging, wire USSD into the same policy engine rather than letting the VAS team build a second one with different rules.

Push has a second dependency people forget: you need to know where the subscriber is registered. That's a VLR lookup, which means the gateway needs access to the same HLR and MNP query infrastructure your routing platform uses. Pushing to a ported number using a stale VLR address doesn't error loudly. It just doesn't arrive. And a push campaign that silently isn't arriving can run for a month before anyone checks the conversion numbers closely enough to notice.

USSD Gateway Architecture, Layer by Layer

Four layers in a real deployment. Naming them helps because every vendor describes the same architecture with different words and you end up comparing things that aren't comparable.

Bottom is the signalling stack. Old deployments run MTP3 over TDM. Anything built or refreshed in the last decade or so runs M3UA over SCTP against an STP. Either way the gateway needs its own point code and global title, and GT routing has to be configured so the MSCs know where to send processUnstructuredSS-Request for your code ranges. This step causes more go-live delays than it should, usually because the routing change sits in a change-approval queue somewhere on the operator side.

Above that, the MAP layer, handling TCAP dialogues and the operation codes. This is the layer that needs to be paranoid, for reasons I'll get to.

Then the session manager. Holds state for every open dialogue: session ID, MSISDN, current menu node, application binding, timers. This component decides your actual capacity. Not CPU. Concurrent sessions times memory per session, against the average duration you really observe rather than the one in the design doc.

Top layer is the application interface. Usually HTTP with XML or JSON, plus some menu-scripting environment for services too small to justify a dedicated app server. If you're already running a CPaaS environment, exposing USSD through the same API surface is worth the integration cost. Enterprise customers will absorb one unfamiliar interface. They resent the second one.

The part that genuinely varies between vendors is redundancy, and it's worth pushing on. USSD sessions are stateful, so active-active only works if session state is replicated across nodes, or if the MSC reliably routes a given dialogue back to the same node every time. Some vendors run a replicated in-memory store. Others lean on TCAP dialogue affinity and quietly accept that a node failure drops every session sitting on it.

The second approach is cheaper, and I'd argue it's fine for a ninety-second mobile money flow. Subscriber redials, mildly annoyed, transaction completes. For a fifteen-step insurance enrolment where they've already entered a national ID number and two dependants, it's not fine at all. Which one you need depends entirely on what your longest journey looks like, so work that out before you sit down with vendors rather than after.

Why Dial Codes Outlived Every Prediction

The "smartphones will kill USSD" argument has been made confidently roughly once a year since about 2010, and it keeps not happening.

The reason isn't nostalgia. USSD works where data doesn't. It rides the signalling channel, so it functions at signal levels where a data session won't even establish. Costs the subscriber nothing in data. Runs on a fifteen-dollar handset. Needs no install, no update, no storage, which matters more than people realise for a shared household phone where three SIMs rotate through the same device.

Mobile money is the clearest case. M-Pesa was built on USSD and SIM Toolkit and the USSD path still carries an enormous share of agent and customer transactions across East Africa. Agent banking in Pakistan, Bangladesh, Nigeria, same story. These aren't stranded legacy volumes waiting for someone to migrate them. For the customers those services were designed around, this is the channel.

There's a quieter reason operators keep the gateway alive, though, and it's the one that comes up in every internal debate about decommissioning. Dial codes are the self-care channel that survives everything else. App outage, data outage, zero balance so the subscriber can't load a webpage. *123# still returns a balance. The first operator to switch it off and watch what happens to call centre volumes will presumably write a good post-mortem.

The USSD Gateway Use Cases That Actually Pay

Balance enquiry, top-up, bundle purchase. Everyone has these, and they mostly generate call-deflection savings rather than revenue, which is real money but hard to put on a slide.

The ones with revenue attached:

Mobile money and agent banking, where each session carries an actual transaction, and someone earns from it. Latency requirements here are brutal, because a subscriber standing at an agent counter with three people behind them will abandon at four seconds and blame the agent.

Microinsurance and lending distribution. Enrolment, premium deduction, claims initiation, for customers who have never opened a banking app and aren't going to.

Transaction confirmation for something started on another channel. A push USSD prompt is harder to intercept than an SMS OTP, mostly because there's no message sitting in an inbox for malware to forward. I want to be careful here, though. Harder is not the same as hard, and I've seen push USSD described as a strong authenticator in product decks in a way that doesn't survive the security section below. If you're comparing verification channels seriously, map it against flash call verification and network-sourced number verification APIs rather than picking it based on gut feeling.

Voting, subscription management, content services. Low value per session, enormous volume, and usually the bulk of what a VAS aggregator pushes through a shared gateway.

Utility and government payments are the segments growing fastest right now and also the ones with regulators paying closest attention.

Voting, subscription management, content services. Low value per session, enormous volume, and usually the bulk of what a VAS aggregator pushes through a shared gateway.

Utility and government payments are the segments growing fastest right now and also the ones with regulators paying closest attention.

Limits Your USSD Gateway Cannot Soften

These are protocol-level. No vendor can configure around them and you should be suspicious of any who implies otherwise.

ussd-protocol-limits

182 octets per string. With the 7-bit GSM alphabet, that's 182 characters, and you should design for less because handset rendering varies and older feature phones will truncate somewhere around 160 without warning you. No concatenation exists. No continuation. If your text doesn't fit, it becomes another screen, and another screen is another round trip.

Round trips are the thing that kills services. Every menu level costs the subscriber one network round trip plus your application response time. Backend at 800ms across a seven-level journey is over five seconds of dead waiting distributed through the flow, and abandonment compounds at each step rather than adding up. Operators who actually measure this tend to land on three levels to the primary action, four if you must. Beyond that, you don't have a gateway problem, you have a product scoping problem that someone has decided to solve with menus.

Encoding gets awkward in non-Latin markets. USSD supports UCS-2 for Arabic, Urdu, Amharic, Bangla and the rest, but UCS-2 cuts usable length to about 70 characters, and right-to-left rendering inside a USSD dialogue box is inconsistent enough across handsets that the only sane approach is a physical device matrix. The spec will tell you it works. The Nokia in your test drawer may disagree.

Session state doesn't survive network events. Inter-MSC handover, a few seconds of lost coverage, an incoming call arriving mid-flow: any of these ends the dialogue. So the application has to be built so that dying at step three doesn't leave a half-committed transaction. Idempotency keys on your side. Not retry logic in the gateway, which can't help you here.

USSD Gateway Security Is a Signalling Problem

This section gets skipped in most vendor material, and it's the one that should decide your shortlist.

USSD content travels in the clear above the radio interface. There's no application-layer encryption anywhere in the standard. Whatever crosses the SS7 or SIGTRAN network between MSC and gateway is readable by anyone with access to that network, and obtaining SS7 access turned out to be dramatically easier than the people who designed it in 1988 assumed. The same structural weaknesses in SS7 behind location tracking and SMS interception apply to USSD dialogues without modification.

Specific things to worry about:

Unauthorised MAP operations arriving from a foreign network. Someone with SS7 access can send MAP operations targeting your subscribers, and a gateway accepting unstructuredSS-Request without validating the originating global title against a whitelist is an open door into whatever banking flows sit behind it. This is precisely the traffic class a signalling firewall exists to filter, and USSD-bearing MAP messages need to be explicitly in the ruleset. They frequently aren't, because the firewall was scoped around SMS interception and nobody thought about the dial codes. GSMA FS.11 categories give you a starting framework and the same filtering logic that stops SS7 spoofing covers this once you point it at the right operations.

Social-engineered call forwarding, which needs no network access at all and is depressingly effective. The attacker phones the victim pretending to be support, talks them into dialling a conditional forwarding code (itself a supplementary service string), and voice OTPs start arriving at the attacker instead. Your gateway can't stop the dial. Your fraud rules can absolutely flag an account where a forwarding change is followed four minutes later by a high-value transaction attempt, and if they don't, that's a rules problem worth fixing this quarter.

Short code lookalikes. If provisioning lets a partner register a code one digit off your mobile money short code, you've built a phishing channel and volunteered your own network as the delivery mechanism. I've stopped thinking of provisioning governance as an ops process for this reason.

SIM swap chained with USSD access. Because a USSD session is bound to the MSISDN and nothing else, a successful swap hands over the entire self-care and money stack in one move. Any operator running financial services over dial codes wants SIM swap detection feeding the transaction risk engine, and the network-sourced swap signal is the least fragile way to get it.

Session flooding. Concurrent sessions are finite, so an attacker who can open thousands and hold them open to timeout takes the service down for everybody. Rate limiting per MSISDN and per originating point code should be configurable, and you want to have tested it before go-live rather than discovering the limits during an incident at 2am. Broader containment belongs with the same fraud management practice covering your voice and messaging streams, sitting behind a firewall doing granular MAP filtering.

What Really Caps USSD Gateway Capacity

Vendors quote sessions per second. On its own that number tells you almost nothing.

What decides whether you survive peak is concurrent session capacity, and concurrency is arrival rate multiplied by average session duration. 500 new sessions a second at a 40-second average means 20,000 sessions open at once. Drop the average to 20 seconds by cutting two menu levels, and you've halved the requirement without buying anything.

So your levers are application response time, menu depth, and how aggressive you're willing to be with idle timeouts. All three are yours. None of them are the vendor's.

Peak behaviour surprises people. USSD is spikier than SMS because it correlates with salary days, utility bill deadlines, and the hour after a network outage ends, when apparently every subscriber in the country checks their balance simultaneously. Size for that hour. Your monthly average is a comfortable, useless number.

Fix a latency budget early and measure the whole path: MSC to gateway to application and back. Under 500ms per round trip and subscribers stay in the flow. Between 500ms and 1.5 seconds you'll see abandonment climbing at deeper menu levels, gradually, in a way that's easy to miss. Past two seconds the service is functionally broken while every component in your monitoring reports green.

Instrumentation is where most deployments are thin. You want per-node open session counts, timeout rate split by cause rather than lumped together, application response percentiles instead of averages, and abandonment by menu node. That last one is the most valuable metric in the whole stack and I've seen it implemented maybe half the time. Without it you cannot tell that 30% of your users are quitting at the PIN entry screen, and you'll spend a year optimising a backend that was never the problem. Teams without their own monitoring practice generally fold this into managed NOC coverage rather than building the same dashboards twice.

USSD, SMS, Apps, RCS: Which Job Goes Where

These get compared as competitors when they're really doing different jobs.

ussd-vs-sms

USSD is synchronous. The subscriber is present, waiting, and the interaction has a decision in it. That's what it's for. What it's terrible at is anything the subscriber needs to keep, refer back to later, or receive while their phone is off.

SMS covers exactly that gap. Asynchronous, persistent, sits in an inbox, arrives whenever the handset reappears. Receipts, alerts, OTPs. It has its own reliability profile that USSD doesn't share, and the reasons A2P delivery rates drop have no USSD equivalent because there's no aggregator chain in the middle to lose things.

Apps buy you a real interface and offline capability in exchange for install, data, storage and update discipline. In USSD-heavy markets, financial services app install rates come in well under whatever number is in the business case.

RCS gives you rich, verified, branded messaging on Android and it is genuinely growing. It also needs data and a supported client. RCS business messaging is a real opportunity, just not with the same people who are dialling *123# on a feature phone.

Most operators run all four. The mistake isn't channel choice, it's running four disconnected stacks with four consent databases and four fraud policies that disagree. The case for putting USSD next to your messaging platform is about policy consistency more than hardware.

Questions to Put to a USSD Gateway Vendor

Datasheets converge fast. What separates vendors is what happens when you go off-script.

Start with failover. Don't ask whether sessions survive a node failure, ask them to describe what happens, step by step, and listen for whether the answer has any texture to it. Vague answers mean sessions drop. That might be acceptable, but you should know.

Then the MAP layer. Which operations will the gateway accept from an unrecognised global title, and what's the shipped default? Some ship permissive and expect you to lock down. That's a defensible engineering choice as long as it's documented and you actually do it.

On performance, push past throughput numbers and ask for session latency percentiles from a live deployment at comparable volume. p95 and p99. Lab throughput figures are close to meaningless because they're measured without your application in the loop, which is where all the latency actually is.

Concurrency needs the same treatment. How many sessions does one node hold at your expected average duration, what's the memory footprint per session, and then do the arithmetic yourself rather than accepting the headline.

Provisioning is the question nobody asks, and everybody regrets. If adding a short code needs a vendor change request, your VAS business runs at the speed of their ticket queue. Self-service with an internal approval workflow is what you want, and it's worth paying for.

Roaming is genuinely awkward in USSD, and some services need home routing to work at all for outbound roamers. A vendor who hasn't dealt with it won't bring it up, which is itself informative.

Last, integration against your particular core. A gateway built around one MSC vendor's routing behaviour will need custom development to fit anything else, and that work belongs in the original quote rather than arriving as a change request in month six. For operators without deep SS7 skills in-house, the honest question underneath all of this is whether you're running it or having someone run it. Plenty of mid-size operators land on a managed deployment because their signalling knowledge walked out the door with two engineers a few years ago, and there's no shame in that.

USSD Gateway Migration to IMS and 5G

The circuit-switched core is being decommissioned. Slowly, unevenly, and with a lot of dates that have already slipped. That's real. It doesn't mean dial codes go away.

3GPP wrote USSI, which is USSD over IMS, into TS 24.390 for exactly this reason. A VoLTE handset with no CS attachment can still send a supplementary service request, and the network either handles it in IMS or falls back to the circuit-switched domain where one still exists. Implementation quality varies a lot by handset and by IMS vendor. This is why operators keep finding that a dial code which behaves perfectly on 3G does something strange on a VoLTE-only device, and why that bug report tends to bounce between three teams before anyone identifies it as a USSI issue.

The practical position for the next several years is dual path. Your gateway terminates MAP-based USSD from the legacy core and USSI from IMS, presents both to the same application layer, and hides the difference from the service. Anyone selling you a USSD gateway in 2026 without an IMS answer is selling you a migration you'll pay for twice.

Whether 5G standalone changes any of this meaningfully, I'm less sure than the vendor decks are. The messaging side of 5G has a cleaner story because MaaP and RCS have an obvious destination. USSD doesn't have a successor with the same properties and nobody seems to be building one. Something that runs on a signalling channel, costs the user nothing, works at signal levels where data fails, and needs no install. I keep expecting someone to propose a replacement, and it hasn't happened yet.

If you're mapping this against your own network, the useful starting move is unglamorous: audit which of your dial codes carry actual transaction value, which are just self-care load, and which have been quietly running unmonitored since a VAS partner left in 2021. That third bucket is always bigger than people expect. Almuqeet's USSD gateway team usually works through that audit with an operator before proposing anything, and if the terminology across the signalling and messaging stack is unfamiliar, the telecom glossary covers most of it.

Frequently Asked Questions

What is a USSD gateway?

A USSD gateway is a network component that terminates USSD sessions from the mobile core and connects them to external applications. It converts MAP messages carried over SS7 or SIGTRAN into HTTP or REST calls, then returns the application's response to the handset inside the same live session.

How is USSD different from SMS?

USSD is session-based and real-time with no storage. SMS is store-and-forward, so messages persist and get retried if the handset is unreachable. When a USSD session ends, nothing is queued for later delivery.

What is the maximum length of a USSD message?

182 octets. That's 182 characters on the 7-bit GSM alphabet, or roughly 70 using UCS-2 for non-Latin scripts. There is no concatenation, so anything longer has to become a separate menu screen.

Does USSD work without an internet connection?

Yes. USSD runs over the GSM signalling channel rather than a data bearer, so it works with no data plan and at signal strengths too weak to establish a data session.

What is push USSD?

Push USSD, also called network-initiated USSD, is when the network opens a session on a subscriber's handset without them dialling anything. Operators use it for transaction confirmations, low-balance prompts, and in-session offers.

Is USSD secure?

Not on its own. There is no application-layer encryption in the standard, and content is readable on the signalling network between the MSC and the gateway. Security depends on signalling firewall filtering, global title whitelisting, rate limiting, and transaction-level fraud controls.

How many menu levels should a USSD service have?

Three to the primary action, four on the outside. Each level adds a network round trip plus application response time, and abandonment compounds at every step.

Will USSD survive 5G?

Yes, via USSI (USSD over IMS, 3GPP TS 24.390). Gateways need to handle both MAP-based USSD from the circuit-switched core and USSI from IMS throughout the migration, which will take years in most markets.

Who uses USSD gateways?

Mobile operators, mobile money providers, banks running agent networks, microinsurance and lending providers, and VAS aggregators in markets with high feature-phone penetration.

Why do USSD sessions fail?

Common causes are application response times exceeding the network transaction timer, coverage loss or handover mid-session, short code routing misconfiguration at the MSC, exhausted concurrent session capacity, and stale VLR data on push sessions to ported numbers.

Share this post