SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Thu Mar 28, 2024 19:29
SMSTools3 Community » Feature requests Bottom

[answered] Sending to tow to three numbers

  This topic is locked

Page:  1

Author Post
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..

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, 173 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.

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

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 ;).

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!.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I have fixed the script, it had a typo when testing for 'alphanumeric' :(

  This topic is locked

Page:  1

SMSTools3 Community » Feature requests Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.