Code Monkey home page Code Monkey logo

mx-puppet-voipms's Introduction

Deprecated

It has been years since I wrote this. The mx-puppet-brige framework it is based upon is no longer well supported. I am not able to get the docker container to build anymore. I really don't recommend using this without forking and updating the dependencies at the very least.

mx-puppet-voipms

This is a puppeting bridge for the SMS functionallity provided by voip.ms. It is based on mx-puppet-bridge.

Note that this bridge does not provide SIP or call functionallity and is only for bridging SMS messages and media files (pictures, videos). Shortcode SMS are unsupported due to a limitation of the voip.ms API.

what is voip.ms?

voip.ms is a voice over ip (voip) provider. They provide a REST api to send and receive SMS for users of their platform. Docs for the SMS capability are here.

Installation

git clone https://github.com/wildeyedskies/mx-puppet-voipms
cd mx-puppet-voipms
yarn install
yarn run build

Next copy the sample.config.yaml to config.yaml, edit it and then run node build/index.js -r to generate a registration file. Register that one with synapse and start the bridge with node build/index.js.

Usage

First you create a room with the bridge bot (@_voipmspuppet_bot:YOURSERVER.COM). Next you type link <voip.ms username> <voip ms API password> <your voip ms phone number>, e.g. link [email protected] passw0rd 5551112222. It will say that a puppet with a certain ID was created.

You should then be able to receive SMS messages via matrix. Note that currently the bridge does not sync history and only checks for messages received while it is running. There will be a slight delay in receiving SMS as the bot only checks for new messages every 30 seconds. This is a limitation of the platform as voip.ms does not provide a real time API.

To initiate a conversation with a new number, create a direct message to a username with the format @_voipmspuppet_$puppetId_$phonenumber:YOURSERVER.COM e.g. @_voipmspuppet_1_5551112222:YOURSERVER.COM. Matrix should then show the user joining the room, at which point sending a message to the room will send an SMS to the corresponding phone number.

Credits

A massive thank you to Sorunome for creating the mx-puppet-bridge library.

mx-puppet-voipms's People

Contributors

dependabot[bot] avatar mrroy avatar wildeyedskies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mx-puppet-voipms's Issues

Install instructions dont work

I tried installing this project using the instructions you provided but the "yarn run build" command just echos the word "huh". Please let me know how I can install this properly. Thanks!

sync history

the voip.ms API lets us request message history by date range. When a user first links the bridge, history should sync. When the bridge starts up again, new messages should be synced since the last shutdown.

MMS Support

Received this information today indicating that MMS support is happening now and it would be great if we could use it in this bridge as well
image

Receive messages in a push manner via webhooks

VoIP.ms allows you to configure a webhook endpoint that it will call when it receives a message for you. This would allow the bridge to be slightly more real-time, but would add complexity in that it would have to be able to receive HTTP messages. I don't know enough node to have much insight here, but if I have time I might look into it. It might be a nice feature someday. ๐Ÿ˜ƒ

Docs can be found on the voip.ms wiki

The parameters that the callback sends are as follows:

 {ID} The ID of the SMS message.
 {TIMESTAMP} The date and time the message was received.
 {FROM} The phone number that sent you the message
 {TO} The DID Number that received the message
 {MESSAGE} The content of the message
 Example: http: //mysite.com/sms.php?to={TO}&from={FROM}&message={MESSAGE}&id={ID}&date={TIMESTAMP}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.