Javascript 在bind_收发器期间使用smpp节点时出错
Farhadi,我真的很难让smpp节点正常工作。我在尝试你的例子时遇到了这个错误 {command_length:16,command_id:2147483657,command_status:13,sequence_number:1,command:bind_resp}。我试着去做,但我成功了 this.command\u id=commands[command].id; ^ TypeError:无法读取未定义的属性“id” 在newpdu/Users/tinyiko/MyCode/MyApp/node_modules/smpp/lib/PDU.js:21:37 在PDU.response/Users/tinyiko/MyCode/MyApp/node_modules/smpp/lib/PDU.js:80:9 在阵列上/Users/tinyiko/MyCode/MyApp/sendmessage.js:12:52 在会话中。_extractPDUs/Users/tinyiko/MyCode/MyApp/node_modules/smpp/lib/smpp.js:62:40 在Socket.emit events.js:104:17 在emitReadable_uu_ustream_ureadable.js:424:10 在emitReadable _stream_readable.js:418:7 在readableAddChunk\u stream\u readable.js:174:11 在Socket.Readable.push_stream_Readable.js:126:10 这是我正在尝试的代码Javascript 在bind_收发器期间使用smpp节点时出错,javascript,node.js,smpp,Javascript,Node.js,Smpp,Farhadi,我真的很难让smpp节点正常工作。我在尝试你的例子时遇到了这个错误 {command_length:16,command_id:2147483657,command_status:13,sequence_number:1,command:bind_resp}。我试着去做,但我成功了 this.command\u id=commands[command].id; ^ TypeError:无法读取未定义的属性“id” 在newpdu/Users/tinyiko/MyCode/MyAp
var smpp = require('smpp');
var session = smpp.connect('bulksms.2way.co.za', 2775);
console.log(session);
session.bind_transceiver({
system_id: '673293',
password: 'passwordxxx'
}, function(pdu) {
if(pdu.command_status == 13){
console.log("session" + pdu.command_status);
pdu.response();
console.log(JSON.stringify(pdu));
}
if (pdu.command_status == 0) {
// Successfully bound
console.log('bound bind_transceiver')
session.submit_sm({
destination_addr: '0847849574',
short_message: new Buffer("Hi, Froxtel interview SMS/email has been sent by company only. Its not any related to freshersworld. U can contact directly company or call 08688805062/3.Please ignore the word freshersworld in sms/mail.regards Froxtel team.","utf8"),
source_addr:'FROXTL',
registered_delivery:1,
data_coding:0,
}, function(pdu) {
if (pdu.command_status == 0) {
// Message successfully sent
console.log(JSON.stringify(pdu));
}
});
}
});
根据SMPP v5.0规范,命令_status=0x0D表示: 绑定失败。绑定尝试的一般失败场景。今年五月 可能是由于设置错误、密码不正确或其他原因。A. MC通常会为无效的系统id返回此错误, 可能导致绑定的系统类型、密码或其他属性 失败