Kannel configuration for multiple smsc

I created several SMSC SMPP connections.

after setting, I have sms, but sms is sent with random smsc.

How can I control the channel for sending sms with smpp that I want to send.

+7
source share
2 answers

You can specify which smsc to send in the view to the channel server, for example:

GET /cgi-bin/sendsms?smsc=$smsc&username=$user&password=$password&to=$receipient&text=$text&dlr-mask=$dlrMask&dlr-url=$dlrUrl 

where $smsc should match the smsc-id that you have in your kannel.conf file

The documentation is in the section "Table 6-16. CGI variables for SMS (send-sms)".

0
source

By default, Kannel will route the message in a circular fashion between all connected SMSCs.

There are three SMSC parameters that control routing for a specific SMSC:

  • denied-smsc-id SMS messages with an SMSC identifier equal to any of the identifiers in this list are never routed to this SMSC. Multiple entries are separated by a semicolon (';')

  • allowed-smsc-id This list is the opposite of the previous one: only SMS messages with the SMSC code in this list are always sent to this SMSC. Multiple entries are separated by a semicolon (';')

  • preferred-smsc-id SMS messages with the SMSC code from this list are sent to this SMSC instead of SMSC without this identifier. Multiple entries are separated by a semicolon (';')

Juggling these variables allows you to create from very simple and very complex routing scripts.

Here is a very simple example:

Suppose we have 2 SMSC, smsc1 and smsc2 , and we want to send SMS messages to one of these 2 SMSC. In our kannel configuration file, add the following lines:

 group = smsc smsc-id = smsc1 allowed-smsc-id = smsc1 group = smsc smsc-id = smsc2 allowed-smsc-id = smsc2 

Now we can specify which smsc to send in the request to the kannel sendms interface:

 GET /kannel/sendsms?smsc=SMSC_ID&to=TO&text=TEXT 

where SMSC_ID can be one of smsc1 or smsc2 .

In this example, if we do not specify any smsc in the GET request, sms will not match any of the rules for smsc1 or smsc2 and will not be sent. We can avoid this by setting SMSC by default for all outgoing messages with the following sendms-user variable:

  • Line
  • default-smsc If no SMSC identifier is specified with an HTTP request, use this default route for all push messages.
 group = sendsms-user default-smsc = smsc1 

Another option is to use the denied-smsc-id variable:

 group = smsc smsc-id = smsc1 denied-smsc-id = smsc2 group = smsc smsc-id = smsc2 denied-smsc-id = smsc1 

In this configuration, when we specify smsc in the HTTP request, sms will be redirected to smsc with this identifier, but when we do not, Kannel will return to the circular pattern between smsc1 and smsc2 .

For more advanced purposes:

For a deeper understanding of Kannel routing and more complex scenarios, you can also check this thread:

http://old.nabble.com/Routing-of-outgoing-sms-td19723248.html

+6
source

All Articles