FrontlineSMS

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

Hi Everyone,

                    I am kindoff stuck at a point in my project.

 

The problem goes like this...

 

I receive a message to FLSMS using Huawei E series modem;

 

In the keywords tab, I have defined a keyword and through "External Commands", I want to run a java program by accepting  the sender number and the message contents as arguments.

 

Hence in the "Execution Details" space, I have given it as --- 

java acceptmess${sender_number}${message_content}

(A file is also attached- file 1)

 

But the problem is, I am able to run the java program, but not able to accept the arguments passed through the command line. 

 

Also, I am able to write a shell script, do the same job and also accept arguments. But I want to know how it is done in java.

 

I am using Ubuntu.

 

Please Help.

 

Thanks in advance.

Views: 58

Attachments:

Reply to This

Replies to This Discussion

Hi Chandan,

Tricky to tell why it's working for your shell script, but not for your Java program.  Would it be possible just to call the Java program from the shell script?

Alex

Also you may be missing a space after "acceptmess".

I tried all sorts of combinations , with space , without space, with and without $ sign, space between { }, etc etc.... Nothing seems to work :-(

 

I am able to call the any program using cmd line. may it be java program or shell script, i am able to call it. But i am not able to process the arguments in java program, but i am able to process the same in shell script.... :-(

 

Why not just call the shell script from FrontlineSMS, and call Java from the shell script?
Hmmm, seems to a good idea. Will try :-) but all my other modules of the project are in java, so it will be a problem to integrate Anyways will get back to you. Thanks  :-)

RSS

© 2014   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service