如何在 Windows 7 上设置 SMS 网关并使用 .NET 进行测试

发布于 2024-09-19 02:18:30 字数 263 浏览 6 评论 0原文

我的公司正在为一家电信公司工作,他们最终将允许我们使用他们的网关发送/接收短信,但现在我需要在我的 Win7 盒子上设置一个短信网关,我可以用它来测试和构建一个发送和选择性接收短信的应用程序。

我看过 Kannel 但我似乎找不到 Win7 版本或不知道如何在Win7上编译并安装一个。

如果有人有这方面的经验,请帮助我。谢谢

My company is working for a Telco who will allow us to send/receive sms using their gateway eventually but for now I need a sms gateway setup on my Win7 box that I can used to test and build an applicaton that sends and optionally receive sms messages.

I have had a look at Kannel but I cant seem to find a Win7 version or dont know how to compile and setup one on Win7.

If someone has any experience in this then please help me. Thanks

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

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

发布评论

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

评论(1

岁吢 2024-09-26 02:18:30

如果您要连接到电信公司,可能会连接到他们的 SMSC 直接通过 SMPP 或类似协议,这意味着您需要设置一些与之通信的东西。 Kannel 是 SMS 网关的一个优秀的开源实现,并且可能是您最好的选择。它将负责与电信公司的 SMSC 进行通信,并为您提供一个简单的基于 HTTP 的界面,以便从您的应用程序提交消息。

在这种情况下,您最好尽早尝试设置它,因为 Kannel 的配置涉及相当多的内容。它需要基于Linux的系统才能运行,并且没有Windows端口。

然而,为了开始开发您的应用程序,您可以研究一个假的 SMS 网关,该网关将接受与 Kannel 相同的 HTTP 接口,并返回编造的回复。一种快速而肮脏的方法是用您想要的任何语言编写一个简单的网页,该网页将通过网络请求接受一些参数并打印出“55124”作为新消息 ID 或类似内容。然后您的应用程序可以对其进行简单的 HTTP 调用来模拟发送短信:

http://smsgateway.local/simulator.php?to=12345678&from=12345&body=hello+there

如果您想要更真实的内容,请查看此 软件列表。有一些库可以通过串行连接的手机发送短信,SMPPSim 看起来可以为此为您工作。

If you will be connecting to the telco it will probably be to their SMSC directly via SMPP or similar protocols, which means you will need to setup something to talk to that. Kannel is an excellent open source implementation of an SMS Gateway, and probably your best bet at this. It will take care of talking with the telco's SMSC, and will provide you with a simple HTTP based interface to submit messages to from your application.

In that case, you are better off trying to set it up sooner rather than later, because quite a bit is involved in Kannel's configuration. It requires linux based systems to run and there is no windows port.

However, in order to get started developing your application, you can look into a fake SMS Gateway that will accept the same HTTP interface as Kannel, and return back made up replies. A quick and dirty way would be to write a simple web page in any language you wish, that will accept a few parameters over a web request and print out "55124" for the new message id, or similar. Then your application can do a simple HTTP call to it to simulate sending an sms:

http://smsgateway.local/simulator.php?to=12345678&from=12345&body=hello+there

If you want something more realistic look at this list of software. There are some libraries for sending sms via mobile phone connected serially, and SMPPSim which looks like it could work for you for this.

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