Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delivery Receipt not receiving on time at the client side. #232

Open
rsha-git opened this issue May 20, 2024 · 0 comments
Open

Delivery Receipt not receiving on time at the client side. #232

rsha-git opened this issue May 20, 2024 · 0 comments

Comments

@rsha-git
Copy link

I have a smpp session in Transceiver mode. And registered delivery has been set with SMSCDeliveryReceipt.SUCCESS_FAILURE.
And before connectAndBind() MessageReceiverListener has been set.

public void onAcceptDeliverSm(DeliverSm deliverSm) throws ProcessRequestException {
        if (MessageType.SMSC_DEL_RECEIPT.containedIn(deliverSm.getEsmClass())) {
            // delivery receipt
            try {
                DeliveryReceipt delReceipt = deliverSm.getShortMessageAsDeliveryReceipt();
                long id = Long.parseLong(delReceipt.getId()) & 0xffffffff;
                String messageId = Long.toString(id, 16).toUpperCase();
                log.info("delivery receipt '{}' : {}", messageId, delReceipt);
            } catch (InvalidDeliveryReceiptException e) {
                //
            }
        } else {
            log.info("Short message : {}", new String(deliverSm.getShortMessage()));
        }
    }

I'm using SUBMIT_SM. So, most of the time, I see that despite the registered delivery being set - Regular short message gets printed but not the delivery receipt. And when I stop the program and restart again, I get the delivery receipt of the previous message. I tried adding some delay in the client side assuming SMSC might need some time to deliver but the behavior was the same as before. Is this the expected behavior? How can I get the receipt on time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant