如何从 SMSC 发送 Deliver_sm 请求
我正在创建一个应用程序,我的机器将充当 SMSC。从那里我只需要发送 Deliver_sm。服务器将发送绑定请求。我需要将我的机器与服务器绑定。我的应用程序将像 smpp 客户端一样工作。我有logica smpp.jar。但我很困惑如何只发送 Deliver_sm。请给我一些想法和代码。 任何bdy都可以告诉我如何发送出站请求吗,这对我也很有帮助。 谢谢 库希克。
i am creating an application where my mechine will act like a SMSC. And from there i need to send only deliver_sm. The server will send the bind request. I need to bind my mechine with the server. My application will work like a smpp client. I have logica smpp.jar. But i am confused how to send only deliver_sm. Please give me some ideas and code.
can anybdy please tell me how to send outbound request,,that will also be very helpful for me.
thanks
koushik.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你的问题无法以现在的方式得到解答。我在下面解释了两种可能的设置,然后解释了您正在寻求的解决方案。我的答案基于 SMPP 3.4 规范。
设置
设置-1:您正在创建 SMPP 客户端
设置 2:您正在创建 SMSC
发起连接
通常ESME会向SMSC发送绑定请求。绑定请求可以通过“bind_transmitter”、“bind_receiver”或“bind_transceiver”PDU之一发送。
SMSC 可以急切地邀请 ESME 通过“outbind”PDU 发送绑定请求。在这种情况下,SMSC 必须知道 ESME 的 IP/端口。它很少被使用。
的片段,
这是发送出站请求发送消息
我已经在设置部分讨论过这一点。此处重复,
我不知道为什么只发送“deliver_sm”如此重要。作为编码员,您可以控制要发送的 PDU 类型。
这是发送 Deliver_sm 请求的片段
Your question cannot be answered the way it is presented now. I explained two possible setups below and then solutions you are seeking. My answers are based on SMPP 3.4 spec.
Setup
Setup-1: You are creating a SMPP client
Setup-2: You are creating a SMSC
Initiating connection
Usually ESME will send a bind request to SMSC. A bind request can be send via one of "bind_transmitter", "bind_receiver" or "bind_transceiver" PDU.
The SMSC can be eager and invite an ESME to send bind request via "outbind" PDU. In this case, the SMSC has to know the IP/port of the ESME. It is rarely used.
Here a snippet of sending outbind request
Sending messages
I already discussed this in the setup part. Repeating here,
I am not sure why sending only "deliver_sm" is so important. As coder, you have control over the kind of PDU you are going to send.
Here a snippet of sending deliver_sm request
我已按照@Wahid的回答创建从SMSC服务器到SMPP收发器的deliver_sm请求。我对创建/获取会话实例感到困惑。
我通过从 PDUProcessorGroup 获取会话实例来完成此操作,我们在启动 SMSC 会话期间实例化该实例,遍历它以获取 SimulatorPDUProcessor 实例并从中获取会话实例。
I have followed @Wahid's answer to create deliver_sm request from SMSC server to SMPP Transceiver. I was confused about creating/getting session instance.
I did it by getting session instance from PDUProcessorGroup , which we instantiated during starting SMSC session, traversed it to get SimulatorPDUProcessor instance and got session instance from that.
如果您想提供这样的解决方案,请检查 Ozeki 的内置 SMPP 服务器。它正是这样做的。要查看通过网络发送的 SMPP 传递 sm pdu,最好使用的工具是 Wireshark,因为它可以让您在字节级别上查看 pdu。 ozeki 短信网关 SMPP 模拟器 的功能你想要的。它首先打开一个侦听器 TCP/IP 套接字,让 SMPP 客户端绑定到它,然后当模拟传入的 SMS(或从移动网络接收到)时,它会对其进行处理并将其作为 SMPP Deliver_sm 请求发送。
免责声明:我为 Ozeki 工作。
If you want to deliver such a solution, check the built in SMPP server of Ozeki. It does exactly this. To view the SMPP deliver sm pdu when it is sent over the network the best tool to use is Wireshark, because it lets you see the pdu on a byte level basis. The ozeki sms gateway SMPP simulator does what you want. It first opens a listener TCP/IP socket, and it lets SMPP clients bind to it, then when an incoming SMS is simulated (or received rom the mobile network), it covnerts it and sends it as an SMPP deliver_sm request.
Disclaimer: I work for Ozeki.