FrontlineSMS let users send, receive and manage SMS over a mobile network.

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,


Views: 187


Reply to This

Replies to This Discussion

Hi again Alex,


It seems that the command script in my external command just isn't going through to command line - when I run the app through command line manually, it works and creates an appropriate log file as it should but doesn't do so when I try it in FSMS. I'm at a loss as to how to get this to work - any other ideas?




Priyanka, you mentioned it was a java app. In your snapshot you are referencing "...\bin" as the name of the executable. is this correct?

If you copy the command line front FLSMS (shown in your snapsshot) and paste it into a command line prompt does it run? (even though it wont like the parameters)

Hey George (and all),


Actually, the name of the executable is VaccineSchedule, and its location ends with "...\bin". If I run that exact line of code in command prompt on my computer (with some input), it works perfectly.


I figured out that the problem isn't with the command itself - it lies with the "${message_content}" variable. If I hardcode a parameter into the FSMS command that I provided a screenshot external command (in place of message_content), it works! But when I use the message_content parameter, it doesn't pass anything into the command. I also tried using the same parameter in the "reply" box - while "${command_response}" gives me the appropriate response from the command line, "${message_content}" is not recognized as a variable! FSMS simply reads it as plain text.


I don't know if I can do much about this issue - is it a problem on my end?




well I would expect if your executable is called VaccineSchedule inside a folder called bin then the command line should look smthg like:

....\bin\VaccineSchedule <parameters>


In any case if you replaced the messsage content variable with a hard coded string and it worked, then....

Message content presumably contains some spaces. If this is the case then this will break up into several parameters on the command line. To solve the problem you should "quote" the message_content parameter. Presumably your hard coded test did not contain spaces ???


Hi everyone,


Thank you all for providing your suggestions and advice! In the interest of time, the Medic developers and I decided to just incorporate this app as a feature of PatientView itself, so as not to make it an external command. It works just fine that way. I really don't know what the issue was with the ${message_content} variable - if any of you ever figure it out, do let us know!


Again, thanks for all your help, everybody. Thanks especially to the FSMS team for offering to Skype during a busy week about it!




Hi Priyanka,


Many thanks for the update. I'm really glad to hear you've managed to find a way to get this working for your project, even if it wasn't with external commands in the end. If anyone in our team works out what the cause of the problem was we'll be sure to let you know, or if anyone in the community has any further ideas I hope they'll feel free to chip in too!


In the mean time, good luck with your work in India; it sounds like a valuable project you are working on so please do feel free to update us on how it progresses.


All the Best,


Reply to Discussion


© 2017   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service