GithubHelp home page GithubHelp logo

nvdnkpr / gosms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haxpax/gosms

0.0 3.0 0.0 620 KB

Your own local SMS gateway in Go

License: GNU General Public License v2.0

Go 47.31% CSS 19.28% JavaScript 24.56% HTML 8.85%

gosms's Introduction

gosms

Your own local SMS gateway

What's the use ?

Can be used to send SMS, where you don't have access to internet or cannot use Web SMS gateways or want to save some money per SMS, or have minimal requirements for personal / internal use and such

  • deploy in less than 1 minute
  • supports Windows, GNU\Linux, Mac OS
  • works with GSM modems
  • provides API over HTTP to push messages to gateway, just like the internet based gateways do
  • takes care of queuing, throttling and retrying
  • supports multiple devices at once

gosms dashboard

deployment

  • Update conf.ini [DEVICES] section with your modem's COM port. for ex. COM10 or /dev/USBtty2
  • Run

API specification

  • /api/sms/ [POST]
    • param mobile
      • mobile number to send message to
      • number should have contry code prefix
      • for ex. +919890098900
    • param message
      • message text
      • max length is limited to 160 characters
    • response
{
  "status": 200,
  "message": "ok"
}
  • /api/logs/ [GET]
    • response
{
  "status": 200,
  "message": "ok",
  "summary": [ 10, 50, 2 ],
  "daycount": { "2015-01-22": 10, "2015-01-23": 25 },
  "messages": [
    {
      "uuid": "d04f17c4-a32c-11e4-827f-00ffcf62442b",
      "mobile": "+1858111222",
      "body": "Hey! Just playing around with gosms.",
      "status": 1
    },
  ]
}
- message status codes
  - 0 : Pending
  - 1 : Processed
  - 2 : Error

planned features

  • Allowing multiple mobile numbers with a single message in /api/sms/
  • CRUD support for messages, possibly support cancellation of message
  • Authentication support for API
  • Adding authentication for Dashboard
  • Send an email to admin on high failure rate

building from source

On Ubuntu

  • go get github.com/haxpax/gosms
  • cd $GOPATH/src/github.com/haxpax/gosms/dashboard
  • go get
  • go build

On Windows

  • Setup GCC for go-sqlite3 package

    • For 32 bit
    • For 64 bit
    • Install
    • Add its bin dir to path, typically C:\Program Files\mingw-w64\x86_64-4.9.2-posix-seh-rt_v3-rev1\mingw64\bin
  • go get github.com/haxpax/gosms

  • cd $GOPATH/src/github.com/haxpax/gosms/dashboard

  • go get

  • go build

run dashboard executable. Copy assets, templates, conf.ini, dashboard[.exe] if you want to move to another directory db.sqlite is created at first run if not present, copy that too if its there

gosms's People

Contributors

omie avatar madhurjain avatar

Watchers

Navid Nikpour avatar James Cloos avatar  avatar

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.