npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@leissner/node-red-smpp

v1.1.4

Published

Node-RED nodes for sending and receiving SMS via SMPP, wrapping the smpp package.

Readme

@leissner/node-red-smpp

CI Coverage

Node-RED nodes for sending and receiving SMS via SMPP, built on top of the smpp npm package.

Nodes

  • smpp-config — shared connection/bind configuration (host, credentials, bind mode, TLS). Manages the underlying SMPP session, including automatic reconnect with backoff.
  • smpp-out — submits an SMS (submit_sm) to the bound SMSC.
  • smpp-in — receives inbound messages and delivery receipts (deliver_sm) from the bound SMSC.

Install

Via the Node-RED editor's Palette Manager, or from the command line in your Node-RED user directory (typically ~/.node-red):

npm install @leissner/node-red-smpp

smpp-config

Holds the connection details for one bound SMPP session, shared by any number of smpp-in/smpp-out nodes. Configure url (e.g. smpp://host:2775, or ssmpp://host:3550 for TLS), system_id, password, and bind_mode (transceiver/transmitter/receiver). Advanced options include addr_ton/addr_npi/address_range (only needed if your SMSC provider tells you to set them), enquire_link interval, connect timeout, and TLS settings for ssmpp://.

The connection is established lazily on deploy (when the first smpp-in/smpp-out node using it starts) and torn down when the last one is removed. On disconnect, it retries with capped exponential backoff (1s → 2s → 5s → 10s → 30s, then holds).

smpp-out

Sends msg.payload as an SMS.

  • Destination — set on the node, or leave blank to use msg.destination.
  • Source — set on the node, or leave blank to use msg.source.
  • Encoding — Auto-detect (default), ASCII (GSM 03.38), LATIN1, or UCS2. Can be overridden per-message with msg.encoding (same values, case-insensitive). If the payload contains characters the chosen encoding can't represent, a warning is logged and the unrepresentable characters are substituted or dropped by the underlying library — switch to auto or UCS2 if you need those characters preserved.
  • Message class — optional, under Advanced. 0 marks the message as Flash (most handsets display it immediately without storing it); 1-3 are the less commonly used ME/SIM/TE-specific classes. Can be overridden per-message with msg.class (0-3). Only supported with GSM 7-bit or UCS2 — combined with LATIN1, a warning is logged and the message is sent without a class marking. With auto encoding, GSM 7-bit or UCS2 is chosen automatically based on the message content, same as normal auto-detection.
  • msg.payload that isn't already a string or Buffer is converted: plain objects are JSON-stringified, other types are coerced with String().
  • On success, msg.payload is replaced with the SMSC's message_id, and the full response PDU is attached at msg.smpp_response.

Note on LATIN1: only data_coding 0x00 (GSM 7-bit) and 0x08 (UCS2) are universally honored by SMSCs and handsets. LATIN1 (0x03) is valid per the SMPP spec but has been observed to be silently misinterpreted as GSM 7-bit by some SMSCs — test against your specific SMSC before relying on it for anything outside the base GSM alphabet.

smpp-in

Emits a message for each inbound deliver_sm PDU. Configure whether to receive all messages, MO (mobile-originated) only, or delivery receipts only, and whether delivery receipt text is parsed into a structured msg.payload (id, sub, dlvrd, submit_date, done_date, stat, err, text) or left as raw text.

Auto-acknowledges each received PDU by default (required by the SMPP spec) — only disable this if your flow explicitly sends the response itself via msg.smpp_pdu.response().

Examples

Three example flows are included — in the Node-RED editor, use Import → Examples → node-red-smpp (or @leissner/node-red-smpp, depending on your Node-RED version):

  • Send SMS — the minimal flow: an inject node with a test message and destination number, wired to smpp-out, with a debug node showing the returned message_id.
  • Send flash SMS — the same shape, but the inject node also sets msg.class = 0, demonstrating Flash SMS.
  • Receive SMS — smpp-in wired to a switch node that splits inbound traffic on msg.smpp_is_delivery_receipt, routing mobile-originated messages and (parsed) delivery receipts to separate debug nodes.

All examples ship with a placeholder smpp-config node (smpp://your-smsc-host:2775, system_id: your_system_id) — edit it with your real SMSC details and set a password after importing, before deploying.

Development

The pure encoding/payload logic used by smpp-out (message class byte math, encoding resolution, payload normalization) lives in lib/message-encoding.js and has a Mocha test suite:

npm install
npm test          # run tests
npm run coverage  # run tests with coverage report (coverage/lcov-report/index.html)

The smpp-config/smpp-out/smpp-in nodes themselves depend on a live SMPP session and Node-RED's runtime, and are tested manually/interactively against a real SMSC rather than with automated tests.

License

MIT