Generic SMS Gateway Functionality

Hi all,

Got 2 questions:

  1. I have been working on SMS reporting to DHIS2 through the generic HTTP gateway and I have hit a snag. I think I am doing something wrong. Been following the following guide: https://docs.dhis2.org/master/en/user/html/mobile_sms_service.html#gateway.configuration, with the following screenshot:

image

image

···

Unfortunately, all the outbound SMS fail. Not much info from logs:

​The URL template section (from documentation) is not very clear on the format. I currently have it as http://mycustomsmsgateway.url/send I have also tried with parameters http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber} as outlined in DHIS 2 Core Source Code, still nothing. No GET/POST request is detected at gateway endpoint.

  1. How to you get inbound sms into DHIS2? (From Generic HTTP Gateway into DHIS). If this functionality has not been implemented yet, is there a work around, like directly populating a table in the database or sending a GET/POST request to a particular port/socket

Any insights will help. Thanks.

Regards,
Ejimba Eric

Dear Eric,

There are two things to note. The SMS Gateway that you set in DHIS2 is for any outbound text messaging. The URL Template should be based on your SMS service provider’s template. This will allow you to forward SMS messages from DHIS2 to the SMS service provider that will handle the delivery of the messages.

URL TEMPLATE IS FROM the SMS Provider

On the other hands, you should also configure a URL from the SMS service providers to forward ALL messages probably using a keyword to a DHIS2 instance. The latest version of DHIS2 2.28 has recently changed its SMS API that will receive and process SMSes as below.

[http://DHIS2_DOMAIN_URL/api/sms/inbound?message=[TEXT MESSAGE]&originator=PHONE NUMBER]

If you need an SMS service provider, I can help set up for you BUT you will be required to pay for the SMSes. [We can discuss more]

Regards

image

image

···

On Thu, Nov 16, 2017 at 2:47 PM, Eric Ejimba ejimba@gmail.com wrote:

Hi all,

Got 2 questions:

  1. I have been working on SMS reporting to DHIS2 through the generic HTTP gateway and I have hit a snag. I think I am doing something wrong. Been following the following guide: https://docs.dhis2.org/master/en/user/html/mobile_sms_service.html#gateway.configuration, with the following screenshot:

Unfortunately, all the outbound SMS fail. Not much info from logs:

​The URL template section (from documentation) is not very clear on the format. I currently have it as http://mycustomsmsgateway.url/send I have also tried with parameters http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber} as outlined in DHIS 2 Core Source Code, still nothing. No GET/POST request is detected at gateway endpoint.

  1. How to you get inbound sms into DHIS2? (From Generic HTTP Gateway into DHIS). If this functionality has not been implemented yet, is there a work around, like directly populating a table in the database or sending a GET/POST request to a particular port/socket

Any insights will help. Thanks.

Regards,
Ejimba Eric


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

You can do anything, but not everything.

Additionally, you now do not need to paste the whole URL template as is.

You will need to break down the parameters of the template. i.e.

http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber}

Message Parameter = message

Recipient Parameter = phoneNumber

URL Template = http://mycustomsmsgateway.url/send

PLEASE NOTE THAT THE FULL TEMPLATE SHOULD BE PROVIDED BY THE SMS PROVIDER.

The Parameter names might vary.

Regards

image

image

···

On Thu, Nov 16, 2017 at 4:56 PM, Ocaya Stephen stephocay@gmail.com wrote:

Dear Eric,

There are two things to note. The SMS Gateway that you set in DHIS2 is for any outbound text messaging. The URL Template should be based on your SMS service provider’s template. This will allow you to forward SMS messages from DHIS2 to the SMS service provider that will handle the delivery of the messages.

URL TEMPLATE IS FROM the SMS Provider

On the other hands, you should also configure a URL from the SMS service providers to forward ALL messages probably using a keyword to a DHIS2 instance. The latest version of DHIS2 2.28 has recently changed its SMS API that will receive and process SMSes as below.

[http://DHIS2_DOMAIN_URL/api/sms/inbound?message=[TEXT MESSAGE]&originator=PHONE NUMBER]

If you need an SMS service provider, I can help set up for you BUT you will be required to pay for the SMSes. [We can discuss more]

Regards

On Thu, Nov 16, 2017 at 2:47 PM, Eric Ejimba ejimba@gmail.com wrote:

Hi all,

Got 2 questions:

  1. I have been working on SMS reporting to DHIS2 through the generic HTTP gateway and I have hit a snag. I think I am doing something wrong. Been following the following guide: https://docs.dhis2.org/master/en/user/html/mobile_sms_service.html#gateway.configuration, with the following screenshot:

Unfortunately, all the outbound SMS fail. Not much info from logs:

​The URL template section (from documentation) is not very clear on the format. I currently have it as http://mycustomsmsgateway.url/send I have also tried with parameters http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber} as outlined in DHIS 2 Core Source Code, still nothing. No GET/POST request is detected at gateway endpoint.

  1. How to you get inbound sms into DHIS2? (From Generic HTTP Gateway into DHIS). If this functionality has not been implemented yet, is there a work around, like directly populating a table in the database or sending a GET/POST request to a particular port/socket

Any insights will help. Thanks.

Regards,
Ejimba Eric


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

You can do anything, but not everything.

You can do anything, but not everything.

Dear Stephen,

It is working…Thanks for all the help. I have been able to do it on the test server and will be cascading the same to production server.

Please note that we are currently testing this feature with http://www.kannel.org/ SMS gateway with a USB modem. We will be moving to an SMS Provider once the implementation is sustainable. Will consult you on that.

Thank you very much. I really appreciate it

image

image

···

On Thu, Nov 16, 2017 at 5:06 PM, Ocaya Stephen stephocay@gmail.com wrote:

Additionally, you now do not need to paste the whole URL template as is.

You will need to break down the parameters of the template. i.e.

http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber}

Message Parameter = message

Recipient Parameter = phoneNumber

URL Template = http://mycustomsmsgateway.url/send

PLEASE NOTE THAT THE FULL TEMPLATE SHOULD BE PROVIDED BY THE SMS PROVIDER.

The Parameter names might vary.

Regards

Regards,
Ejimba Eric

On Thu, Nov 16, 2017 at 4:56 PM, Ocaya Stephen stephocay@gmail.com wrote:

Dear Eric,

There are two things to note. The SMS Gateway that you set in DHIS2 is for any outbound text messaging. The URL Template should be based on your SMS service provider’s template. This will allow you to forward SMS messages from DHIS2 to the SMS service provider that will handle the delivery of the messages.

URL TEMPLATE IS FROM the SMS Provider

On the other hands, you should also configure a URL from the SMS service providers to forward ALL messages probably using a keyword to a DHIS2 instance. The latest version of DHIS2 2.28 has recently changed its SMS API that will receive and process SMSes as below.

[http://DHIS2_DOMAIN_URL/api/sms/inbound?message=[TEXT MESSAGE]&originator=PHONE NUMBER]

If you need an SMS service provider, I can help set up for you BUT you will be required to pay for the SMSes. [We can discuss more]

Regards

You can do anything, but not everything.

On Thu, Nov 16, 2017 at 2:47 PM, Eric Ejimba ejimba@gmail.com wrote:

Hi all,

Got 2 questions:

  1. I have been working on SMS reporting to DHIS2 through the generic HTTP gateway and I have hit a snag. I think I am doing something wrong. Been following the following guide: https://docs.dhis2.org/master/en/user/html/mobile_sms_service.html#gateway.configuration, with the following screenshot:

Unfortunately, all the outbound SMS fail. Not much info from logs:

​The URL template section (from documentation) is not very clear on the format. I currently have it as http://mycustomsmsgateway.url/send I have also tried with parameters http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber} as outlined in DHIS 2 Core Source Code, still nothing. No GET/POST request is detected at gateway endpoint.

  1. How to you get inbound sms into DHIS2? (From Generic HTTP Gateway into DHIS). If this functionality has not been implemented yet, is there a work around, like directly populating a table in the database or sending a GET/POST request to a particular port/socket

Any insights will help. Thanks.

Regards,
Ejimba Eric


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

You can do anything, but not everything.

Eric, I am happy that this has resolved your issues.

Regards

image

image

···

On Thu, Nov 16, 2017 at 5:24 PM, Eric Ejimba ejimba@gmail.com wrote:

Dear Stephen,

It is working…Thanks for all the help. I have been able to do it on the test server and will be cascading the same to production server.

Please note that we are currently testing this feature with http://www.kannel.org/ SMS gateway with a USB modem. We will be moving to an SMS Provider once the implementation is sustainable. Will consult you on that.

Thank you very much. I really appreciate it

Regards,
Ejimba Eric

On Thu, Nov 16, 2017 at 5:06 PM, Ocaya Stephen stephocay@gmail.com wrote:

Additionally, you now do not need to paste the whole URL template as is.

You will need to break down the parameters of the template. i.e.

http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber}

Message Parameter = message

Recipient Parameter = phoneNumber

URL Template = http://mycustomsmsgateway.url/send

PLEASE NOTE THAT THE FULL TEMPLATE SHOULD BE PROVIDED BY THE SMS PROVIDER.

The Parameter names might vary.

Regards

On Thu, Nov 16, 2017 at 4:56 PM, Ocaya Stephen stephocay@gmail.com wrote:

Dear Eric,

There are two things to note. The SMS Gateway that you set in DHIS2 is for any outbound text messaging. The URL Template should be based on your SMS service provider’s template. This will allow you to forward SMS messages from DHIS2 to the SMS service provider that will handle the delivery of the messages.

URL TEMPLATE IS FROM the SMS Provider

On the other hands, you should also configure a URL from the SMS service providers to forward ALL messages probably using a keyword to a DHIS2 instance. The latest version of DHIS2 2.28 has recently changed its SMS API that will receive and process SMSes as below.

[http://DHIS2_DOMAIN_URL/api/sms/inbound?message=[TEXT MESSAGE]&originator=PHONE NUMBER]

If you need an SMS service provider, I can help set up for you BUT you will be required to pay for the SMSes. [We can discuss more]

Regards

You can do anything, but not everything.

On Thu, Nov 16, 2017 at 2:47 PM, Eric Ejimba ejimba@gmail.com wrote:

Hi all,

Got 2 questions:

  1. I have been working on SMS reporting to DHIS2 through the generic HTTP gateway and I have hit a snag. I think I am doing something wrong. Been following the following guide: https://docs.dhis2.org/master/en/user/html/mobile_sms_service.html#gateway.configuration, with the following screenshot:

Unfortunately, all the outbound SMS fail. Not much info from logs:

​The URL template section (from documentation) is not very clear on the format. I currently have it as http://mycustomsmsgateway.url/send I have also tried with parameters http://mycustomsmsgateway.url/send?message={message}&phoneNumber={phoneNumber} as outlined in DHIS 2 Core Source Code, still nothing. No GET/POST request is detected at gateway endpoint.

  1. How to you get inbound sms into DHIS2? (From Generic HTTP Gateway into DHIS). If this functionality has not been implemented yet, is there a work around, like directly populating a table in the database or sending a GET/POST request to a particular port/socket

Any insights will help. Thanks.

Regards,
Ejimba Eric


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

You can do anything, but not everything.

You can do anything, but not everything.

I want to setup SMS notification for TEI subscribers to our Tracker Program to send outbound SMS messages for ANC visits and vaccination appointments date. My inquiry is in two parts as it relate with the SMS configuration and Program notification setup.

Gateway configuration
I am using the Generic Gateway.

  1. The Configuration template* is a compulsory field. But I don’t know what should go into this field. In examples I saw, there is key/value parameters setup as a string. But I don’t know which of the parameters is being used. My SMS provider use (username and apiKey, content-type) in headers and (to, from, message) in the body of the request. How do I set the values for the keys I am using from the parameters.

  2. Send url parameters. Do I need to click this checkbox?

  3. Key value pairs. For this I added the apiKey and username as header message. Do I need to create a key/value pair for the message body parameters of the API? If so where do I get what I put as value?

Commands
Do I need to setup command? If I have to which type should I choose. Where do I get the recipient phoneNumber from. What I really want is to send a SMS to the TEI when they enroll in the program and reminders for future appointments.

Tracker Program Notification
I setup a Tracker Program. In the step 6 Program stage notification, I setup the reminder notifications. But I need clarification in two parts.

  1. When to send it. I select Days scheduled (due date). How do I set this due date?

  2. Who to send it. Here I select Tracked entity instance. And I tick the SMS box which I hope is correct.

  3. I am also confused on how to setup the recipient number