使用kannel&发送短信smmpsim

时间:2015-03-25 21:27:02

标签: docker kannel

我正在尝试使用kannel&发送短信smppsim。 我使用docker作为容器。 我用这个kannel.conf:

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
admin-allow-ip = "127.0.0.1;192.168.59.103"
box-allow-ip = "127.0.0.1;192.168.59.103"

group = smsc
smsc = smpp
smsc-id = SMPPSim
host = 192.168.59.103
port = 2775
transceiver-mode = 1
smsc-username = smppclient1
smsc-password = password
system-type = 'VMA'
#service-type = 'test'
interface-version = 34
#system-id = smppclient
preferred-smsc-id = SMPPSim
connect-allow-ip = 192.168.59.103

group = smsbox
bearerbox-host = bearerbox
sendsms-port = 13013
global-sender = 13013

group = sendsms-user
username = tester
password = foobar

group = sms-service
keyword = default
text = "No service specified"

当发送发送短信的请求时,我得到“0:接受发送”

我在smsbox日志中看到了这些错误:

2015-03-21 20:20:52 [1] [3] DEBUG: Status: 202 Answer: <Sent.>
2015-03-21 20:20:52 [1] [3] DEBUG: Delayed reply - wait for bearerbox
2015-03-21 20:20:52 [1] [0] DEBUG: Got ACK (0) of 74f9cefe-db95-4b7d-aa99-f07395d32915
2015-03-21 20:20:52 [1] [0] DEBUG: HTTP: Resetting HTTPClient for `192.168.59.3'.
2015-03-21 20:20:52 [1] [1] ERROR: Error reading from fd 24:
2015-03-21 20:20:52 [1] [1] ERROR: System error 104: Connection reset by peer
2015-03-21 20:20:52 [1] [1] DEBUG: HTTP: Destroying HTTPClient area 0x7fe8d0000ad0.

Bearbox没有出现任何错误,似乎将消息传递给smppsim,smppsim在日志中显示:

21 Assessing state of 1 messages in the OutboundQueue
21 Message:2 state=DELIVERED

短信没有被发送,可能是什么错误?

2 个答案:

答案 0 :(得分:1)

我认为你的Kannel配置文件存在问题,特别是对于smsbox和后来的部分。我使用以下作为smsbox

group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = your sim number which you use in USB modem
sendsms-chars = "0123456789 +-"
log-file = "/var/log/kannel/smsbox.log"
log-level = 0
access-log = "/var/log/kannel/access.log"

您可以从here获取完整的配置文件。这对我来说很好。

答案 1 :(得分:0)

这可能是一个问题,因为它可能会因为某些原因而无法正常运行。 而SMPPSim只是kannel的测试工具。它不会真正向您或提到的手机号码发送消息。要发送真实消息,您需要添加gsm调制解调器或SMS操作员详细信息。 您可以参考kannel.org上的userGuide。 要查看您的kannel状态,只需转​​到您的kannel的http://localhost:13000/status?password=password(password