Author |
Post |
|
#1 Tue Jan 05, 2010 03:44, 186 months ago.
|
Member
Registered: Jan 2010
Location: Manila, Philippines
|
Hi!, good day to all, I have now a SMS Tools System which is i can automatically reply to sender, but i cant send message to a number that have 3 to 4 digits, example i need to send a message to 888 my message was fall into failed. My question is how can i send message to those number like 888. I know there is way to solve this problem but i don't know how to do it. Any piece of information will be appreciated thank you..
|
|
#2 Tue Jan 05, 2010 11:18, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
There is a From_TOA defined in the message files. Check what kind of values it has with normal messages and messages from like 888. As you already have an eventhandler to create a reply, change the code to include something like this: #!/bin/bash
if [ "$1" == "RECEIVED" ]; then
CALL_TYPE=`formail -zx Call_type: < $2`
# Ignore "missed calls" if [ "x$CALL_TYPE" != "xmissed" ]; then
FROM=`formail -zx From: < $2` FROM_TOA=`formail -zx From_TOA: < $2`
if [[ "$FROM_TOA" == *$'international'* ]]; then REPLY_TO="$FROM" else # Do not answer to alphanumeric "numbers" if [[ "$FROM_TOA" != *$'alphanumeric'* ]]; then # Use "unknown" type of address for other numbers REPLY_TO="s$FROM" fi fi
if [ "x$REPLY_TO" != "x" ]; then # # Send a reply. # fi fi fi 'bash' Syntax Highlight powered by GeSHi This script (which is not complete and not tested) will check the Type Of Address and will use "unknown" TOA for short numbers and international TOA for other numbers. Messages with an alphanumeric TOA are ignored because those cannot be replied (for example From: Saunalahti, From_TOA: D0 alphanumeric, unknown). You can also check if the number starts with your country code: if it does not, use s prefix when sending an answer. « Last edit by keke on Thu Jan 07, 2010 13:10, 186 months ago. »
|
|
#3 Wed Jan 06, 2010 02:59, 186 months ago.
|
Member
Registered: Jan 2010
Location: Manila, Philippines
Topic owner
|
Hi! keke thank you for reply.. i have a little confusing on your reply script is it email style?, look at may SMS file format. I am using SMSTools3.
From: 639085024490 From_TOA: 91 international, ISDN/telephone From_SMSC: 639180000507 Sent: 09-04-04 17:09:59 Received: 09-04-04 17:10:08 Subject: smart_rcv Modem: smart_rcv IMSI: 515030100972246 Report: no Alphabet: ISO Length: 19
Filsat key. Astrero
and this is my sending format.
To: 639283861891 Modem: 1_SmartRcv Sent: 09-11-25 15:05:48 IMSI: 515030103802599
From: Eggpa Trading
Your request is now on queues. Please wait for a moment while we process your request. Make sure that our STB Box is ON until we activate.
|
|
#4 Wed Jan 06, 2010 03:17, 186 months ago.
|
Member
Registered: Jan 2010
Location: Manila, Philippines
Topic owner
|
From this file i want to send message to 888 number for example.
To: 888 Modem: 1_SmartRcv Sent: 09-11-25 15:05:48 IMSI: 515030103802599
Request for load
|
|
#5 Wed Jan 06, 2010 11:46, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
bhebsquines wrote i have a little confusing on your reply script is it email style?, look at may SMS file format.
SMS file uses email style format. First there are header lines, as many as required. After the first empty line, rest of a file belongs to the message body. bhebsquines wrote From this file i want to send message to 888 number for example.
To: 888 Modem: 1_SmartRcv Sent: 09-11-25 15:05:48 IMSI: 515030103802599
Request for load
You should use To: s888. When you receive a message from 6390850... or from 888, the script should create REPLY_TO variable with a correct format. Just send your return message to that number. Are you currently using an eventhandler, anyway? Take a look at this post. It contains an eventhandler code which will take a number from the SMS and then forwards a message to that number. It's near to what you are needing, if I have understood your question correctly  .
|
|
#6 Thu Jan 07, 2010 02:16, 186 months ago.
|
Member
Registered: Jan 2010
Location: Manila, Philippines
Topic owner
|
Thank you for your quick response and yes i have already event handler which is automatically reply to those user who register and request their needs on our services, i will comeback here after tried this option thank you!.
|
|
#7 Thu Jan 07, 2010 13:12, 186 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
I have fixed the script, it had a typo when testing for 'alphanumeric' 
|