dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #50290
Re: [Dhis2-users] Generic SMS Gateway Functionality
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
<http://mycustomsmsgateway.url/send?message=%7Bmessage%7D&phoneNumber=%7BphoneNumber%7D>
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@xxxxxxxxx> 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=[
> <http://www.google.com/url?q=http%3A%2F%2Fdhis.mets.or.ug%2Fapi%2Fsms%2Finbound%3Fmessage%3DPmtct%2Ba.43.b.36.c.2.d.7.e.3.f.7.g.2.h.y.I.y%26originator%3D256785411060&sa=D&sntz=1&usg=AFQjCNHqphroUPT_Uwy8CViLII5Uf8_QPg>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@xxxxxxxxx> 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
>> <https://github.com/dhis2/dhis2-core/blob/52c644dd2a0ee59b85ce509d8123601901aae122/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/config/SimplisticHttpGetGateWay.java#L61>,
>> still nothing. No GET/POST request is detected at gateway endpoint.
>>
>> 2. 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@xxxxxxxxxxxxxxxxxxx
>> 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.*
Follow ups
References