← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] SMS/Mobile configuration

 

Hi Terence,

Many thanks for your follow-up.  When Zubair investigated, it turned out that there was in fact an issue with the Clickatell gateway setup on 2.30, and a software change was necessary, which was pushed with the DHIS2 2.30 update on 3 October.  Apologies, I should have returned and updated this thread with the outcome of Zubair’s investigations – thanks for prompting me to do so.  ☺

Despite the fix in 2.30, Zubair explained to me that it still wasn’t possible for me to set up a Clickatell gateway via the user interface on 2.30, as my Clickatell URL is https://platform.clickatell.com/messages, whereas DHIS2 is set up for https://platform.clickatell.com/rest/messages.  Zubair said that this will be made configurable in a future release of DHIS2, but in the meantime I’d need to use the following API call instead of the user interface:
curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -u <serverUserName>:<serverPassword> -d '{"name" : "clickatell","username": "<Clickatell username>","password": "<Clickatell password>","authtoken": "<Clickatell API key>","urlTemplate":"https://platform.clickatell.com/messages"}' -s http://<DHIS2<http://%3cDHIS2> server address>/api/gateways/clickatell

Another point: when generating an API key, Clickatell will default to ‘HTTP’, so don’t forget to change this to ‘REST’.

With Zubair’s help, my SMS setup is now working smoothly.  Hope this is useful for anyone else trying to do this in 2.30.

Cheers, Sam.


From: Terence Scott <terence.scott@xxxxxxxxxxxxxxxxxx>
Date: Thursday, 11 October 2018 at 08:59
To: Sam Johnson <samuel.johnson@xxxxxxxxxx>
Cc: DHIS 2 Users list <dhis2-users@xxxxxxxxxxxxxxxxxxx>, DHIS2 Developers <dhis2-devs@xxxxxxxxxxxxxxxxxxx>, "zubair@xxxxxxxxx" <zubair@xxxxxxxxx>
Subject: Re: [Dhis2-users] [Dhis2-devs] SMS/Mobile configuration

Dear Samuel

I am on 2.28 and I just set up the SMS configuration and gateway by following the steps that you laid out in your descriptive email. I used Clickatell also and have the + and country code included into the number. I used my Clickatell username (not the email address). The clickatell username for me was all lower case (despite initially entering it into their system as uppercase). I am not sure if that may be an issue, but as mentioned, I have managed to set up the SMS function from scratch using what you supplied.

One thing you may check is whether your in your "User settings" in your profile, you are over-riding the system settings for "Enabling message SMS notifications".

Kind regards,
Terence

Terence Scott

Global Alliance for Rabies Control (GARC)
Pan-African Rabies Control Network (PARACON) Steering Committee
terence.scott@xxxxxxxxxxxxxxxxxx<mailto:terence.scott@xxxxxxxxxxxxxxxxxx>
https://paracon.rabiesalliance.org
Skype: tpscott1987



On Tue, Oct 2, 2018 at 4:34 PM Zubair Asghar Raja <zubair@xxxxxxxxx<mailto:zubair@xxxxxxxxx>> wrote:
Yes. Share the key and i will take a look into it.


Zubair Asghar
DHIS-2 Developer
University of Oslo
zubair@xxxxxxxxx<mailto:lars@xxxxxxxxx>
https://www.dhis2.org<https://www.dhis2.org/>


On Tue, Oct 2, 2018 at 4:10 PM Sam Johnson <samuel.johnson@xxxxxxxxxx<mailto:samuel.johnson@xxxxxxxxxx>> wrote:
Hi Zubair,

Thanks for the quick response.  ☺  Yes, I’ve already tried both with and without the leading ‘+’, and without any country identifier at all.  Looking at the format of the Clickatell API call, I assume the ‘+’ should be left off, but my guess is that if the user leaves it on, the DHIS2 interface trims it off anyway.

I’ve noticed that the Clickatell API defaults to HTTP, whereas I’m guessing DHIS2 uses REST?  (I’ve tried both API configurations anyway, without success.)  If I email you a temporary Clickatell API key, would you have time to quickly test it, to see if the API call that DHIS2 2.30 generates still matches the one that Clickatell is expecting?

Cheers, Sam.


From: Zubair Asghar Raja <zubair@xxxxxxxxx<mailto:zubair@xxxxxxxxx>>
Date: Tuesday, 2 October 2018 at 15:21
To: Sam Johnson <samuel.johnson@xxxxxxxxxx<mailto:samuel.johnson@xxxxxxxxxx>>
Cc: Shurajit Dutta <shurajitdutta@xxxxxxxxx<mailto:shurajitdutta@xxxxxxxxx>>, "jahidshahed@xxxxxxxxx<mailto:jahidshahed@xxxxxxxxx>" <jahidshahed@xxxxxxxxx<mailto:jahidshahed@xxxxxxxxx>>, DHIS 2 Users List <dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>>, "skalyati@xxxxxxxxx<mailto:skalyati@xxxxxxxxx>" <skalyati@xxxxxxxxx<mailto:skalyati@xxxxxxxxx>>, DHIS2 Developers <dhis2-devs@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx>>
Subject: Re: [Dhis2-devs] [Dhis2-users] SMS/Mobile configuration

Hi Samuel,
Have you tried different number formats? For instance with + and without +




Zubair Asghar
DHIS-2 Developer
University of Oslo
zubair@xxxxxxxxx<mailto:lars@xxxxxxxxx>
https://www.dhis2.org<https://www.dhis2.org/>


On Tue, Oct 2, 2018 at 2:31 PM Sam Johnson <samuel.johnson@xxxxxxxxxx<mailto:samuel.johnson@xxxxxxxxxx>> wrote:
Hi all,

I’ve created an account with Clickatell, but despite following the documentation listed below, I’m struggling to configure it in my DHIS2 instance (v2.30).

In the ‘Mobile Configuration’ module, I’ve selected ‘Add gateway’, and entered the following:

  *   ‘Auth Token’ is my Clickatell API key (ending in ==)
  *   For ‘Login’ I’ve tried both my Clickatell username (samueldjohnson) and my email address (which is what Clickatell actually asks for when I log into their portal)
  *   In DHIS2, I’ve made sure that ‘Enable message SMS notifications’ is ticked in Settings | Messaging.
  *   I’m doing all testing as superuser (so roles/authorities aren’t an issue).

(Note that despite the DHIS2 documentation<https://docs.dhis2.org/2.30/en/user/html/mobile_sms_service.html> saying that only login+password or API key need to be set up, I’ve had to enter both into the DHIS2 ‘Mobile Configuration’ module, as the screen enforces all three fields as mandatory.)

However, whenever I use the ‘Mobile Configuration’ module’s ‘Send SMS’ feature to send a test SMS message, it fails.  (In the ‘List of sent SMS’, it shows the correct number, but has [unknown] as recipient, and ‘FAILED’ as status.)  I’ve configured the correct countries in Clickatell, and have successfully sent test messages to the same phone with API calls (using curl).  Am I missing something in my DHIS2 configuration?

Many thanks for any tips/enlightenment that anyone is able to provide!

Cheers, Sam.






From: Dhis2-devs <dhis2-devs-bounces+samuel.johnson=qebo.co.uk@xxxxxxxxxxxxxxxxxxx<mailto:qebo.co.uk@xxxxxxxxxxxxxxxxxxx>> on behalf of Shurajit Dutta <shurajitdutta@xxxxxxxxx<mailto:shurajitdutta@xxxxxxxxx>>
Date: Sunday, 23 April 2017 at 08:16
To: Jahid Shahed <jahidshahed@xxxxxxxxx<mailto:jahidshahed@xxxxxxxxx>>
Cc: DHIS 2 Users List <dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>>, Stanley Kalyati <skalyati@xxxxxxxxx<mailto:skalyati@xxxxxxxxx>>, DHIS2 Developers <dhis2-devs@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx>>
Subject: Re: [Dhis2-devs] [Dhis2-users] SMS/Mobile configuration

Hi everyone

Are you trying to set up SMS to receive information, to send out messages such as notifications etc or both?

For receiving (aggregate) data, I would suggest reviewing the docs here:

https://docs.dhis2.org/master/en/user/html/mobile_sms_command.html

You may want to start with adding an SMS gateway to your configuration for sending back feedback and notifications as well. Popular services include BulkSMS and Clickatell.

https://docs.dhis2.org/master/en/user/html/mobile_sms_service.html

After this is configured, you would also have to configure the notifications. If it is for a program you can read more about that here

https://docs.dhis2.org/master/en/user/html/manage_program_notification.html




On Apr 23, 2017 1:04 PM, "Jahid Shahed" <jahidshahed@xxxxxxxxx<mailto:jahidshahed@xxxxxxxxx>> wrote:
I am also interested to learn this.


Regards,

Jahid Hossen Shahed
Skype: jahidshahed

Error! Filename not specified.  Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.

On Mon, Apr 17, 2017 at 7:04 PM, Stanley Kalyati <skalyati@xxxxxxxxx<mailto:skalyati@xxxxxxxxx>> wrote:
I am also waiting to learn from this.

Has this been answered? if so can anyone forward to me the responses.

Thank you

Stanley

On Wed, Apr 12, 2017 at 7:21 AM, Adhi <adhi41@xxxxxxxxx<mailto:adhi41@xxxxxxxxx>> wrote:
Dear all,

I have DHIS2 ver. 2.25 installed on a server.
Can anyone help me how to configure SMS? What hardware or software do I have to prepare? (like what kind of cellphone will be used, SMS gateway application, etc.).
Step-by-step guidance will be very helpful.

Best regards,
Adhi Andrianto
@ sekolahmalaria.info<http://sekolahmalaria.info>


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


Error! Filename not specified.<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>

Virus-free. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp

References