Skip to main content

Vumi Go

Project description

Documentation available online at http://vumi-go.readthedocs.org/ and in the docs directory of the repository.

vumigo-ci vumigo-cover vumigo-waffle

Installing

Install the dependencies:

$ virtualenv --no-site-packages ve
$ source ve/bin/activate
(ve)$ pip install -r requirements.pip

Other stuff that’s required:

After installing Riak, you will need to edit the /etc/riak/app.config file: set the storage backend to eleveldb instead of bitcask, and enable riak_search.

Bootstrapping a development environment

After having installed the dependencies with pip and ensuring that Redis, Riak and RabbitMQ are running execute the following command:

(ve)$ ./setup_env.sh

This will generate all the necessary config files for running a set of standard applications and Telnet transports emulating a USSD and SMS connection.

To start some sample conversations such as Wikipedia execute the following command:

(ve)$ ./setup_env/build/go_startup_env.sh

Next start everything using Supervisord:

(ve)$ supervisord -c setup_env/build/go_supervisord.conf
(ve)$ supervisorctl -c setup_env/build/go_supervisord.conf

Now you should be able to login to the Vumi UI at http://localhost:8000 using the account details as specified in setup_env/accounts.yaml.

The default accounts created are:

Username

Password

user1@example.org

password

user2@example.org

password

By default the Wikipedia USSD service is configured to be running on localhost 8081.

$ telnet localhost 8081
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Please provide "to_addr":
*120*10001#
Please provide "from_addr":
simon
[Sending all messages to: *120*10001# and from: simon]
What would you like to search Wikipedia for?
...

The SMS delivery part uses ‘longcode-10001’ as the virtual address and the outbound SMSes as part of the USSD Wikipedia are sent to that address.

Using GTalk as a transport for testing

To ease local development we often use GTalk. You will need at least two Gtalk addresses, one will be used for the Vumi transport the other you will need to use with your normal Gtalk client to interact with the service.

Start the XMPP transport with the following command:

(ve)$ twistd -n vumi_worker \
>      --worker-class=vumi.transports.xmpp.XMPPTransport
>      --config=path/to/xmpp-config.yaml

The configuration for the XMPP transport should have the following parameters:

transport_name: <desired transport name> # change this
username: <your username> # change this
password: <your password> # change this
host: talk.google.com
port: 5222
status: chat
status_message: Vumi Go!

middleware:
    - logging_mw: vumi.middleware.logging.LoggingMiddleware
    - gtalk_tagging_mw: vumi.middleware.tagger.TaggingMiddleware

logging_mw:
    log_level: debug

gtalk_tagging_mw:
   incoming:
     addr_pattern: '^(.+\@.+)/?.*$'
     tagpool_template: 'xmpp'
     tagname_template: '\1'
   outgoing:
     tagname_pattern: '.*'
     msg_template: {}

For you to be able to use this account for messaging you will need to add it to the tagpools.yaml file. Do this by adding the following below ussd_tagpool under pools:

xmpp_tagpool:
  tags:
    - xmpp@example.org # change this
  metadata:
    display_name: "Google Talk"
    delivery_class: gtalk
    transport_type: xmpp
    user_selects_tag: true
    server_initiated: true
    client_initiated: true
    transport_name: <name of your transport> # change this
    msg_options: {}

Next update the Tagpool Manager with this new configuration:

(ve)$ ./go-admin.sh go_setup_env \
        --config-file=./setup_env/config.yaml \
        --tagpool-file=./setup_env/tagpools.yaml

And give your account access to this new tagpool:

(ve)$ ./go-admin go_assign_tagpool \
        --email-address=user1@example.org \
        --tagpool=xmpp_tagpool \
        --max-keys=0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vumi-go-0.5.0.tar.gz (354.8 kB view details)

Uploaded Source

Built Distribution

vumi_go-0.5.0-py2-none-any.whl (522.4 kB view details)

Uploaded Python 2

File details

Details for the file vumi-go-0.5.0.tar.gz.

File metadata

  • Download URL: vumi-go-0.5.0.tar.gz
  • Upload date:
  • Size: 354.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vumi-go-0.5.0.tar.gz
Algorithm Hash digest
SHA256 00891ea4642aaac343ebc9ee09ed1c483a845c403c6a637195d8e446081a5f51
MD5 d2dce67b536604125010bcaf9b64b34d
BLAKE2b-256 8145c1d12d170c757366042b5a20a500e37b9c7139b8c198f85a94d92a07e6dc

See more details on using hashes here.

File details

Details for the file vumi_go-0.5.0-py2-none-any.whl.

File metadata

File hashes

Hashes for vumi_go-0.5.0-py2-none-any.whl
Algorithm Hash digest
SHA256 f923d83582fa5a7f359cc1452a7816042296211f0fc5247bf3185f22cd06d53b
MD5 0cd56dac5894bc99725300d2179923c6
BLAKE2b-256 76973c7c9355458c514ac323382f4778b25f047b40b867602d0f90868dd2c67b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page