法哈迪,我真的很难让smpp节点开始工作。当我尝试你的例子时,我会得到这个错误。
{"command_length":16,"command_id":2147483657,"command_status":13,"sequence_number":1,“bind_transceiver_resp”}。我试着去做,我得到了
(/Users/tinyiko/MyCode/MyApp/node_modules/smpp/lib/pdu.js:21:37) = commandscommand.id;^ TypeError:无法读取未定义的属性'id‘在新的PDU this.command_id at PDU.response PDU.response at Array。(/Users/tinyiko/MyCode/MyApp/sendmessage.js:12:52) at Session._extractPDUs (/Users/tinyiko/MyCode/MyApp/node_modules/smpp/lib/smpp.js:62:40) at Socket.emit (events.js:104:17) at emitReadable_ (_stream_readable.js:424:10) at emitReadable (_stream_readable.js:418:7) at readableAddChunk (_stream_readable.js:174:11) at Socket.Readable.push (_stream_readable.js:126:10)
这是我正在尝试的密码..。
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));
}
});
}
});发布于 2016-02-29 16:28:53
基于SMPPV5.0规范,command_status=0x0D意味着:
绑定失败了。绑定尝试的一般失败场景。这可能是由于配置错误、密码错误或其他原因造成的。对于可能导致绑定失败的无效system_id、system_type、密码或其他属性,MC通常会返回此错误。
https://stackoverflow.com/questions/33354699
复制相似问题