How to send a delivery_sm request from SMSC

I am creating an application in which mychine will act as SMSC. And from there I need to send only deliver_sm. The server will send a binding request. I need to bind my mech to the server. My application will work as smpp client. I have logica smpp.jar. But I am confused how to send only deliver_sm. Please give me some ideas and code. can anybdy, please tell me how to send an outgoing request, which will also be very useful for me. thanks Koushik.

+7
source share
1 answer

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

//you will need these classes import org.smpp.Session; import org.smpp.pdu.Outbind; Session session = .... ;//Assuming you created a session instance Outbind outbind = new Outbind(...);//assuming you created a outbind instance session.outbind(outbind);//send outbind 

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); 
+16
source

All Articles