Open GoogleCodeExporter opened 9 years ago
You didn't send deliver_sm_resp manually. jsmpp already done that for you.
The possible problem is when you implementing
MessageReceiverListener#onAcceptDeliverSm(DeliverSm) you hold the method
invocation takes too long so
the response/deliver_sm_resp wait for your method done and it already pass the
transaction time, so SMSC
discard your response.
You can check this by capture TCP packet, analyze using wireshark and look for
the existence of
deliver_sm_resp.
Is there any exception or log?
Original comment by uuda...@gmail.com
on 18 Nov 2009 at 4:40
Hi uud I am stuck at a problem I used jsmpp and i have successfully sent the
msgs to the Mgs Broker and recieved the messageid but i am not able to receive
smsc response of the mobile no!
My code is bellow !!!!!! I used bind type TRX
In this class there is a method which has been called from another class !
public class ReceiverFromMsgBroker {
public static void receiverOfResponce (SMPPSession session) {
System.out.println("Session Object"+session.toString());
System.out.println("Responce Reading Start here !!!!!!!");
BasicConfigurator.configure();
// Set listener to receive deliver_sm
session.setMessageReceiverListener(new MessageReceiverListener(){
public void onAcceptDeliverSm(DeliverSm deliverSm) throws ProcessRequestException {
System.out.println("Trying to read DeliverSm if MB is sending back !!!!!!");
if (MessageType.SMSC_DEL_RECEIPT.containedIn(deliverSm.getEsmClass())) {
System.out.println("If messageType is SMSC_DEL_RECEIPT !!!!!!");
// delivery receipt
try {
DeliveryReceipt delReceipt = deliverSm.getShortMessageAsDeliveryReceipt();
long id = Long.parseLong(delReceipt.getId()) & 0x80000005;
String messageId = Long.toString(id, 16).toUpperCase();
System.out.println("received '" + messageId + "' : " + delReceipt);
} catch (InvalidDeliveryReceiptException e) {
System.err.println("receive failed");
e.printStackTrace();
}
} else {
// regular short message
System.out.println("Receiving message : " + new String(deliverSm.getShortMessage()));
}
}
public void onAcceptAlertNotification(AlertNotification alertNotification) {
System.out.println("onAcceptAlertNotification");
}
public DataSmResult onAcceptDataSm(DataSm dataSm, Session source) throws ProcessRequestException {
System.out.println("onAcceptDataSm");
return null;
}
});
}
}
Original comment by sha2nkpa...@gmail.com
on 16 Dec 2014 at 12:22
Original issue reported on code.google.com by
premab...@gmail.com
on 18 Nov 2009 at 11:17