Search code examples
javasmssmppussd

Support of USSD in Logica OpenSMPP


I am using Logica OpenSMPP (http://opensmpp.org/) to manage messages via SMPP protocol. I have a server, which can answer on my SMS and USSD messages, and I am developing a client. I have already managed to send DeliverSM message and get SubmitSM response from server via SMS: first I start SMSC, and then do something like that:

        DeliverSM request = new DeliverSM();
        request.setSourceAddr(from);
        request.setDestAddr(to);
        try {
            request.setShortMessage(message);
        } catch (WrongLengthOfStringException e) {
            log.error("Error during setShortMessage", e);
        }
        request.setRegisteredDelivery((byte) 0);

        new Transmitter(this.connection).send(request);

But I encounter some problems while doing the same for USSD. I know, that I must somehow use the following (cut from SMPP V3.4 Specification):

The ussd_service_op parameter is required to define the USSD service operation when SMPP is being used as an interface to a (GSM) USSD system.

What are the steps that I need to do to learn my client send both SMS and USSD messages to server?


Solution

  • This project hosts code for sending USSD. You may consider browsing the code to see how it's done, and then implement similar features in Logica OpenSMPP.