我有Kannel和Goip32。因此,Goip上的1个sim-link在Kannel上是1 smsc。这被配置为:
group = smsc
smsc = smpp
smsc-id = goip101
host = 192.168.1.48
port = 7777
transceiver-mode = true
smsc-username = "goip101"
smsc-password = ""
system-type =
max-pending-submits = 1
log-file = "/var/log/kannel/smsc-101.log"
log-level = 2
...
2-31
...
group = smsc
smsc = smpp
smsc-id = goip132
host = 192.168.1.48
port = 7777
transceiver-mode = true
smsc-username = "goip132"
smsc-password = ""
system-type =
max-pending-submits = 1
log-file = "/var/log/kannel/smsc-132.log"
log-level = 2
但是kannel在随机smsc上发送短信,并且在goip101上发送sms后可能是10 sms,goip122 - 5 sms,goip110 - 1 sms(例如)。
如何配置kannel到第一个选择goip101,然后goip102,然后goip103 ......?
Kannel的目的是在不同的smsc之间进行负载平衡。
如果您绝对想强制执行此顺序,则可以在配置中使用不同的smsc-id,并在发送时强制使用smsc-id。
不要忘记为每个smsc-id添加allowed-smsc-id
设置,否则即使未指定smsc-id,Kannel仍将共享负载。
例如,使用此配置:
group = smsc
smsc = smpp
smsc-id = idSite1
host = hostname1
port = port1
transceiver-mode = true
smsc-username = username1
smsc-password = password1
max-pending-submits=50
group = smsc
smsc = smpp
smsc-id = idSite2
host = hostname2
port = port2
transceiver-mode = true
smsc-username = username2
smsc-password = password2
max-pending-submits=50
如果您在发送时指定smscid=idSite1
,它仍将使用idSite1或idSite2发送。
您需要在第一个smsc定义的末尾添加allowed-smsc-id = idSite1
,在第二个结束时添加allowed-smsc-id = idSite2
您必须在配置中指定smsc-id,并且可以添加更严格的附加参数
group = smsc
smsc = smpp
smsc-id = goip101
preferred-smsc-id=goip101
allowed-smsc-id=goip101
host = 192.168.1.48
port = 7777
transceiver-mode = true
smsc-username = "goip101"
smsc-password = ""
system-type =
max-pending-submits = 1
log-file = "/var/log/kannel/smsc-101.log"
log-level = 2