You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
With reference to the methods below. How exactly does authourization of ESME to the SMPP server occur.
I would wish to call an API on my ruby app to cross check info and balance as part of authourization and go on to send submit message
self.handleBind = function(pdu) {
switch (pdu.command_id) {
case smpp.commands.bind_receiver:
self.bind_type = smpp.RECEIVER;
break;
case smpp.commands.bind_transceiver:
self.bind_type = smpp.TRANSCEIVER;
break;
case smpp.commands.bind_transmitter:
self.bind_type = smpp.TRANSMITTER;
break;
}
// Ask the callback (if there is one) if the credentials are okay
if (self.listeners('bind').length > 0) {
self.emit('bind', self, pdu, function(status) {
self.bindAuthorization(pdu, status);
});
} else {
self.bindAuthorization(pdu, "ESME_ROK");
}
};
self.bindAuthorization = function(pdu, status) {
var newPdu, command;
switch (self.bind_type) {
case smpp.RECEIVER:
command = "bind_receiver_resp";
break;
case smpp.TRANSMITTER:
command = "bind_transmitter_resp";
break;
case smpp.TRANSCEIVER:
command = "bind_transceiver_resp";
break;
}
newPdu = {
command: command,
command_status: status,
sequence_number: pdu.sequence_number,
fields: {
system_id: self.config.system_id
},
optional_params: {}
};
// Create a new PDU with our response
if (status === "ESME_ROK") {
self.system_id = pdu.system_id.toString('ascii');
self.bound = true;
self.socket.setTimeout(self.config.timeout * 1000);
self.socket.on('timeout', self.enquire_link);
} else {
self.bound = false;
self.bind_type = smpp.UNBOUND;
}
self.sendPdu(newPdu);
self.emit('bindSuccess', self, pdu);
};
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With reference to the methods below. How exactly does authourization of ESME to the SMPP server occur.
I would wish to call an API on my ruby app to cross check info and balance as part of authourization and go on to send submit message
self.handleBind = function(pdu) {
switch (pdu.command_id) {
case smpp.commands.bind_receiver:
self.bind_type = smpp.RECEIVER;
break;
case smpp.commands.bind_transceiver:
self.bind_type = smpp.TRANSCEIVER;
break;
case smpp.commands.bind_transmitter:
self.bind_type = smpp.TRANSMITTER;
break;
}
The text was updated successfully, but these errors were encountered: