Greetings, I am trying to play with this nodejs SMPP package,
here is my code:
var smpp = require('smpp');
var session = smpp.connect({
url: 'smpp://HOST_NAME:PORT',
auto_enquire_link_period: 10000,
debug: true
}, function() {
session.bind_transceiver({
system_id: 'ID',
password: 'PASS', //a password containing 8 characters including number, letter, and symbols
interface_version: '0x34' //I tried without specifying this but the result is the same
}, function(pdu) {
if (pdu.command_status === 0) {
// Successfully bound
console.log("Successfully Created Bound");
}else if(pdu.command_status === 14){
console.log("Invalid Password");
}
});
});
session.on('deliver_sm', (pdu) => {
const { short_message, destination_addr, esm_class} = pdu;
if(esm_class !== 4 && short_message.message === 'ok') { //Indicates Message Type and enhanced network services, if it's 4 then it's a delivery receipt if not in this case it is a sms message sent from SMSC
console.log("Received SMS");
}
console.log("PDU IS : " + pdu);
})
session.on('error', (e) => {
if(e.code === 'ETIMEOUT') {
console.log("Connection to SMS-C Timeout");
}else if(e.code === 'ECONNREFUSED'){
console.log("Connection to SMS-C Refused")
}else if(e.code === 'EAI_AGAIN'){
console.log("Connection to internet is lost!");
}else {
console.log(`There is something wrong connecting to SMS-C, Error code: ${e.code}` );
}
})
I am assuming command status 14 is for an invalid password as specified on SMPP Spec. But I couldn't understand how can that be possible, here is the out put of running the index.js file
The problem was an incorrect password but I am confused why the response is 14 instead of 13 which implies an incorrect password. Anyways I am happy that it is just an incorrect password.
Greetings, I am trying to play with this nodejs SMPP package, here is my code:
I am assuming command status 14 is for an invalid password as specified on SMPP Spec. But I couldn't understand how can that be possible, here is the out put of running the index.js file