Jump to content

SMS/USSD

From Wikitech
This page was last updated in 2013 and may be outdated. Please update it if you can.

SMS and USSD support for Wikipedia

The simplest Vumi system consists of a transport worker and an application worker.

A transport worker is responsible for sending messages to and receiving messages from users in the big wide world. Transport mechanisms Vumi supports include SMPP, XMPP, Twitter, IRC, HTTP and a variety of mobile network aggregator specific messaging protocols. The application worker processes messages from a transport and sends replies – it holds the application logic. Vumi workers communicate over RabbitMQ.

A XMPP based demo is available with the following jabber ids: wikipediavumi@gmail.com and wikipediavumitest@gmail.com

You can see the code at: https://github.com/praekelt/vumi-wikipedia/

Background

Monitoring

Two servers (one in each data center) are deployed, namely zhen and silver.

  • Application key monitoring indicators :

Troubleshooting

Possible problems (or known issues) are

Problem connecting to Redis

There will be log entries like the following:

2013-01-08 18:23:42+0000 [-] Starting factory <vumi.persist.txredis_manager.VumiRedisClientFactory instance at 0x3784638>
2013-01-08 18:25:43+0000 [VumiRedis,client] <twisted.internet.tcp.Connector instance at 0x3784758> will retry in 2 seconds
2013-01-08 18:25:43+0000 [VumiRedis,client] Stopping factory <vumi.persist.txredis_manager.VumiRedisClientFactory instance at 0x3784638>

Recovery: Restart Redis, restart Vumi.

Bad message crashes transport:

There will be a stack trace in one or more of the transport logs.
Recovery: Restart Vumi, send logs to Vumi team for debugging.

Problem connecting to SMPP

There will be log entries like the Redis ones, but referencing the SMPP client.
Recovery: Check network connectivity, escalate to operator.

Vumi recovery process management:

stop application - "sudo supervisorctl stop all"
start application - "sudo supervisorctl start all"
restart application - "sudo supervisorctl restart all"
restart with updated supervisord config - "sudo supervisorctl reload"

Escalation (Application) Contact:

  • Jeremy Thurgood / jeremy@praekelt.com

Future Plans