farhadi / node-smpp

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

send the ack #220

Closed javad-zobeidi closed 2 years ago

javad-zobeidi commented 2 years ago

i send sms to horisen overe smpp using node-smpp

first i make bind_transceiver then i do submit_sm then i send the response with submit_sm_resp

but the horisen said replay is wrong

this is my code

I want to send ack then horisen can send the SMS to the number


var smppSession = smpp.connect({
    url: `smpp://smppServerIp:2775`,
    auto_enquire_link_period: 10000,
    debug: false
}, function() {
    smppSession.bind_transceiver({
        system_id: system_id,
        password: password
    }, function(pdu) {

        smppSession.on("deliver_sm", function (deliver_pdu) {
          console.log(deliver_pdu);
        });

        if (pdu.command_status === 0) {
            smppSession.submit_sm({
                source_addr: source_addr,
                destination_addr: number,
                short_message: message
            }, async function(pdu) {
                if (pdu.command_status === 0) {
                    smppSession.submit_sm_resp({"message_id" : pdu.message_id});
                }
            });
        }
    });
});
javad-zobeidi commented 2 years ago

i got this error ?

Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -104, code: 'ECONNRESET', syscall: 'read' }