|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Fri Mar 14, 2025 10:52 |
Page: 1 2 Next
Keywords: Mode: All keywords (AND) |
Mon Aug 31, 2009 21:59
|
kaloyzki: I was able to make the sender receive a confirmation of message received but I still cannot make the script check if the format is correct then if its correct.
if txt format = correct
send a confirmation of message received to the sender
elif
forwards the message to the destination
else
sorry incorrect format.
fi
how? :?
|
Sun Aug 30, 2009 22:05
|
kaloyzki: Okay so now I was able to make sms3 reply whenever the format is correct and also whenever it is not followed.
But the problem is whenever the format is not followed, it gives a reply that the message format is incorrect and it still forwards the message.
And whenever the format is followed, it gives a reply that the message is now being sent but the message is not forwarded at all.
Here's the code btw:
#Ekstract data from SMS that received
FROM=`formail -zx From: < $2`
TEXT=`formail -I "" <$2 | sed -e"1d"`
#Check message if contain tag 'txt'
TEXTS=`echo $TEXT|sed -e's/[\t]//g'`
if echo $TEXTS|grep -qi "txt"
then
#if format is correct send a confirmation of message received
FILENAME=`mktemp /var/spool/sms/outgoing/send_XXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Thank you. Your message is now being sent." >>$FILENAME
else
#if format is incorrect reply with an error message
FILENAME=`mktemp /var/spool/sms/outgoing/send_XXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Your message format is incorrect. Type txt<space>[09151234567]<space>[message]" >>$FILENAME
fi
I'm confused... I want it the other way around. :(
|
Sun Aug 30, 2009 21:28
|
kaloyzki: Hello,
I'm trying to add additional feature to this sms forwarding.
I'm working on making the sender follow a format to be able to use the service by composing a short message following this format:
txt<space>09151234567<space>message
If the format is incorrect, it'll send an error reply. If it's correct, it'll reply with a "message being sent".
But I can't seem to make it work... The code below is the one I'm messin with.
#Check if "txt" is found in message
TEXTS=`echo $TEXT|sed -e's/[\t]//g'`
if echo $TEXTS|grep -qi "txt"
then
#if format is correct send a confirmation of message received
FILENAME=`mktemp /var/spool/sms/outgoing/send_XXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "$Thank you. Your message is now being sent." >>$FILENAME
else
#is format is incorrect reply with an error message
FILENAME=`mktemp /var/spool/sms/outgoing/send_XXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Your message format is incorrect. Type txt<space>[09151234567]<space>[message]" >>$FILENAME
fi
|
Fri Aug 28, 2009 17:32
|
kaloyzki: Sorry bout that confusing statement. Anyway, I'm trying to figure out how I can make it appear that the forwarded message will contain the number that originally sent the message.
example:
powered by myWebsite.
SM from: 09151234567
message: hello world
Is it also possible to format the message in such a way that it will appear like the example given above?
I tried making the above example but I'm a bit confused.
echo -n "$KEY $TEXT">> $FILE
If I add the $KEY, the value of it is already the FORWARD_TO. How do I make it FROM?
|
Fri Aug 28, 2009 09:45
|
kaloyzki: Woops, I got confused. I thought the senders number is being included in every message sent. Since I was sending from my phone and receiving from my phone, but it wasn't all along.
So how do I make it work so that every forwarded message will include the original senders number?
|
Tue Aug 25, 2009 20:50
|
kaloyzki: Thanks keke, you have been very helpful!
I'm thinking of adding registration to this forwarding script. But as always, I'm having a very difficult time. Sigh. Currently studying how to get this working.
|
Tue Aug 25, 2009 17:31
|
kaloyzki: Hi,
I did made a mysql database and table and used the script above. But I'm having an error:
sed: read error in stdin: Is a directory
/usr/local/bin/smsql.sh line 37: line 37 mysql: command not found
This is what's on line 37:
mysql $SQL_ARGS "insert into $SQL_TABLE (type,sent,received,sender,receiver,text) values (\"RECEIVED\",\"$SENT\",\"$DATE\",\"$FROM\",\"$SUBJECT\",\"$TEXTSQL\");";
Do I also have to create the fields on the table that I made or this script will take care of it?
I did tried making the fields too:
CREATE TABLE `stored_messages`.`sms_log` (
`type` INT NOT NULL ,
`sent` INT NOT NULL ,
`sender` INT NOT NULL ,
`recevier` INT NOT NULL ,
`msgid` INT NOT NULL ,
`text` INT NOT NULL ,
`received` INT NOT NULL
) ENGINE = MYISAM
Did i do it right?
|
Mon Aug 24, 2009 18:46
|
kaloyzki: Hi,
I think I found the solution to my question above, I did some research and found out about WinSCP and ScriptFTP. Both of them can be configured to automatically download a file on my hosted disk space and place them into my outgoing folder. All I have to do is to set a cron job or a scheduler then its up to sms3 to check that folder and send it!
Thanks keke and stefan for the very wonderful sms server tools! :mrgreen:
|
Mon Aug 24, 2009 18:20
|
kaloyzki: Thanks so much keke!
I ran the service and had some of my friends test it, however, when I checked the logs and did a peek through the failed folder, there were a lot of them. I was thinking, is there a way as to how I can notify the sender that the message they've sent was not sent for some reason, by checking the failed folder?
and or just a simple reply that their message has been received by sms3 and that is is being/aready sent?
TIA
|
Sat Aug 22, 2009 17:59
|
kaloyzki:
Hey I have a question, you see I had the website hosted in the US and that my sms3 server is located locally. How am I going to be able to automatically download the message created by my website hosted abroad and send it to my sms3 server hosted locally? ftp? how? :roll:
Please check this post. You may run that kind of script on your server running Smstools3 and call it from the website located in the US.
I'm sorry but I didn't quite get what you meant to say..
|
Sat Aug 22, 2009 16:50
|
kaloyzki: Hello,
I also would like to add "powered by myWebsite" on the sms forwarding script. How would I achieve this?
|
Sat Aug 22, 2009 16:48
|
kaloyzki: Yes, I did used javascript on my text area. Oh well, you are right, I better set Autosplit: 0 too.
Where do i place this code?
$message = "powered by myWebsite";
$text = substr($text, 0, 160 - strlen($message) -1) .$message;
My work around on this one is to place the "powered by myWebsite" on this area of the send.php
fwrite($file, "To: ". $_POST["destination"] ."\n");
fwrite($file, "\n");
fwrite($file, "powered by myWebsite ". $_POST["message"] ."\n");
And it works just fine...
|
Fri Aug 21, 2009 20:15
|
kaloyzki: The counter on uLink used to basically do nothing at all, it just counts. hehe. But it works by sending messages in split form with part numbers on it.
But when I checked the site again this very moment, they removed it and implemented a max character limit on the message of 130 characters. Only 130 characters because they insert a text message on every message sent through their web form: "powered by uLink bla bla".
I decided not to implement sending large text messages on the web form and implemented a 160 character max. I did this because I think if a user is typing a lot of characters, more than 1000 characters, it's gonna stall the problematic modem and or delay the sending of other messages.
But I did tried sending a super long message on the web form I'm making and I was able to send it through sms3 with no prob at all! :mrgreen:
Hey I have a question, you see I had the website hosted in the US and that my sms3 server is located locally. How am I going to be able to automatically download the message created by my website hosted abroad and send it to my sms3 server hosted locally? ftp? how? :roll:
Another question, how do I add "powered by myWebsite" to every text message sent through my web form?
|
Fri Aug 21, 2009 17:39
|
|
Fri Aug 21, 2009 13:36
|
kaloyzki: Hello,
I'm having this error: Parse error: parse error in C:\xampp\htdocs\send.php on line 16
line 16 is: </body></html>
What could be the problem?
Also, since I'm using cygwin and XAMP as my web server, is this line correct?
copy($filename, "C:\cygwin\var\spool\sms\outgoing\". basename($filename));
send script
<?php>
$filename = tempnam("","");
$file=fopen($filename,"w");
fwrite($file, "To: ". $_POST["destination"] ."\n");
fwrite($file, "\n");
fwrite($file, $_POST["message"] ."\n");
fclose($file);
copy($filename, "C:\cygwin\var\spool\sms\outgoing\". basename($filename));
unlink($filename);
?>
<html><body>
Your message will be sent in a few seconds
</body></html>
|
Tue Aug 18, 2009 10:33
|
kaloyzki: Another tip for users having this same problem on Windows using cygwin, make sure that no other program is using your com port. Be it hyperterminal or if you are using vmware, disconnect first your serial port in your virtual machine.
|
Mon Aug 17, 2009 18:26
|
kaloyzki: Hey keke, I found this site and it works pretty well in sending and receiving messages in the phils.
Great thing about this site is that you can view replies in your so called "inbox".
its at uLink
here's a screenshot of the web form:
web form
The only problem i've encountered with them is that sometimes the message never gets to the recipient and that sometimes when you reply to the message it never goes to your inbox. But sometimes it also works flawlessly. (maybe they're using nokia 6210's too :mrgreen: )
|
Mon Aug 17, 2009 18:12
|
kaloyzki: Wow, thanks a lot keke!
I'm gonna try that now. Yes my plan changed a bit :, but still i'm gonna pursue the webform thinggy. :mrgreen:
At first i thought of using sed and take out the destination # and message from the received message and create a new file in the outgoing directory.
I'm actually reading scripting book right now but I'm having a hard time understanding it and it just makes me sad :(
|
Mon Aug 17, 2009 14:25
|
kaloyzki: I made an illustration in case my post above isn't clear...
illustration
|
Mon Aug 17, 2009 14:08
|
kaloyzki: Hello,
I'm trying to make an sms forwarding service. I finally made sms server tools3 functioning (thanks Keke & God).
I've already defined the queues and provider section in my smsd.conf. I also tried it with sendsms and tried sending a message to different operator and it was successfully sent using the defined queues and provider.
The objective of this sms forwarding is to make use of the no-limit texting subscription offered by the operators. Same network text message will be unlimited so I'm thinking if sms server tools3 can transfer a message received in the incoming folder and classify it according to the access code (63939, 63917, etcs) and send the message through that modem that is same with the final destination of the message.
|
Sun Aug 16, 2009 20:36
|
kaloyzki: I did tried using the default value for baudrate and rtscts but using them gives me same error as this: GSM1: Modem is not clear to send
baudrate = 9600/115200 works on me
rtscts = no
If i turn on the handshake I get an error. I dont know why. Is it because of the cable I'm using? By the way, this is the cable I'm using self-made dlr3p from that website.
I bought 4pcs dlr3p clone cable but none of them worked. Further research lead me to atrox.at and decided to build one and it worked, finally got a response from the hyperterminal/minicom compared to the other 4pcs which didn't gave any response at all.
|
Sun Aug 16, 2009 18:40
|
kaloyzki: Thank you so much keke!
After three-four grueling days, i finally found the right configuration for my setup.
If you are using a nokia 6210 and is encountering same problem as mine, consider adding the two lines below:
baudrate = 9600
rtscts = no
|
Sun Aug 16, 2009 16:43
|
kaloyzki: My apologies to the thread starter....
I've already resolved this issue thank you!
|
Sun Aug 16, 2009 04:20
|
kaloyzki: At first I thought I was having some sort of communication problem for I was using Windows Xp Pro as the host OS and then on VMware I installed Fedora 10 and there I was trying to make sms server tools work. I'm pretty sure that the phone and guest OS Fedora is working for I was able to send commands and read and send SM through minicom.
But still no luck.
So I tried it on bare Windows XP, used hyperterminal and the phone seems to be responding very well.
Im using two (2) Nokia 6210 btw. and I tried em both already.
What am i doing wrong? Sigh. Please help.
|
Sun Aug 16, 2009 04:14
|
kaloyzki: Update:
here's my supposed to be smsd.conf
devices = GSM1, GSM2, GSM3
failed = /var/spool/sms/Failed
sent = /var/spool/sms/Sent
blacklist = /var/spool/sms/Lists/Blacklist.txt
autosplit = 2
hangup_incoming_call = yes
logfile = /var/log/smsd.log
loglevel = 7
os_cygwin = yes
[queues]
Globe = /var/spool/sms/Globe
Smart = /var/spool/sms/Smart
Sun = /var/spool/sms/Sun
[provider]
Globe = 63905, 63906, 63915, 63916, 63917, 63926, 63927, 63935
Smart = 63907, 63908, 63909, 63910, 63918, 63919, 63920, 63921, 63928, 63929, 63907, 63935, 63937, 63938
Sun = 63922, 63923, 63932, 63912
[GSM1]
# Globe Telecoms
device = /dev/com1
incoming = high
queues = Globe
primary_memory = SM
secondary_memory = ME
secondary_memory_max = 150
check_memory_method = 1
[GSM2]
# Smart Communications
device = /dev/com5
incoming = high
queues = Smart
primary_memory = SM
secondary_memory = ME
secondary_memory_max = 150
check_memory_method = 1
[GSM3]
# Sun Cellular
device = /dev/com6
incoming = high
queues = Sun
primary_memory = SM
secondary_memory = ME
secondary_memory_max = 150
check_memory_method = 1
smsd.log
2009-08-16 12:11:24,2, smsd: Smsd v3.1.5 started.
2009-08-16 12:11:24,2, smsd: Running as kaloyzki:None.
2009-08-16 12:11:24,7, smsd: Running startup_check (shell): /tmp/smsd_script.WqoE1h /tmp/smsd_data.MfTJxc
2009-08-16 12:11:24,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0
2009-08-16 12:11:24,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2009-08-16 12:11:24,5, GSM1: Modem handler 0 has started. PID: 2476.
2009-08-16 12:11:24,5, GSM1: Using check_memory_method 1: CPMS is used.
2009-08-16 12:11:24,5, GSM2: Modem handler 1 has started. PID: 1944.
2009-08-16 12:11:24,5, GSM2: Using check_memory_method 1: CPMS is used.
2009-08-16 12:11:24,6, GSM2: Checking device for incoming SMS
2009-08-16 12:11:24,6, GSM2: Checking if modem is ready
2009-08-16 12:11:25,5, smsd: Outgoing file checker has started. PID: 2184.
2009-08-16 12:11:25,5, GSM3: Modem handler 2 has started. PID: 3388.
2009-08-16 12:11:25,5, GSM3: Using check_memory_method 1: CPMS is used.
2009-08-16 12:11:25,6, GSM1: I have to send 1 short message for /var/spool/sms/Globe/send_Tixktq
2009-08-16 12:11:25,6, GSM1: Sending SMS from to 639053502127
2009-08-16 12:11:25,6, GSM1: Checking if modem is ready
2009-08-16 12:11:26,6, GSM3: I have to send 1 short message for /var/spool/sms/Sun/send_bKYKvH
2009-08-16 12:11:26,6, GSM3: Sending SMS from to 639221234567
2009-08-16 12:11:26,6, GSM3: Checking if modem is ready
2009-08-16 12:11:28,3, GSM2: Modem is not clear to send
2009-08-16 12:11:29,3, GSM1: Modem is not clear to send
2009-08-16 12:11:29,3, GSM3: Modem is not clear to send
2009-08-16 12:11:41,3, GSM2: Modem is not clear to send
2009-08-16 12:11:42,3, GSM1: Modem is not clear to send
2009-08-16 12:11:42,3, GSM3: Modem is not clear to send
2009-08-16 12:11:46,5, smsd: Moved file /var/spool/sms/outgoing/send_KQymny to /var/spool/sms/Globe
2009-08-16 12:11:54,3, GSM2: Modem is not clear to send
2009-08-16 12:11:55,3, GSM3: Modem is not clear to send
2009-08-16 12:11:55,3, GSM1: Modem is not clear to send
2009-08-16 12:12:07,3, GSM2: Modem is not clear to send
2009-08-16 12:12:08,3, GSM1: Modem is not clear to send
2009-08-16 12:12:08,3, GSM3: Modem is not clear to send
2009-08-16 12:12:21,3, GSM2: Modem is not clear to send
2009-08-16 12:12:22,3, GSM3: Modem is not clear to send
2009-08-16 12:12:22,3, GSM1: Modem is not clear to send
2009-08-16 12:12:27,5, smsd: Moved file /var/spool/sms/outgoing/send_Yq17jr to /var/spool/sms/Sun
2009-08-16 12:12:27,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 2184.
2009-08-16 12:12:27,2, GSM2: Modem handler 1 terminated. PID: 1944, was started 09-08-16 12:11:24.
2009-08-16 12:12:27,2, smsd: Smsd mainprocess terminated. PID 2184, was started 09-08-16 12:11:24.
2009-08-16 12:12:27,6, GSM1: Moved file /var/spool/sms/Globe/send_Tixktq to /var/spool/sms/Failed/send_Tixktq
2009-08-16 12:12:27,6, GSM3: Moved file /var/spool/sms/Sun/send_bKYKvH to /var/spool/sms/Failed/send_bKYKvH
2009-08-16 12:12:27,2, GSM1: Modem handler 0 terminated. PID: 2476, was started 09-08-16 12:11:24.
2009-08-16 12:12:27,2, GSM3: Modem handler 2 terminated. PID: 3388, was started 09-08-16 12:11:25.
|
Page: 1 2 Next
Time in this board is UTC.
|
|
|
 |
|
 |
|