gpt4 book ai didi

docker - 使用 kannel 和 smmpsim 发送短信

转载 作者:行者123 更新时间:2023-12-04 10:07:43 26 4
gpt4 key购买 nike

我正在尝试使用 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: Accepted for delivery”

我在 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

短信没有发送,可能是哪里出了问题?

最佳答案

我认为这是您的 Kannel 配置文件的问题,特别是 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 获取我的完整配置文件。这对我来说效果很好。

关于docker - 使用 kannel 和 smmpsim 发送短信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29266864/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com