Author |
Post |
|
#1 Wed Aug 17, 2011 17:42, 160 months ago.
|
Member
Registered: Aug 2011
Location: douala, Cameroon
|
Hi! I have my chip in a GPRS modem. I want that on receipt of an SMS, it is automatically sent SMS to multiple numbers. How? Thank you in advance.
|
|
#2 Wed Aug 17, 2011 20:03, 160 months ago.
|
Member
Registered: May 2011
Location: Lima, Peru
|
Hi;
I hadrecently started with smstools and had a similar question like you...
So, you have to config an eventhandler(is a script that runs as soon as the sms is received)
and the script is something like this... You have to edit the numbers that you want to be the recipients, in this case is for answering to the same number that sent the sms...
Hope this helps you.
Good luck
#!/bin/sh
# Please read the description in the manual of SMS Server Tools.
#run this script only when a message was received. if [ "$1" != "RECEIVED" ]; then exit; fi;
#Extract data from the SMS file FROM=`formail -zx From: < $2` TEXT=`formail -I "" <$2 | sed -e"1d"`
#Create an answer SM with the amount FILENAME=`mktemp /var/spool/sms/outgoing/answerXXXXXX` echo "To: $FROM" >$FILENAME echo "" >> $FILENAME echo "$TEXT" >>$FILENAME
|
|
#3 Thu Aug 18, 2011 07:54, 160 months ago.
|
Member
Registered: Aug 2011
Location: douala, Cameroon
Topic owner
|
Hi Thank you for your answer although I have not tested it yet because I do not know how to set up an event handler. Can you tell me how decir in detail?
|
|
#4 Fri Aug 19, 2011 02:45, 160 months ago.
|
Member
Registered: Aug 2011
Location: sleman, Indonesia
|
Create a file eg "autoreply.bak" later put the file in the directory / usr / local / bin /. then the configuration settings on the "smsd.conf" /etc/smsd.conf activate the module on smsd.conf evenhandler
|
|
#5 Thu Aug 25, 2011 12:56, 160 months ago.
|
Member
Registered: Aug 2011
Location: douala, Cameroon
Topic owner
|
Tavillo Hello! I tested your code. the SMS is transferred but the content is empty. This means that the text is not transferred. please! what to do? Especially since I want the sms to be transferred to multiple numbers.Thank you for your assistance.
|
|
#6 Mon Sep 05, 2011 01:47, 160 months ago.
|
Member
Registered: Aug 2011
Location: sleman, Indonesia
|
What version do you use??? I use the 3.10 version and do not send empty messages... or try this code
|