How to write simple SMPP server

2019-07-16 11:24发布

问题:

I want to write a simple SMPP Server that basically forwards traffic to another SMPP server (C#, PHP). What are the things I need to know? How do I proceed?

回答1:

With regards to Goran's comment, one possible solution would be a simple tcp proxy such as simpleproxy.

From the Ubuntu package description:

simpleproxy acts as a simple TCP proxy. It opens a listening socket on the local machine and forwards any connection to a remote host. It can be run as a daemon or through inetd.



回答2:

Olaseni,

I've done something similar in the past, but i used perl. What i did was taking a port forwarding proxy which i downloaded from accordata.com. (port-proxy.pl)

I modified this to use the NET::SMPP module to validate PDU's when reading the incoming socket. Once the PDU was of type "Bind_request" i would validate against a dbase, replace credentials if validation was successfull and than forward or if credentials were not validated, issue a reject to the client and disconnect. Alternatively if the PDU contained anything else, i would forward using the logic that was already existing in port-proxy.pl.



回答3:

You can write simple smpp lib and forward smpp traffic from many applications to the one smpp connection to the sms provider

I can advice you jsmpp lib, but it's for java. It's very simple and cool lib. Many low level things happen behind the scenes and you can focus on your business logic

Find more here



回答4:

I have written exactly what you are asking for in vb.net

What i did was listen for inbound PDU (connect, bind, sms, and disconnect too) identifying each inbound connection uniquely - for the authentication bit,

then i forward the traffic onward to the delivery smsc.

Your SMPP service simply needs to listen for inbound PDU packets... as well as send heartbeat packets to the connected clients, if required.



标签: smpp