如何通过 smpp 连接接收短信 - Kannel

发布于 2024-12-21 20:09:06 字数 1064 浏览 1 评论 0 原文

我通过来自 Kannel 的 smpp 连接(使用 selenium SmppSim)发送消息并且它有效。 但不知何故,当我尝试接收消息或换句话说,当我尝试从 SmppSim 发送消息时,它不起作用。将 SmppSim 队列的 MO 消息放入 MO 队列中。

我尝试过这些事情。

  1. 使用相同的端口进行发送和接收(Kannel/SmppSim)。
  2. 使用不同的端口进行发送和接收(Kannel/SmppSim)。
  3. 两个组用于相同的 smsc-smpp 发送和接收。 (可能是错误的)

现在我使用端口 2775 进行发送,使用端口 2776 进行接收。

#kannel.conf
group=smsc
smsc=smpp
....
port = 2775
receive-port = 2776
transceiver-mode = true
....

在 SmppSim 中

#smppsim.props
SMPP_PORT=2775
....
SYSTEM_IDS=smppclient
PASSWORDS=password
OUTBIND_ENABLED=true
OUTBIND_ESME_IP_ADDRESS=127.0.0.1
OUTBIND_ESME_PORT=2776
OUTBIND_ESME_SYSTEMID=smppclient
OUTBIND_ESME_PASSWORD=password
....

,当我运行 bearerbox 时,它显示如下。 (短信发送正常)

....
connect failed
System error 111: Connection refused
ERROR: error connecting to server `localhost' at port `2776'
SMPP[SMPPSim]: Couldn't connect to server.
SMPP[SMPPSim]: Couldn't connect to SMS center (retrying in 10 seconds).
....

我该如何配置?

谢谢你!

I sent messages through smpp connection (using selenium SmppSim) from Kannel and it worked.
But somehow when I try to receive messages or in other words when I try to send messages from SmppSim It doesn't work. The MO messages of the SmppSim queue into the MO-queue.

I tried these things.

  1. Used same port for send and receive (Kannel/SmppSim).
  2. Used different ports for send and receive (Kannel/SmppSim).
  3. Two groups for same smsc-smpp for send and receive. (It may be wrong)

Now I'm using port 2775 for send and port 2776 for receive.

#kannel.conf
group=smsc
smsc=smpp
....
port = 2775
receive-port = 2776
transceiver-mode = true
....

In SmppSim

#smppsim.props
SMPP_PORT=2775
....
SYSTEM_IDS=smppclient
PASSWORDS=password
OUTBIND_ENABLED=true
OUTBIND_ESME_IP_ADDRESS=127.0.0.1
OUTBIND_ESME_PORT=2776
OUTBIND_ESME_SYSTEMID=smppclient
OUTBIND_ESME_PASSWORD=password
....

When I run the bearerbox, it shows like below. (sms send is working)

....
connect failed
System error 111: Connection refused
ERROR: error connecting to server `localhost' at port `2776'
SMPP[SMPPSim]: Couldn't connect to server.
SMPP[SMPPSim]: Couldn't connect to SMS center (retrying in 10 seconds).
....

How do I configure this?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千纸鹤 2024-12-28 20:09:06

请阅读 SMPP v3.4 规范第 2.2.1 部分。

出站操作的目的是允许 SMSC 向 ESME 发出信号以发起
向 SMSC 发送 bind_receiver 请求。

因此它用于 SMSC (SMPPSim) 连接到 ESME (Kannel) 并请求回调连接。

但是,您可以运行几个在不同端口上侦听的 SMPPSim 实例。在这种情况下,每个实例都应该使用自己的配置文件。

Please read SMPP v3.4 specification, part 2.2.1.

The purpose of the outbind operation is to allow the SMSC signal an ESME to originate a
bind_receiver request to the SMSC.

So it's used for SMSC (SMPPSim) to connect to ESME (Kannel) and request for callback connection.

However you can run few SMPPSim instances listening on different ports. Each instance should use own configuration file this case.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文