Kannel configuration for multiple smsc
Asked Answered
I

2

7

I have created multiple SMSC SMPP connection.

after configuration i have send sms but sms is send with random smsc.

How can i control kannel to send sms with smpp which i want to send.

Informant answered 22/1, 2011 at 19:7 Comment(1)
May i know how did you configure kannel for multiple smsc connections ?Fiddlehead
G
0

You can specify what smsc to send through in the submission to the kannel 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 a smsc-id you have in your kannel.conf

Documentation here, under "Table 6-16. SMS Push (send-sms) CGI Variables".

Gasify answered 23/1, 2011 at 8:3 Comment(1)
The answer is not complete. The smsc-id and the $smsc variable are not necessarily related. Following the Kannel documentation for smsc-id: "Note that if SMS Center connection has an assigned SMSC ID, it does NOT automatically mean that messages with identical SMSC ID are routed to it; instead configuration variables denied-smsc-id, allowed-smsc-id and preferred-smsc-id is used for that."Relationship
R
9

By default, Kannel will route the message in a round-robin way between all connected SMSCs.

There are three SMSC parameters which control the routing to a specific SMSC:

  • denied-smsc-id SMS messages with SMSC ID equal to any of the IDs in this list are never routed to this SMSC. Multiple entries are separated with semicolons (';')

  • allowed-smsc-id This list is opposite to previous: only SMS messages with SMSC ID in this list are ever routed to this SMSC. Multiple entries are separated with semicolons (';')

  • preferred-smsc-id SMS messages with SMSC ID from this list are sent to this SMSC instead than to SMSC without that ID as preferred. Multiple entries are separated with semicolons (';')

Juggling with these variables allows you to create from very simple to very complex routing scenarios.

Here is a very basic example:

Suppose we have 2 SMSC, smsc1 and smsc2 and we want to route sms messages to one of those 2 SMSC. In our kannel config file we 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 what smsc to send through in the request to kannel sendsms 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 don't specify any smsc in the GET request, the sms will not match any of the rules for smsc1 or smsc2 and will not be sent. We can avoid this by setting a default SMSC to be used by all outgoing message with the following sendsms-user group variable:

  • default-smsc string If no SMSC ID is given with the HTTP request, use this one as default route for all push messages.
group = sendsms-user
default-smsc = smsc1

Another option would be 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

With this configuration, when we specify the smsc in the HTTP request the sms will be routed to the smsc with that id, but when we don't, Kannel will fall back to a round-robin between smsc1 and smsc2.

For more advanced uses:

For a more in-depth understanding of Kannel's routing and more complex scenarios you can also check out this thread:

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

Relationship answered 15/4, 2012 at 20:44 Comment(1)
Sad but there is no content by exposed URLPhenica
G
0

You can specify what smsc to send through in the submission to the kannel 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 a smsc-id you have in your kannel.conf

Documentation here, under "Table 6-16. SMS Push (send-sms) CGI Variables".

Gasify answered 23/1, 2011 at 8:3 Comment(1)
The answer is not complete. The smsc-id and the $smsc variable are not necessarily related. Following the Kannel documentation for smsc-id: "Note that if SMS Center connection has an assigned SMSC ID, it does NOT automatically mean that messages with identical SMSC ID are routed to it; instead configuration variables denied-smsc-id, allowed-smsc-id and preferred-smsc-id is used for that."Relationship

© 2022 - 2024 — McMap. All rights reserved.