https://github.com/joaogervasoni/smppjs
Modern approach to smpp protocol.
https://github.com/joaogervasoni/smppjs
protocol smpp smppjs
Last synced: 3 months ago
JSON representation
Modern approach to smpp protocol.
- Host: GitHub
- URL: https://github.com/joaogervasoni/smppjs
- Owner: joaogervasoni
- License: mit
- Created: 2024-04-27T14:26:01.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2026-03-04T03:56:34.000Z (3 months ago)
- Last Synced: 2026-03-04T06:39:11.342Z (3 months ago)
- Topics: protocol, smpp, smppjs
- Language: TypeScript
- Homepage:
- Size: 264 KB
- Stars: 11
- Watchers: 0
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
## About
This library is designed to provide a modern approach to smpp protocol, making easy interaction with the protocol.
### Support
- Node version `ES6, Node >=8`
- Typescript types
## Getting started
### Calling
```js
const client = new Client({ interfaceVersion: 80, debug: false });
```
Simple to call and manage.
### PDU
```js
client.bindTransceiver({ systemId: 'system', password: 'pass' });
```
Simple and clean to call a PDU.
## Examples
### Basic use
```js
const client = new Client({
interfaceVersion: 80,
debug: true,
secure: { tls: false, unsafeBuffer: false },
enquireLink: {
auto: true,
interval: 10000,
},
});
client.connect({ url: 'localhost:2775', });
client.on('connect', () => {
console.log('Connected');
client.bindTransceiver({ systemId: 'system', password: 'pass' });
client.submitSm({ esmClass: 0x00, dataCoding: 0x08, destinationAddr: '0000000000', shortMessage: { message: 'Hello!', encoding: 'ascii' } });
});
```
### Debug
You can easily receive debug information using the `debug` event, so you can implement the logging system according to your wishes.
```js
const client = new Client({
interfaceVersion: 80,
// Set debug true
debug: true,
secure: { tls: false, unsafeBuffer: false },
enquireLink: {
auto: true,
interval: 10000,
},
});
client.on('debug', (data) => {
// Use your favorite logger implementation here.
console.log(data);
});
```