Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>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 <a href="http://www.nowsms.com/discus/messages/1/SMPP_v3_4_Issue1_2-24857.pdf" rel="noreferrer">SMPP 3.4 spec</a>.</p> <p><strong>Setup</strong></p> <p>Setup-1: You are creating a SMPP client</p> <ol> <li>You are creating a SMPP client. Clients usually initiate connections. Clients are also known as ESME (External Short Message Entity).</li> <li>Your client will connect to a SMSC. SMSC are servers and they usually wait for connections.</li> <li>An ESME can send messages via "submit_sm" or "data_sm" PDU.</li> </ol> <p>Setup-2: You are creating a SMSC</p> <ol> <li>A SMSC can send messages via "deliver_sm" or "data_sm" PDU.</li> </ol> <p><strong>Initiating connection</strong></p> <p>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.</p> <p>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.</p> <p>Here a snippet of sending outbind request</p> <pre><code>//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 </code></pre> <p><strong>Sending messages</strong></p> <p>I already discussed this in the setup part. Repeating here,</p> <ol> <li>An ESME can send messages via "submit_sm" or "data_sm" PDU. data_sm is not frequently used.</li> <li>A SMSC can send messages via "deliver_sm" or "data_sm" PDU. data_sm is not frequently used.</li> </ol> <p>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.</p> <p>Here a snippet of sending deliver_sm request</p> <pre><code>//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); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload