Adding Vumi integration to DHIS-2

sorry for that.. Can't remember this message, maybe it was blocked by
launchpad, did you sign up for a launchpad account before sending?

I did but didn't have this email address linked. Work email address
now linked. Launchpad didn't send me a bounce message though.

The sections specific for messaging here:

http://dhis2.org/doc/snapshot/en/user/html/ch23s10.html

This looks like it's mostly for sending messages via DHIS2? Or is
querying via something like

  curl "DHIS2 App Hub; -H
"Accept:application/xml" -u mobile:district -X GET -v

how DHIS2 sends messages out?

We want to connect Vumi to DHIS2 as a transport (i.e. something that
DHIS2 uses to send messages to cellphones).

Thanks for the quick response!

Schiavo
Simon

···

On Wed, Oct 10, 2012 at 8:50 AM, Lars Helge Øverland <larshelge@gmail.com> wrote:

Okay so I misunderstood a bit. How does one send messages through
vumi? Can you make http posts to some resource?

The way dhis sends message is pluggable but at the moment requires
that you dig into the source code. If you have the source available,
have a look in the dhis-service-core module (repo path is
dhis2/dhis-2/dhis-services/dhis-service-core). Class
org.hisp.dhis.message.DefaultMessageService allows for plugging in
implementations of interface MessageSender.

Currently we have two implementations:

- org.hisp.dhis.message.EmailMessageSender (in dhis-service-core module)
- org.hisp.dhis.sms.outbound.SmsMessageSender (in dhis-service-sms module)

We are using Spring as an adhoc solution for plugging, just implement
the interface, define your implementation as a bean in beans.xml
(src/main/resources) and Spring will auto-wire it and invoke the
MessageSender.sendMessage method when dhis sends a message. It will be
feasible to have a VumiMessageSender class which is doing its thing.

Given that vumi has a web api, another approach would be to have a
generic HttpMessageSender which can be configured somehow to send http
messages to URLs. Up to you. Let me know what you think.

Lars

···

On Wed, Oct 10, 2012 at 7:21 PM, Simon Cross <simon.cross@praekeltfoundation.org> wrote:

On Wed, Oct 10, 2012 at 8:50 AM, Lars Helge Øverland > <larshelge@gmail.com> wrote:

sorry for that.. Can't remember this message, maybe it was blocked by
launchpad, did you sign up for a launchpad account before sending?

I did but didn't have this email address linked. Work email address
now linked. Launchpad didn't send me a bounce message though.

The sections specific for messaging here:

http://dhis2.org/doc/snapshot/en/user/html/ch23s10.html

This looks like it's mostly for sending messages via DHIS2? Or is
querying via something like

  curl "DHIS2 App Hub; -H
"Accept:application/xml" -u mobile:district -X GET -v

how DHIS2 sends messages out?

We want to connect Vumi to DHIS2 as a transport (i.e. something that
DHIS2 uses to send messages to cellphones).

Thanks for the quick response!

Schiavo
Simon

Okay so I misunderstood a bit. How does one send messages through
vumi? Can you make http posts to some resource?

There are a variety of ways of sending messages via Vumi, but, yes,
one of those is via posts to an HTTP resource.

We are using Spring as an adhoc solution for plugging, just implement
the interface, define your implementation as a bean in beans.xml
(src/main/resources) and Spring will auto-wire it and invoke the
MessageSender.sendMessage method when dhis sends a message. It will be
feasible to have a VumiMessageSender class which is doing its thing.

Given that vumi has a web api, another approach would be to have a
generic HttpMessageSender which can be configured somehow to send http
messages to URLs. Up to you. Let me know what you think.

Assuming we implement this (and it's up to scratch) do you see any
obstacles to having such a VumiMessageSender or HttpMessageSender
incorporated in DHIS2's repo? I've chatted to Tobias and Colin from
RapidSMS so there's some hope of a single HttpMessageSender supporting
both Vumi and RapidSMS.

What about receiving messages via Vumi / RapidSMS? Is that relevant to
DHIS2 currently?

Schiavo
Simon

···

On Wed, Oct 10, 2012 at 8:30 PM, Lars Helge Øverland <larshelge@gmail.com> wrote:

Assuming we implement this (and it's up to scratch) do you see any
obstacles to having such a VumiMessageSender or HttpMessageSender
incorporated in DHIS2's repo? I've chatted to Tobias and Colin from
RapidSMS so there's some hope of a single HttpMessageSender supporting
both Vumi and RapidSMS.

No I don't, just go ahead, we are happy to include it. Let us know if
you need any assistance.

What about receiving messages via Vumi / RapidSMS? Is that relevant to
DHIS2 currently?

Well not sure but I know we are having problems with unreliable SMS
gateways in several locations so I can imagine it will be useful.
Again we are happy to explore the possibilities..

regards, Lars

···

Schiavo
Simon