发送消息在PDU中收到不同的结果"/>
SMPP发送消息在PDU中收到不同的结果
在Nodejs中实现使用node-smpp库和Selenium SMPPSim Simulator
const smpp = require('smpp');
const session = new smpp.Session({host: 'localhost', port: 1234});
session.on('connect', () => {
isConnected = true;
session.bind_transceiver({
system_id: "SYSTEMID",
password: "PASSWORD",
}, (pdu) => {
if (pdumand_status == 0) {
console.log('smpp connected !')
}
})
})
//**all pdu listener**
session.on('pdu', (pdu)=>{
console.log(pdu)
})
function sendMessage(from, to, text){
from = `+${from}`
to = `+${to}`
session.submit_sm({
source_addr: from,
destination_addr: to,
short_message: text
}, function(pdu) {
console.log(pdu)
if (pdumand_status == 0) {
console.log(pdu.message_id);
}
});
}
sendMessage("1111", "2222", "Hello World!")
在sendMessage()]方法调用时输出:
:时PDU { command_length: 18, command_id: 2147483652, command_status: 0, sequence_number: 2, command: 'submit_sm_resp', message_id: '3' }
这里我正在使用SMPPSim MO注射剂输出:当发送硒模拟器的消息
,这是由于本地计算机引起的吗?或者是其他东西 ??需要帮助来了解这种行为。PDU { command_length: 63, command_id: 5, command_status: 0, sequence_number: 8, command: 'deliver_sm', service_type: '', source_addr_ton: 1, source_addr_npi: 1, source_addr: '111111', dest_addr_ton: 1, dest_addr_npi: 1, destination_addr: '222222', esm_class: 0, protocol_id: 0, priority_flag: 0, schedule_delivery_time: '', validity_period: '', registered_delivery: 0, replace_if_present_flag: 0, data_coding: 0, sm_default_msg_id: 0, short_message: { message: 'Hello from SMPPSim' } }
两个结果之间都感到困惑,如果消息使用sendMessage()方法发送,那么为什么它仅返回submit_sm_resp
在Nodejs中使用node-smpp库和Selenium SMPPSim Simulator实现const smpp = require('smpp'); const session = new smpp.Session({host:'localhost',port:1234}); session.on('connect',()...
回答如下:更多推荐
SMPP发送消息在PDU中收到不同的结果
发布评论