1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META NAME="Title" CONTENT="SMS Server Tools 3">
<META NAME="Robots" CONTENT="INDEX,FOLLOW">
<META NAME="Language" CONTENT="English">
<title>SMS Server Tools 3</title>
<STYLE type="text/css">
BODY {
BACKGROUND: #ffffff; MARGIN: 5px 5px 10px; FONT: 10pt verdana, geneva, lucida, arial, helvetica, sans-serif; COLOR: #000000
}
td {
FONT: 10pt verdana, geneva, lucida, arial, helvetica, sans-serif;
}
h3 {
background-color: #DCDCFE;
}
blockquote {
background-color: #FFD;
font-size: 90%;
padding:5pt;
padding-top:1pt;
margin-bottom:5pt;
border-style: outset;
border-color: #aaaa99;
border-width: 0.05pt 2pt 2pt 0.05pt;
}
blockquote p:first-letter {
font-size: 110%;
font-weight: bold;
color: red;
}
</STYLE>
</head>
<body>
<h2><font color=blue><a href="http://smstools3.kekekasvi.com">SMS Server Tools 3</a></font></h2>
<a href="index.html">Home</a>
<h3>Configuring Providers</h3>
<!-- START --><p>
Using [queues] and [providers] is optional.
If you do not need it, leave both parts out.
If you use it with smsd version below 3.1.7, you need to write both parts together into the config file and both parts need to have
exactly the same number of lines with the same names.
With smsd version 3.1.7 or later, default value for the provider is "catch-all", which is the same as "0,1,2,3,4,5,6,7,8,9,s".
See also <a href="#example3">example 3</a> and <a href="#example4">example 4</a>.
</p>
<p>
Configuring providers enable a sort function in smsd.
It takes a look at the destination phone numbers and sorts them into many queue directories - one
queue for each phone network provider.
</p>
<p>
The individual queues allow you to assign modems specially to individual phone network providers, which
can save a lot of money in some countries.
</p>
<p>
You can configure up to 64 providers, 64 queues and 64 phone numbers for each provider.
These limits are changeable.
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[queues] <br>
name = directory <br>
name = directory <br>
... <br>
<br>
[providers] <br>
name = number prefixes <br>
name = number prefixes <br>
... <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
The name is only a short name for the queue directory.
You would typically place the name of the phone network provider here.
Spaces and control characters are not allowed here.
</p>
<p>
The number prefixes are the first digits of phone numbers that belong to the provider.
This can be a single number or a comma separated list of many numbers.
Write them in <u><b>international format</b></u> but without the first "+" character.
</p>
<p>
<b>Example:</b>
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[queues] <br>
telecom = /var/spool/sms/telecom <br>
vodafone = /var/spool/sms/vodafone <br>
<br>
[providers] <br>
telecom = 49160, 49170, 49171, 49175, 49151 <br>
vodafone = 491520, 49162, 49172, 49173, 49174, s <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
From the version >= 3.0 it is possible to define 's' for short numbers.
</p>
<p>
<b>Example 2:</b>
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[queues] <br>
finland = /var/spool/sms/finland <br>
other = /var/spool/sms/other <br>
<br>
[providers] <br>
finland = 358, s <br>
other = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
In this second example one queue is used to send messages to finnish destinations.
Also messages to short numbers are sent using this queue.
Another queue is used to send all other messages.
</p>
<p>
As defined in the <a href="configure.html">How to configure</a>, list of queues used should be defined for modems,
in this case:
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[GSM1] <br>
queues = finland <br>
... <br>
<br>
[GSM2] <br>
queues = other </b><br>
... <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
Automatic queue sorting can be overridden in the message file.
For example, header line <b>Queue: other</b> causes modem GSM2 to be used.
</p>
<p>
<b><a name="example3">Example 3:</a></b>
</p>
<p>
In some cases a modem should be selectable in the message file.
This kind of usage overrides a queue sorting, and if a modem is always selected, sorting is not required.
However, queue directories should still be defined, because they are used to store messages of each modem.
</p>
<p>
With smsd version 3.1.7 or later, the configuration could be:
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[queues] <br>
GSM1 = /var/spool/sms/GSM1 <br>
GSM2 = /var/spool/sms/GSM2 <br>
GSM3 = /var/spool/sms/GSM3 <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
A section [providers] is left out, because all definitions can default to "catch-all".
</p>
<p>
Modem definitions in the configuration could be:
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[default] <br>
queues = modemname <br>
... <br>
<br>
[GSM1] <br>
... <br>
and so on... <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
A modem can be selected using the <b>Queue: <modemname></b> header in the message file.
NOTE: if a queue is not selected, a message is sent using GSM1 because it's the first queue in the list.
</p>
<p>
<b><a name="example4">Example 4:</a></b>
</p>
<p>
In this example provider sorting is not used.
All modems will serve the MAIN queue.
First two modems will also serve the GROUP1 queue.
GSM1 will serve GROUP1 queue after MAIN queue is empty.
GSM2 will serve MAIN queue after GROUP1 queue is empty.
In addition, each modem has its own queue which is served first.
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[queues] <br>
MAIN = /var/spool/sms/queues/MAIN <br>
GROUP1 = /var/spool/sms/queues/GROUP1 <br>
GSM1 = /var/spool/sms/queues/GSM1 <br>
GSM2 = /var/spool/sms/queues/GSM2 <br>
GSM3 = /var/spool/sms/queues/GSM3 <br>
GSM4 = /var/spool/sms/queues/GSM4 <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
A section [default] is handy when the setup has lot of modems with the same settings:
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[default] <br>
gueues = modemname, MAIN <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
Modems GSM1 and GSM2 need their own definition for queues:
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[GSM1] <br>
queues = modemname, MAIN, GROUP1 <br>
... <br>
<br>
[GSM2] <br>
queues = modemname, GROUP1, MAIN <br>
... <br>
<br>
[GSM3] <br>
... <br>
<br>
[GSM4] <br>
... <br>
<br>
</font>
</TD></tr></table>
</p>
<p>
Messages without the <b>Queue:</b> header are placed into the MAIN queue.
</p>
If it's needed that messages to short numbers and without Queue header are always sent using GSM4, this addition can be used:
</p>
<ol>
<li><p><b>Ghange</b> the order of <u>queue definitions: place GSM4 right after MAIN</u>, otherwise GROUP1 will be used to send messages to short numbers.
</p></li>
<li><p>
Define providers:
</p>
<p>
<table border=1 bgcolor=lightgrey><tr><TD>
<font face="Courier New, Courier, monospace">
<br>
[providers] <br>
MAIN = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 <br>
GSM4 = s <br>
<br>
</font>
</TD></tr></table>
</p></li>
</ol>
<hr>
</body>
</html>
|