There seems to be a lot of renewed interest in USSD applications these days.
SMPP is very widely used as an interface into USSD systems, and because of the flexible implementation of SMPP in NowSMS, the 2-way command facility can be a convenient platform for deploying USSD services.
All USSD codes are operator specific. So they are different from SMS short codes where, at least within country, there is interoperability support amongst the operators to allow cross operator short codes.
If you want to deploy a USSD application, then you need to be a mobile operator, or you need to do it through a connection to a mobile operator’s USSD gateway. You can’t just use a GSM modem. You can’t just go to a bulk SMS provider and get a connection.
So, when we get asked questions about USSD support, sometimes it is a technical curiosity question … people looking for potentially cheaper alternatives to SMS. In those cases, generally, it is not worth pursuing.
When interfacing with USSD, it is important to realise that each vendor’s USSD interface can be somewhat different.
Having provided technical support for a number of NowSMS customers implementing USSD services, we’ve noticed a sort of “de facto” standard for how many USSD SMPP interfaces are implemented.
In general, it is quite difficult to implement a USSD service using simple 2-way SMS commands. It is possible, but it depends on how the USSD system is implemented.
Most USSD systems use an SMPP service_type of “USSD”. To set this value in NowSMS, edit SMSGW.INI, and under the [SMPP – host:port] section for the SMPP connection, add ServiceType=USSD.
Many USSD systems also use the ussd_service_op and its_session_info optional SMPP parameters.
The ussd_service_op parameter is used as it is described in the SMPP documentation.
The its_session_info parameter is used to contain a session/transaction id so that the USSD server can maintain the session state of an active USSD session.
To enable NowSMS support for these parameters, edit SMSGW.INI, and create a new section like this:
If an [SMPPOptions] section already exists in SMSGW.INI, add the above parameters to that section.
Note that the SMPP specification defines both of these parameters as octet strings, but as they contain binary values, it is easier to work with them in NowSMS by defining them as integer types.
When these parameters are used by a USSD system, the it is generally required that the its_session_info be returned back in any replies.
When simple 2-way SMS is used (e.g., “command returns response text”), NowSMS can be configured to automatically include this parameter in the response by editing SMSGW.INI, and under the [SMSGW] header adding:
When the above parameter is present in SMSGW.INI, whenever NowSMS processes a 2-way SMS command of the “command returns response text” type, where the its_session_info parameter is set. NowSMS automatically generates the its_session_info in the reply message that is generated.
It is more difficult to work with the ussd_service_op parameter. The mobile originated message will use one ussd_service_op value, and you will be expected to use a different ussd_service_op value in the reply, depending on the type of response that you wish to send. (Some USSD systems may assume that if this is not present, the reply is a simple response that should be delivered and then the session closed.)
For most applications, they will always reply back with the same ussd_service_op value for all messages. In that case, it is possible to edit SMSGW.INI, and under the [SMPP – host:port] section that defines the SMPP connection to the USSD gateway, add DefaultSMPPOptions=ussd_service_op=x … where x is the value that you want to set for this parameter. NowSMS will then set that parameter value for all messages sent via this particular SMPP connection.
If it is necessary to set different values for this parameter for different messages or message types, or you need to otherwise process either of these parameters in a 2-way command, HTTP based 2-way commands must be used.
NowSMS will automatically append “&SMPPOption_ussd_service_op=x” to the 2-way command URL when the “ussd_service_op” parameter is defined in the [SMPPOptions] section of SMSGW.INI *and* the parameter is present in a received message.
To specify any of these parameters in a reply, the 2-way command must use the “redirect response” technique described at http://www.nowsms.com/support/bulletins/tb-nowsms-003.htm
. “&SMPPOption_ussd_service_op=x” can be appended to the URL built to submit the message to NowSMS to specify a value for this option.
So far it has been our experience that a lot of USSD SMPP interfaces use the above techniques. However the SMPP standard does not fully cover USSD. In fact, the its_session_info parameter was actually defined for Korean PCS systems, not as a standard for USSD. Because of this, different vendors have taken different approaches.
We recently worked with a customer who was interfacing with the Halys UltraComp USSD Platform, which uses different techniques for encoding these parameters. You can read about experiences integrating with that platform on the NowSMS Discussion Board at http://www.nowsms.com/discus/messages/1/41585.html