Your question cannot be answered as it is presented now. I explained the two possible settings below, and then the solutions you are looking for. My answers are based on the SMPP 3.4 specification .
Customization
Setup-1: you create an SMPP client
- You are creating an SMPP client. Clients usually initiate connections. Customers are also known as ESME (External Short Message Organization).
- Your client will connect to SMSC. SMSCs are servers, and they usually wait for a connection.
- ESME can send messages through the submit_sm or data_sm PDUs.
Setup-2: you create SMSC
- SMSC can send messages via the deliver_sm or data_sm PDUs.
Initiating connection
Typically, the ESME sends a binding request to the SMSC. A binding request can be sent through one of the bind_transmitter, bind_receiver, or bind_transceiver blocks.
The SMSC may be impatient and invite the ESME to send a binding request through the outbind PDU. In this case, the SMSC must know the IP / port of the ESME. It is rarely used.
Here is a snippet of sending an outgoing request
Sending messages
I have already discussed this in terms of installation. Repeating here
- ESME can send messages through the submit_sm or data_sm PDUs. data_sm is not often used.
- SMSC can send messages via the deliver_sm or data_sm PDUs. data_sm is not often used.
I'm not sure why sending only "deliver_sm" is so important. As an encoder, you have control over the PDU you are about to send.
Here is a snippet from sending a sm_ delivery request
//you will need these classes import org.smpp.Session; import org.smpp.pdu.DeliverSM; DeliverSM pdu = new DeliverSM(); pdu.setSequenceNumber(1);//set unique numbers pdu.setSourceAddr(new Address(1, 1, "12120001234"));//TON, NPI, source number pdu.setDestAddr(new Address(1, 1, "12120004321"));//TON, NPI, destination number pdu.setShortMessage("Hello world"); session.deliver(pdu);
Wahid sadik
source share