Unsupported PDU Type deliver_sm

334 views
Skip to first unread message

Umoh Bassey-Duke

unread,
Aug 20, 2015, 5:00:52 AM8/20/15
to Jasmin SMS Gateway
Hi,

I'm trying to send an SMS-MO message to jasmin using cloudhopper-jsmpp.

Here's what my client code looks like.

DefaultSmppClient clientBootstrap = new DefaultSmppClient(Executors.newCachedThreadPool(), 1, monitorExecutor);

DefaultSmppSessionHandler sessionHandler = new ClientSmppSessionHandler();

SmppSessionConfiguration config = new SmppSessionConfiguration();
config.setWindowSize(1);
config.setName("Tester.Session.0");
config.setType(SmppBindType.TRANSCEIVER);
config.setHost("127.0.0.1");
config.setPort(2775);
config.setConnectTimeout(10000);
config.setSystemId("smppuser");
config.setPassword("smpppass");
config.getLoggingOptions().setLogBytes(true);
config.setRequestExpiryTimeout(30000);
config.setWindowMonitorInterval(15000);
config.setCountersEnabled(true);

SmppSession session = clientBootstrap.bind(config, sessionHandler);

String message = "Testing sms from cloud hopper";

try {
byte[] textBytes = CharsetUtil.encode(message, CharsetUtil.CHARSET_UCS_2);

DeliverSm deliver = new DeliverSm();
deliver.setSourceAddress(new Address((byte)0x03, (byte)0x00, "40404"));
deliver.setDestAddress(new Address((byte)0x01, (byte)0x01, "44555519205"));
deliver.setShortMessage(textBytes);

WindowFuture<Integer,PduRequest,PduResponse> future = session.sendRequestPdu(deliver, 10000, false);
if (!future.await()) {
logger.error("Failed to receive deliver_sm_resp within specified time");
} else if (future.isSuccess()) {
DeliverSmResp deliverSmResp = (DeliverSmResp)future.getResponse();
logger.info("deliver_sm_resp: commandStatus [" + deliverSmResp.getCommandStatus() + "=" + deliverSmResp.getResultMessage() + "]");
} else {
logger.error("Failed to properly receive deliver_sm_resp: " + future.getCause());
}
} catch (Exception e) {}


However, I keep getting the following error in my connector


2015-08-20 11:54:26 WARNING  21847 SMPP connection established from 127.0.0.1 to port 2775
2015-08-20 11:54:26 INFO     21847 Added bind_transceiver bind for 'smppuser'. Active binds: bind_receiver: 0, bind_transceiver: 1, bind_transmitter: 0.
2015-08-20 11:54:26 INFO     21847 Bind request succeeded for smppuser in session [906cd186-79f6-417d-881e-03f271c67244]. 1 active binds
2015-08-20 11:54:26 CRITICAL 21847 Received unsupported pdu type: deliver_sm
2015-08-20 11:54:26 WARNING  21847 Shutdown requested...unbinding
2015-08-20 11:54:26 INFO     21847 Waiting for in-progress transactions to finish...
2015-08-20 11:54:26 WARNING  21847 Issuing unbind request
2015-08-20 11:54:26 WARNING  21847 Unbind succeeded
2015-08-20 11:54:26 WARNING  21847 Disconnecting...
2015-08-20 11:54:26 INFO     21847 Dropped bind_transceiver bind for 'smppuser'. Active binds: bind_receiver: 0, bind_transceiver: 0, bind_transmitter: 0.
2015-08-20 11:54:26 WARNING  21847 SMPP 127.0.0.1 disconnected from port 2775: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionDone'>: Connection was closed cleanly.
]

Can anyone point me to what I'm doing wrong? I'm basically trying to create a JSMPP client that can send and receive messages from jasmin.

Regards

zoufou

unread,
Aug 22, 2015, 8:30:10 AM8/22/15
to Jasmin SMS Gateway
Hi,

Your smpp client (ESME) is trying to send a deliver_sm through Jasmin and this is not the flow Jasmin is handling, you must be sending a submit_sm through Jasmin and receiving a deliver_sm from it:
  1. ESME ---> Jasmin direction:
    bind / unbind
    submit_sm
    enquire_link
  2. ESME <---- Jasmin direction
    deliver_sm

Nick Kutuzov

unread,
Feb 6, 2016, 8:12:31 AM2/6/16
to Jasmin SMS Gateway

I get a similar error when working with one operator:

CRITICAL 1 Received unsupported pdu type: query_sm

When i sending over jasmin smpp interface my SMS , by MTrouter
#12    StaticMTRoute           0 (!)      smppc(SMSLAB)                                    <DA (dst_addr=^7916\d+)>                                       
#11    StaticMTRoute           0 (!)      smppc(PROSTOR)                                   <SM (msg=^prostor.*$)>    

If my number 7916.... i got error, if message "prostor...." - all is ok, i got sms.


jcli : smppccm -s SMSLAB
ripf 0
con_fail_delay 10
dlr_expiry 86400
coding 0
logrotate midnight
submit_throughput 0
elink_interval 30
bind_to 30
port 2775
con_fail_retry yes
password Jfn8dSdf
src_addr iteco_test
bind_npi 0
addr_range None
dst_ton 1
res_to 120
def_msg_id 0
priority 0
con_loss_retry yes
username iteco_t2
dst_npi 1
validity None
requeue_delay 120
host 95.163.79.200
src_npi 1
trx_to 300
logfile //var/log/jasmin/default-SMSLAB.log
systype
cid SMSLAB
loglevel 40
bind transceiver
proto_id None
dlr_msgid 2
con_loss_delay 10
bind_ton 0
pdu_red_to 10
src_ton 2


What am I doing wrong ? The operator says the error is on my side.
Using another operator's SMS - solves the problem.
But I think this is a bad decision.



Bruno C

unread,
Feb 6, 2016, 3:42:46 PM2/6/16
to Jasmin SMS Gateway
Please activate debug loglevel in smpp connector config and reshare the log.


On Thursday, 20 August 2015 10:00:52 UTC+1, Umoh Bassey-Duke wrote:

Nick Kutuzov

unread,
Feb 9, 2016, 1:38:34 PM2/9/16
to Jasmin SMS Gateway
We found problem , if i use in client software source_addr = iteco_test , in jasmin platform  it's transform to :
source_addr: 'iteco\x11test'
and we have in  PDU :
status:ERROR/ESME_RINVSRCADR] [retry:False] [prio:0] [dlr:SMSC_DELIVERY_RECEIPT_REQUESTED] [validity:none] [from:iteco (special symbol 0011)test] [to:19671261107] [content:.!.K.=. .=.0.1.5.@.8. .<.5.=.O. .5.A.;.8. .2.8.4.8.H.L. .M.B.C. .!.!...0.?.0. ]

we just change source_addr to itecotest.
Thx.

Reply all
Reply to author
Forward
0 new messages