SMS Server Tools 3
 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. The forum is currently read-only, but will open soon. Sat Dec 21, 2024 12:58
SMSTools3 Community » Help and support Bottom

Load Balance - exactly equal

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Sep 2012
Location: Miami Beach, United States of America
Ubuntu 12.04:
3.1.14:
Smsd installed from: sources
Huawei E172:
Interface: USB

Hi

I am using special SIMs that can only send 50 SMS per day. I have 4 modems. How do I make sure that each one only sends a max of 50 messages? I intend on running the command "sendsms 491721234567 'Hello, how are you'" 200 times. That way I expect 50 messages on each of the 4 modems.

How do I make sure that this is 50 messages per modem exactly?

Member
Registered:
Aug 2012
Location: Rio de Janeiro/RJ, Brazil
I believe this is a simple task. Just use queues and use your script to control the number of messages.

devices = GSM01,GSM02,GSM03,GSM04

[your usual configuration goes here]

[queues]
ALL_MODEMS  = /var/spool/sms/queue/all
GSM01 = /var/spool/sms/queue/GSM01
GSM02 = /var/spool/sms/queue/GSM02
GSM03 = /var/spool/sms/queue/GSM03
GSM04 = /var/spool/sms/queue/GSM04

[providers]
ALL_MODEMS = 0,1,2,3,4,5,6,7,8,9,s
GSM01 = 0
GSM02 = 0
GSM03 = 0
GSM04 = 0

 
'smsdconf' Syntax Highlight powered by GeSHi



And then, apply this diff to original sendsms. Not tested intensively but may to the job. This assumes that you will
Quote
sendsms GSM0[1 or 2 or 3 or 4] NUMBER "Message text"
and control the limit of 50 in any other way.

The method allows you to send 50 messages to modem GSM01, 50 to GSM02 and so on, but do not control or distribute them..


45,56c45,46
< MODEM=$1
< DEST=$2
< TEXT=$3
<
< if [ -z "$MODEM" ]; then
<   printf "Modem: "
<   read MODEM
<   if [ -z "$MODEM" ]; then
<     echo "Cannot send without a modem defined."
<     exit 1
<   fi
< fi
---
> DEST=$1
> TEXT=$2
76c66
< if [ $# -gt 3 ]; then
---
> if [ $# -gt 2 ]; then
78c68
<   while [ $n -gt 2 ]; do
---
>   while [ $n -gt 1 ]; do
89d78
< echo "Modem: $MODEM"
92d80
<
126c114
<   FILE=`mktemp "/var/spool/sms/queue/$MODEM"_XXXXXX`
---
>   FILE=`mktemp /var/spool/sms/outgoing/send_XXXXXX`
 
 
'smsdconf' Syntax Highlight powered by GeSHi


Cheers

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.