Skip to content

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

Open
@rsha-git

Description

@rsha-git

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions