在一台服务器上,我使用opensmppbox安装了kannel,并且一切正常。在另一台服务器上,我为opensmppbox配置了SMSC,还为假冒的smsc配置了SMSC。当我尝试将消息发送到opensmppbox(curl "http://localhost:13013/cgi-bin/sendsms?smsc=opensmppbox1&username=simple&password=simple123&from=100&to=2121&text=tere"
)时,消息已发送,但发送到了假smsc,而不是opensmppbox smsc。
如果我不得不猜测我的配置有缺陷,但是由于我使用Kannel的经验非常有限,我无法弄清楚出了什么问题。
Here's the config:
group = core
admin-port = 13000
admin-password = test
admin-deny-ip = "*.*.*.*"
admin-allow-ip = "127.0.0.1"
smsbox-port = 13001
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
dlr-storage = internal
log-file = "/var/log/kannel/mingiinfo.log"
log-level = 0
group = smsbox
smsbox-id = mysmsbox
bearerbox-host = localhost
sendsms-port = 13013
log-file = "/var/log/kannel/mingi2info.log"
log-level = 0
group = sendsms-user
username = simple
password = simple123
group = smsc
smsc = fake
smsc-id = FAKE
port = 10000
log-level = 0
group = smsc
smsc = smpp
smsc-id = opensmppbox1
allowed-prefix = "00"
host = test.server.com
port = 2346
smsc-username = "test"
smsc-password = testpw
system-type = "mysmsbox"
dest-addr-ton = 1
dest-addr-npi = 1
source-addr-ton = 5
source-addr-npi = 1
keepalive = 30
log-file = "/var/log/kannel/smsc_server2.log"
log-level = 0
interface-version = 34
validityperiod = 720
transceiver-mode = true
unified-prefix = "-,00"
group = smsbox-route
smsbox-id = mysmsbox
smsc-id = opensmppbox1
group = sms-service
keyword = default
text = "hi how are you"
accepted-smsc = opensmppbox1
所以我的问题是,要向另一台服务器上运行的opensmppbox发送消息,我必须更改/修复什么?
答案 0 :(得分:0)
要强制 SMSC ,只需将其添加到您的URL API中,例如&smsc=opensmppbox1
检查下面的链接以了解您的情况
curl "http://localhost:13013/cgi-bin/sendsms?smsc=opensmppbox1&username=simple&password=simple123&from=100&to=2121&text=tere&smsc=opensmppbox1"