FrontlineSMS

FrontlineSMS allows you to text message with large groups of people anywhere there is a mobile signal.

Hi everyone,

 

I've been having some issues with the external command option in the keywords control of FSMS. I suspect that the problem might be minor or something obvious that I just can't see, but I was hoping everyone here could help me figure it out either way.

 

I'm working with a small NGO-run vaccination clinic here in India, and we want to develop some sort of tool that would allow users to SMS in a keyword ("TIKA," the name of the clinic) and their child's date of birth and receive back an SMS with a full first-year vaccination schedule based on that date of birth. I built a small Java app that does this, and it works perfectly through command prompt, but for some reason when I try to use the same command line argument in FSMS (including passing in ${message_content} as an parameter), it returns a blank text message, even if I include "${command_response}" in the response. I've tried playing around with it to see if the keyword command is even working, and it is. If I include some other plain text in the response and send an SMS saying "TIKA 06/15/2011", I will receive back the plain text, but not the command response.

 

I've included a screenshot of what my external command screen looks like. I'm running the latest release of FSMS on XP with an EDGE USB modem. Any ideas or suggestions as to why this won't work? This would be a really useful tool (and also helpful in our study) if we can just get it to work!

 

Thanks in advance for your help,

Priyanka

Views: 92

Attachments:

Reply to This

Replies to This Discussion

Hi Priyanka,


Thank you for getting in touch about this. Just to let you know, I have passed your question on to our developers and they will get back to you with a response as soon as possible.

 

Best,

Florence

Hi Priyanka,

 

Apologies for delay in following up with you on this. Our Lead Developer, Alex, is currently putting together some example scripts for testing external commands, which should help to identify the problem you are having here. We are just testing this out internally, and should be able to provide some further help and information next week/ asap. Again, sorry for delay. In the meant time, some other FrontlineSMS users may be able to chip in with their own knowledge / experiences.

 

Best,

Florence

Hi Florence (and Alex),

 

Thank you so much for following up on this! I appreciate it. We're hoping to start enrollment for our study (which this would ideally be part of) next week, so any advice that your team could provide would be helpful.

 

If you want, I can send over the specific commands, etc that I am using. Please let me know if you need more information.

 

Thanks again,

Priyanka

Dear Priyanka,

Congratulations on your work.

Please make sure your java app returns an ASCII response not UNICODE or UTF-8.

I seem to remember having this problem, although not fully confident about memory 100% any more

Let me know how it goes!

Hi George,

Thanks for your encouragement and also the suggestion! Can you describe what you mean in more detail, though? My app returns info as concatenated Dates and Strings - do I need to convert them all to ASCII before outputting to FSMS, in order for FSMS to process?

Thanks again!

Priyanka

Hi Priyanka, 

Your app outputs text to console, that is returned to the calling application (FLSMS), which will take it and send it as an SMS. If there are unacceptable character codes then it won't work.

 

I am not an expert on SMS but I believe that it expects each character to consist of 1 byte with value >= 32 and <= 127 or 255 (not sure if Extended Ascii is acceptable).


Modern applications use Unicode (where each character = 2 bytes for mainly Asian scripts) or UTF-8 which is a combination of the above 2 systems, but in any case there will be a few bytes at the front of your message which FLSMS may not like.

An easy way to tell is to get your app to send its output to a file and see the exact file size in number of bytes, then count the number of characters in the message and see if the lengths are equal.

I am not sure this is the case, but its a gut feeling.
Regards 

 

Hi George,

 

Thanks for the clarification! I tried converting my output to ASCII and then sending through FSMS, but it's still resulting in a blank SMS. I guess that isn't it :( I'll try further breaking down the steps and see what else it could possibly be.

 

Thanks again for the suggestion, though!

 

Best,

Priyanka

Hi Priyanka !
As I'm a PHP developer so I don't have sense about doing this external command thing with Command Prompt. I can only use FrontlineSMS with PHP and MySQL.

I've created a similar script, for a Social  Welfare Community , recently. If you like I would love to work for Humanity. I'm also a member of 3 different NGOs here in Pakistan. 

If you provide me vaccination schedule according to date of birth then I will start working on script and hopefully I'll be able to send you in a week or sooner.

Hi Moin,

 

I'm glad to hear you're doing similar work in Pakistan! Kudos to you for that. Thanks for your offer of help, I appreciate it. I'll be sure to let you know if I end up needing it.

 

Best,

Priyanka

Hi Priyanka,

 

Are you able to add any logging to your Java application to check what it is receiving from FrontlineSMS and what it is responding?  This would be really handy to diagnose the problem you are having.

 

Thanks,


Alex

Hi Alex,

 

I'll try a simple text log and see if the app is even accepting args from FSMS, and one for what it is outputting as well. I'll let you know what I find out! Thanks for the suggestion - hopefully it helps!!

 

Best,

Priyanka

Thanks Priyanka, let us know how you get on!

 

Laura

RSS

Photos

  • Add Photos
  • View All

© 2013   Created by kiwanja.net.   Powered by

Badges  |  Report an Issue  |  Terms of Service