构建短信服务器的最佳实践是什么

发布于 2024-10-18 12:42:06 字数 314 浏览 9 评论 0原文

我正在尝试构建一个系统,其中的终端节点能够通过 GSM 网络发送/接收 SMS 消息。我现在需要构建一个服务器解决方案,该解决方案将发送 SMS 消息,充当保存我的业务逻辑的 Web 服务器和客户端(节点)之间的网关。沟通是双向的。 我读过一些有关完整 SMS 服务器解决方案(可能充当 GSM 网关)的内容,但结果证明它们太昂贵了。 我考虑过将手机连接到我的服务器(然后使用一些 API),但我的服务器可能会转到数据中心,因此我无法以这种方式附加任何东西。 我不希望收到太多消息(例如每天 100 条/双向)。而且我也不打算拥有太多客户(少于 100 个)。 在这里我要求一个通用的系统解决方案(例如最佳实践)。

I am trying to build a system in which I have terminal nodes capable of sending/receiving SMS messages over a GSM network. I now need to construct a server solution which would send SMS messages acting as a gateway between a webserver holding my business logic and the clients (nodes). The communication is both ways.
I've read something about complete SMS server solutions (that act as a GSM gateway, possibly), but they turn out to be too expensive.
I've thought about attaching a mobile phone to my server (and then using some APIs), but it may be that my server will go to a data-center whereby I cannot attach anything in this way.
I do not expect to have too many messages (like 100 per day/both ways). And I do not plan to have too many clients too (less than 100).
Here I'm asking for a general system solution (e.g. best practice).

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

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

发布评论

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

评论(2

莳間冲淡了誓言ζ 2024-10-25 12:42:06

构建此类 SMS 服务器有三种基本选择:

1) 将移动电话或 USB GSM 棒连接到服务器并使用它们进行 SMS 通信。限制是

  • 数量有限(但是您每天 100 条短信应该没问题)。

  • 由于消费者硬件的原因,可能相当不可靠(例如,手机/棒固件不是为 24x7 操作而构建的,您可能需要定期重置设备;大多数手机需要电池才能运行,电池会磨损)。

  • 由于射频规则和移动网络覆盖范围,可能无法放置在数据中心。

  • 移动号码方案仅限于 SIM MSISDN。

2) 将 SMS 连接到网络运营商 SMS 网关。网络运营商正是将这些用于这种场景:批量短信通信。这些是专有的,通常是一种“更容易”消化的消息传输协议。限制:

  • 您在连接方面和协议方面都受到网络运营商的约束。

  • 可能会延迟通信,因为网关可能会执行存储并转发。

  • 取决于定价方案可能只对大批量才有意义。

3) 将短信服务器连接到移动运营商的 SS7 网络,将其添加为网元。限制:

  • 实现复杂。需要专用硬件(SS7 接口卡)和驱动程序进行编程。

  • 需要与网络运营商进行重要的网络集成,包括广泛的测试。

  • 需要 E1/T1 线路(或更大的线路,或 SIGTRAN)进行连接,这通常是数据中心的事情,但并非在每个数据中心都可用。

  • 昂贵,就定价方案和操作而言。

假设我了解您的要求,对于您的情况,我会选择选项 1) 并将 SMS 服务器放置在覆盖范围良好的位置,即不一定位于数据中心。将其作为服务器基础设施的前端出售。如果必须将其放入数据中心,请转到选项 2) 并查看您的移动网络运营商的 SMS 批发产品。

There are three basic alternatives for building such an SMS server:

1) Attach mobile phones or USB GSM sticks to the server and use these for SMS communicaton. Limitations are

  • Limited volumes (however your 100 SMS/day should be fine).

  • Possibly rather unreliable due to consumer hardware (e.g. phone/stick firmware is not built for 24x7 operation, you may need to reset devices regularly; most mobile phones require a battery in order to function, batteries wear out).

  • Possibly not placable in data centers, due to RF rules and mobile network coverage.

  • Mobile number scheme limited to SIM MSISDN.

2) Connect the SMS to a network operators SMS gateway. Network operators use these exactly for this scenario: bulk SMS communication. These are proprietary and usually talk an "easier" to digest message transport protocol. Limitations:

  • You are bound to the network operator, connection-wise and protocol-wise.

  • Possibly delays in communication since the gateway might do store-and-forward.

  • Depending on pricing scheme might make sense only for high volumes.

3) Connect the SMS server to the mobile operators SS7 network, adding it as a network element. Limitations:

  • Complex implementation. Requires dedicated hardware (an SS7 interface card) and drivers to be programmed.

  • Requires non-trivial network integration with network operator including extensive testing.

  • Requires an E1/T1 line (or bigger, or SIGTRAN) for connection this is typically a data center thing, but not available in every data center.

  • Expensive, in terms of pricing scheme and operation.

Assuming I understand your requirements, for your case I would go for option 1) and place the SMS server where it has good coverage, i.e. not necessarily in the data center. Sell it as a head-end for the server infrastructure. If putting it in the data center is a must, then go to option 2) and check out your mobile network operators SMS wholesale offerings.

苍白女子 2024-10-25 12:42:06

我在Linux中使用smstools包来接收、解析SMS消息。在配置文件中,您指向一个接收 2 个参数的外部脚本(例如 RECEIVED 短信文件路径)。我使用 perl 解析短信。其他选择是 Alamo SMS 网关,但我遇到了很多问题。

I use smstools package in Linux to receive, parse SMS messages. In the configuration file, you point to an external script which receives 2 arguments (e.g. RECEIVED path-to-sms-file). I parse the SMSs using perl. Other option is Alamo SMS gateway, but I had many issues with it.

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