Node.js script/daemon to (hackily) send SMS from the Voxtelesys API to Matrix and back.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Skylar Ittner 3583f61fd7 Use API key instead of persistent token 3 years ago
nbproject First commit: it works 4 years ago
.gitignore Add \!sms command to send to a new number 4 years ago
LICENSE.md Add license.md and license metadata 4 years ago
README.md Add \!sms command to send to a new number 4 years ago
config.example.json Use API key instead of persistent token 3 years ago
main.js Use API key instead of persistent token 3 years ago
matrix-bridge-voxtelesys.service Improve unit file and instructions 4 years ago
package-lock.json Add image support (not just files) 3 years ago
package.json Add image support (not just files) 3 years ago

README.md

matrix-bridge-voxtelesys

When someone texts your Voxtelesys DID, this script creates a Matrix room named with the sender's number, posts their SMS in it, and invites you (the users in config.json) to the room. When someone posts a message in the room this script sends it as an SMS to the original sender. Back and forth it goes!

Installation

git clone https://source.netsyms.com/Netsyms/matrix-bridge-voxtelesys /opt/matrix-bridge-voxtelesys
cd /opt/matrix-bridge-voxtelesys
cp config.example.json config.json
nano config.json
npm install
adduser --system --no-create-home matrix-bridge-voxtelesys
cp matrix-bridge-voxtelesys.service /etc/systemd/system
systemctl enable matrix-bridge-voxtelesys
systemctl start matrix-bridge-voxtelesys

Or just run node main.js.

Starting a new conversation

When a SMS is received from a new number, a new room is created. If you need to send a message to a new number, simply type something like !sms 14065551234 into an existing SMS room. You'll be invited to join a new room and will then be able to send your message.

Known Issues/Limitations

  • If you leave a room the bot won't invite you back, even if there are new SMS messages.
  • Any messages posted in a Matrix room while the bot is offline will not be relayed to SMS when it comes back.
  • Only unread SMS are fetched, so if anything else is checking the API this bot won't get those.
  • This polls the API for messages every 15 seconds (configurable), which is a bit ugly.
  • If it crashes try the latest Node.js LTS (v14 as of commit date)