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

Hello friends,
I am trying to learn about frontline sms external commands feature.
We want to use it to automatically export the sms database table to a csv file.
I also want to know if there is an additional manual that has examples of using this feature. We are in the requirements building stage of our project and are trying to understanding the potential of this feature.

Tags: automation, commands, external

Views: 2189

Replies are closed for this discussion.

Replies to This Discussion

Yes it does!
thanks a lot.
Hi Kadu,
I am happy to tell you that External command, FrontlineSMS command option works great with php url also. we can get inputs from frontline, display text on webpage, and generate xml code on the fly which frontline correctly sends sms's to.

Great Design!

Now we will be able to connect our teachers in villages directly to our webpages through their sms's, that can then be seen worldwide immediately.

And whats more, we can also use webpage response to send sms to anybody through frontline,
The sms sent by xml code is atleast 50% faster than the sms sent by the autoreply feature, if not more.
Hi Gayatri

Thanks for keeping us posted on your progress here! Great to hear.

Would you be interested in sending me some information on what you'll be doing with FrontlineSMS - the project(s), what the software allows you to do, the impact it's having, etc? I'm beginning to build case studies for regular blog posts on the subject. A couple of photos are also very useful.

If you can help, let me know! Feel free to email me about it if you like.


Hi Ken,
Sorry for the delay - I was swamped with work, and couldnt get back to you.
Yes we would be very happy to give you information on how we plan to use frontline. We have just made a very first small release to get sms's from all over the state for data analysis, and collecting news in 1 place.
But we will know the impact only in the coming few months. So I will get back to you with full information in 1 month or so, when we start using it more and more.
hi Gayatri,

I'm pondering on the same idea as you have done.

Can you provide some samples how you were able to connect frontlineSMS to your website?

were you able to send a query to your site and then get the result via sms?

I'd really love to learn these as there's no developer here that can do this for us.

Thanks a lot!

Hi Alvin,
We have not yet tested querying the web database, although that is very much feasible since we already can read data from sms, process it and send some message back to frontline.
I will ask my web developer to provide the sample code on Monday.

Hi amg99,

Here is an example i set up to try the external command feature. i works fine on my computer
Hope this can help.

Use case:

This example aims at giving prices of food products stored in a database to phone users sending a request.
The user sends by sms the name of the product of which they want to know the price.

The script will look for the price in a database and send it back through frontlinesms.

On my computer, i created a database named "sims".

This database contains a table "produits" in which I store prices of food products in different markets of the country.

FrontlineSMS Setup:

Setup a keyword.

In my example, keyword is "MIL".

For this keyword, setup an action:

type of action: external command

Use the following parameters:

Execution type: HTTP Request

Command: http://localhost/test/script.php?produit=${keyword}

Note: in my case, I created a textfile named "script.php" stored in the "www/test" folder of my local web server hosted on the same computer.

Response type: "Simpe text"

Message: Click on "Include response"

Check "send an autoresponse"

Click on done.

FrontlineSMS is setup.

You need to have a webserver setup on the local machine, create a database and have the file script.php stored in your "www/test" folder.
I attached to this message the file "script.php" and the SQL database creation instructions.

You will need to open "database.txt".
Execute the SQL instructions contained in the file on your databse server (through PhpMyadmin".
You have to create a user allowed to access the " sims" database created.

You will need to edit script.php to change the database access parameters (username, database, password..." according to the parameters you used for your user.

Once all this is done, when frontlineSMS will receive an SMs containing "MIL" it will call "script.php" with the product parameter given by "GET" method.

The script will look for the information and create a string containing the prices on the different markets.

The string is sent back to frontlineSMs which sends autoresponse by SMS.

Hope this makes sense.
Thanks Gayatri!

Will await for you Monday.

more power!

Hi Gregory,

Thank you for your sample and detailed guide. It makes perfect sense. I'm studying it and surely this will help.

All the best,

Hi Alvin,
I am attaching a document which has the php code that my web developer has written.
It is a very simple code, that simply gets data, outputs xml-type string with echo command that frontline can understand(under frontline command option of response type), and also stores the input in our database.
the echo command can be changed to give a simple text as output, that frontline can send in Plain Text response type option with $Include response, so that your user/users can get a web server generated response that tells them the message has been processed successfully
In your case, send back query response also.
Thanks Gayatri!

Just need to find time to focus on this the coming days. will update then.

BTW. FrontlineSMS was able to connect to Motorola v3i via bluetooth for sending and receiving messages.

thanks again!

Hola Carlos,
I am using the example to query a phone database.
The browser gives me what I want:
First Last: Tel: 222-222 Celular: 09-099-099

in frontlinesms I am using or would like to use somthing like:
as the sms contains the keyword and the message content, I would like to remove the keyword and just send the message content "first last" to the system, but it does not work

how could I strip of the keyword?


© 2015   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service