in Technology

USSD 101 part 2

Brief Overview of  Traffic within the Core Network

In the previous post, Part 1 of this series, we were able to breakdown the USSD MMI code.  Taking this further, we will look at how the Mobile Network handles our request.

Between your Mobile phone and the Telecom operator’s USSD Gateway, there are numerous components, including the radio and BTS, BSC , HLR and the MSC. However, because this isn’t a core telecom’s tutorial, we are going to mention only the MSC, HLR and the VLR.

The Mobile Switching Centre (MSC) is the main switching equipment of the GSM network.  The MSC handles the routing of VOICE and SMS traffic within the network. The MSC sets up end-to-end connection for call set up and tear down.


End to End USSD Handlers

Nodes within the core network are able to understand and route USSD request because they have in built USSD handlers. These handlers have the capability of routing USSD traffic to the appropriate destination.

USSD Handlers in Core network elements

As you can see, the request originates from the USSD Handler within the Mobile Phone and it is immediately handled by the USSD Handler within the network node. The node that handles the USSD request is determined by the type of USSD service code.

According to the GSM0290 standard,  there are  two types of service codes: VPLMN and HPLMN service codes;

HPLMN service codes always routes the USSD string to the HLR while VPLMN service codes routes the string to the MSC/VLR.



Core Network Traffic Routing



Nodes within the Core network communicate via a Signalling System called SS7.  And to handle routing of these SS7 traffic, we have routers called Signalling Transfer Points (STPs), which are meant to route the SS7 traffic among these numerous signalling nodes.

As you can see in the diagram, the USSD Gateway or any other node is likely to connect to the core network nodes via the STP network. To enable the USSD GW communicate with an STP, a dedicated Signalling Appliance/Server is usually provided with the USSD GW.

How does the STP network know which node to route traffic too? It turns out each of the nodes in an SS7 network have what we call Point Codes.  This is similar to IP Addresses within an IP network.

As such, every signalling message, will have originating Point code (OPC) and Destination Point Code (DPC).

USSD Traffic Routing

To provide USSD services, the Core network team will typically provision a USSD service code and map it to the appropriate USSD Gateway point code. Once the USSD code has been provisioned,  subscribers are then able to dial the USSD code to access a service.

When the core network receives a USSD request from the subscriber, it is forwarded to the appropriate USSD Gateway configured for that USSD service code.

SS7/MAP Traffic

Like IP, the SS7 protocol is made up of stacks (Application, Network, Data Link and Physical layers). At the SS7 application layer is the MAP protocol which is used to access services on the Core network nodes.  The MAP protocol is used to carry  USSD traffic among these nodes.

MAP traffic is hence exchanged between the Core network (STP/HLR) and the USSD Gateway.  The MAP traffic coming from the network to the USSD Gateway can be seen in real time by taking a PCAP trace on the USSD Gateway.

USSD Services

The USSD Gateway receives every USSD request (those not directed at any other network node). The USSD GW can serve this request and respond appropriately to the subscriber through the core Network.

Figure  4 below shows a USSD GW responding to all USSD requests directly. In this scenario, all interactions terminate on the USSD GW.

USSD Traffic

Fig 4. USSD Traffic

In Figure 5 below however, the USSD GW is capable of forwarding requests to 3rd party applications. Typically, this is the case for 3rd parties that want control over the response to the users.

In this scenario, the USSD GW could initiate web services call for every request coming from the Users. On the other hand, 3rd party applications can maintain socket/smpp connection to the USSD GW to receive requests coming from the users.

USSD Traffic to 3rd party Application Server

Fig 5. USSD Traffic to 3rd party Application Server

As seen in Fig 5, the most common interface for 3rd party servers to interact with the USSD GW is through the SMPP protocol. However, more capable USSD Gateways have added custom interfaces that range from XML over TCP socket to HTTP web service interfaces.

USSD Sessions

The USSD GW is capable of maintaining a two-way back and forth communication with the subscriber.  This is made possible by the fact that the USSD GW and the core network creates and maintains a dialog/session for every USSD request.

To be continued…


Write a Comment



  • USSD 101 | Open Rants

    […] Part 2 >>>> […]