Kannel as SMPP server

霸气de小男生 提交于 2020-01-01 19:23:07

问题


I have created SMS gateway application in which I'm using kannel to connect to MNO(Mobile Network Operators) SMSCs.I have set of clients who are connected to my application given the API (JSON API) and in my application I basically send the request to kannel via its http API. How I have this new clients whose requirement is that his request should go via SMPP protocol as he doesn't feel that JSON API is that much secure as messages can be altered on its way to the recipient. To create SMPP server I'm using Node JS SMPP server and client module and then after receiving the request I basically make HTTP request to kannel. The problem I'm facing here is how do I send DLR to the client. I understand that kannel provides me with the capability to do get delivery reports from SMSC as cited here in their documentation,that I can do but how can I get message id from my client to which I would send to kannel so that the client would be able to map a delivery report to the particular message. Here is what I would like to know

  1. Can kannel be used as SMPP server i.e allow third parties to connect my my kannel based application and yet be able to monitor the messages going through?
  2. If that is not possible, how can a third party send a message ID and how do I receive the it in SMPP?

Any suggestion of a better application design or resources where I can equip myself with necessary knowledge to tackle the issue will be much appreciated.

Disclaimer : I'm a newbie to SMPP protocol


回答1:


There are few interesting parts in the question. Let's look at them one at a time.

Connectivity between entities

You described the following connectivity between entities. I am laying out here now for convenience of discussion.

Your existing customers use the following connectivity flow:

Client <== JSON ==> Kannel <== SMPP ==> MNO SMSC

For your new customer, you are using the following connectivity flow:

Client ESME <== SMPP ==> Nodejs SMPP+JSON SMS Client <== ==> Kannel <== SMPP ==> MNO SMSC

Alternative connectivity 1: Eliminate Kannel

For your new customer, you can also consider this (simplified) flow:

Client ESME <== SMPP ==> Nodejs SMPP/Nodejs ESME <== SMPP ==> MNO SMSC

An important question to ask here - why do you need Kannel in the flow.

Alternative connectivity 2: Why not use JSON

I think the customer is trying to say is:

  • JSON is text based protocol and one can easily manipulate it in flight.
  • SMPP is binary based and one cannot easily manipulate it in flight.

You can help the customer by offering one/both the following options:

  • JSON works over HTTP. You can always connect over HTTPS and that eliminates the possibility of manipulation.
  • Connect over a VPN.

I don't know if this flow will solve your other problems, but it simplifies your flow.

Note: VPN should be used even with SMPP.

Can kannel be used as SMPP server

Disclaimer: I do not have experience with Kannel.

A bit googling revealed - Kannel does not support allowing creating SMSC with it. It is a bit dated though.

Mapping of messageId

I did not understand the question completely. Anyway, here is my attempt to answer it:

Where to find messageId?

  • messageId field is present on submit_sm and data_sm (sent by ESME) all the time.
  • messageId field is present but blank on deliver_sm (sent by SMSC) as per the protocol.

How to map messageId?

As intermediate application provider, you are responsible for mapping messageId received/sent from/to both ends. See this SO question for some relevant discussion - Message ID for SMS submission and delivery not the same.




回答2:


For create an sms gateway with kannel and nodejs, you can use kannel.js

But kannel doesn't support smsc as a server, with nodejs you can use shorty for build a smpp server.




回答3:


To handle high traffic sms transactions you have to use Vsmppbox or Opensmppbox SMPP Server and Kannel SMPP Gateway and inserting sms from a web appliction additionally you can use Sqlbox. find sqlbox and opensmppbox inside addons directory in kannel latest svn,Vsmppbox is a licensed SMPP server with more features



来源:https://stackoverflow.com/questions/19799187/kannel-as-smpp-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!