GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - fortyplustwo/envaya_nexmo: Custom RapidSMS backend using Nexmo for outgoing and EnvayaSMS for incoming message cycles.

BranchesTags
Open more actions menu

Latest commit

 

History

36 Commits
36 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
backend.py
backend.py
 
 
forms.py
forms.py
 
 
requirements.txt
requirements.txt
 
 
tests.py
tests.py
 
 
urls.py
urls.py
 
 

Repository files navigation

#envaya_nexmo

Custom RapidSMS backend using Nexmo for Outgoing and EnvayaSMS for incoming message cycles. Inspired and based upon https://github.com/dimagi/rapidsms-envaya

Installation

Check out http://rapidsms.readthedocs.org/en/latest/main/installation.html for how to install RapidSMS.

Then, in your project directory:

$ git clone https://[email protected]/knightsamar/envaya_nexmo.git

In settings.py put:

Add "envaya_nexmo" to the list INSTALLED_APPS.

Add the following to INSTALLED_BACKENDS:

    'envaya_nexmo': {
        "ENGINE"    : 'envaya_nexmo.backend.NexmoOutgoingBackend', #Register only the outgoing backend
        "api_key"   : 'API_KEY', #you will get this from Nexmo
        "api_secret": 'API_SECRET', #you will get this from Nexmo
        "sender_name" : 'HEWE', #check your local telecom regulator on whether you can use a custom shortcode
    }

In urls.py put:

urlpatterns = patterns('',
    (r'^envaya_nexmo/', include('envaya_nexmo.urls')),
)

Finally, set up EnvayaSMS on an Android phone. See http://sms.envaya.org/install/ for how to install EnvayaSMS on a real phone, or http://sms.envaya.org/test/ for how to test on your local machine. EnvayaSMS has some great documentation on how to further set up EnvayaSMS.

Once you have EnvayaSMS running, set URL to point to the http://YOUR.SERVER.IP.ADDRESS:PORT/envaya_nexmo/

And now enjoy receiving SMSes through EnvayaSMS and sending them through Nexmo!

Setting up logging

This is an optional step. Setting up logging properly, will help you set troubleshoot any issues.

To setup the logger, add the following to your settings.py in the LOGGING section.

        'envaya_nexmo' : {
            'handlers' : ['file'],
            'level': 'DEBUG',
            'propagate': True,
        },

This will direct all the logger messages to rapidsms-debug.log (or the relevant file configured in the handlers dictionary in your LOGGING settings.

How does it work?

There are 4 players in the whole scene:

  1. EnvayaSMS Django app for RapidSMS (this application!)
  2. Your RapidSMS app (which also includes RapidSMS itself)
  3. EnvayaSMS Android app (which runs on the phone)
  4. Nexmo API (libpynexmo)

####Outgoing message cycle

The outgoing message cycle works as follows:

  1. Message is received by the send method of the NexmoOutgoingBackend from backend.py
  2. The message is sent to the Nexmo REST API using the libpynexmo backend.

####Incoming message cycle

The incoming message cycle works as follows:

  1. Message is received by the EnvayaSMS Android app.
  2. The message is then forwarded to the EnvayaSMS Django app at the URL configured in the Android app, which is actually a view implementation of EnvayaSMSBackendView (and a form behind it) from views.py
  3. The EnvayaSMS Django app validates it and sends it to the router for further processing.

About

Custom RapidSMS backend using Nexmo for outgoing and EnvayaSMS for incoming message cycles.

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.