项目作者: ksingh11

项目描述 :
Relay SMS message through SMPP protocol, provides interface HTTP api endpoint.
高级语言: Elixir
项目地址: git://github.com/ksingh11/SMPP-SMS-Relay-Service.git
创建时间: 2021-06-21T06:11:39Z
项目社区:https://github.com/ksingh11/SMPP-SMS-Relay-Service

开源协议:

下载


Sms-Server on SMPP

A SMPP protocol based SMS server. Which exposes a HTTP api endpoint, to trigger SMS through SMPP protocol.
Maintains a queue of messages, and process messages from the queue in background and relays further through SMPP.

API Endpoint

  1. GET /api/v1/send-message/?phone=<PHONE NUMBER>&msg=<MESSAGE TEXT>
  2. HTTP/1.1
  3. Host: localhost:4000
  4. client_id: zostel
  5. client_key: hello123

Specifications:

PHONE NUMBER: International format, without (+). eg. 919839098390
HTTP Headers:

  • client_id
  • client_key

Installation

  1. $ git clone <repository>
  2. $ mix deps.get
  3. $ mix deps.compile
  4. $ MIX_ENV=prod mix distillery.release
  5. $ _build/prod/rel/sms_server/bin/sms_server start
  6. # Stop server
  7. $ _build/prod/rel/sms_server/bin/sms_server stop
  8. # Attach shell to server
  9. $ _build/prod/rel/sms_server/bin/sms_server remote_console
  10. # Database migration
  11. $ _build/prod/rel/sms_server/bin/sms_server migrate

Dependencies:

  1. - RabbitMQ Server
  2. - Postgresql server
  3. - Elixir 1.9

Webserver Environment variables:

  1. HTTP_PORT, default: 4000

Database Environment variables:

  1. DB_DATABASE, default: sms_server
  2. DB_USERNAME, default: postgres
  3. DB_PASSWORD, default: postgres
  4. DB_HOSTNAME, default: localhost

RabbitMQ Environment variables:

  1. AMQP_HOST, default: "amqp://kbadmin:s7****es@localhost:5672/khatabook"
  2. AMQP_CHANNEL, default: kb_channel

SMPP Environment variables:

  1. SMPP_HOST, default: "smsc-sim.smscarrier.com",
  2. SMPP_PORT, default: 2775
  3. SMPP_USER, default: "test"
  4. SMPP_PASS, default: "test"

Database Setup

Specifications:

Create Database: sms_server
Run Migration
Table: apikey
Fields: client_id, client_key, sender
Eg.:

  1. client_id: zo_client
  2. client_key: fycz31qo
  3. sender: ZONOTIF (sender ID for the SMS)