farhadi / node-smpp

SMPP client and server implementation in node.js
MIT License
419 stars 180 forks source link

deliver_sm not accepting from ESME side #199

Closed lahirutm closed 2 years ago

lahirutm commented 2 years ago

I have developed an SMSC using node_smpp library. Almost everything working fine. But when i send delivery report to client side smpp application it sending me the delivery_sm_resp without message id, also client said DLR is not updated in the application.

here is my code for sending DLR

session.deliver_sm({
    esm_class: 4,
    source_addr: '0712345678',
    destination_addr: '0787654321',
    short_message: {
        message: 'id:0000029095 sub:001 dlvrd:001 submit date:211125034959 done date:211125035001 stat:DELIVRD err:000 text:'
    },
    receipted_message_id: '0000029095',
    user_message_reference: '0000029095'
});

This is the response received from the client side.

 {
    command_length: 17,
    command_id: 2147483653,
    command_status: 0,
    sequence_number: 8,
    command: 'deliver_sm_resp',
    message_id: ''
}

Please let me know if anyone know the exact issue.

juliangut commented 2 years ago

Hi @lahirutm

You're seeing the correct behaviour, when you send a deliver_sm (with messageId) the response to that PDU is simply an ack (which is the deliver_sm_resp)

In fact on your side you do not need the deliver_sm_resp to have the messageId because you're the one sending the deliver_sm with messageId and per how the library works you'll receive this deliver_sm_resp on the callback for the corresponding submit_sm

to sum up, you're experiencing the normal flow of work

juliangut commented 2 years ago

Closing as I believe it's already been answered. Feel free to reopen if needed