i am creating an application where my mechine will act like a SMSC. And from there i need to send only deliver_sm. The server will send the bind request. I need to bind my mechine with the server. My application will work like a 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 outbound request,,that will also be very helpful for me. thanks koushik.
Your question cannot be answered the way it is presented now. I explained two possible setups below and then solutions you are seeking. My answers are based on SMPP 3.4 spec.
Setup
Setup-1: You are creating a SMPP client
Setup-2: You are creating a SMSC
Initiating connection
Usually ESME will send a bind request to SMSC. A bind request can be send via one of "bind_transmitter", "bind_receiver" or "bind_transceiver" PDU.
The SMSC can be eager and invite an ESME to send bind request via "outbind" PDU. In this case, the SMSC has to know the IP/port of the ESME. It is rarely used.
Here a snippet of sending outbind 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 already discussed this in the setup part. Repeating here,
I am not sure why sending only "deliver_sm" is so important. As coder, you have control over the kind of PDU you are going to send.
Here a snippet of sending deliver_sm 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);