您在短信/警报编程中发现了哪些陷阱?

发布于 2024-08-13 01:23:11 字数 1437 浏览 9 评论 0原文

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

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

发布评论

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

评论(2

陌若浮生 2024-08-20 01:23:11

我遇到的一个大问题是,虽然这本身不是一个编程问题,但它只是一种经验,需要考虑在内。

当有人向您发送一条具有紧急意义的消息时,然后发送者(手机的所有者)走到您身边并询问您是否收到消息,这就是让我烦恼的地方,可能会发生争吵,因为您可以声称没有收到,从而使发件人对您“忽略了他们”或“没有回复”感到有些恼怒/生气/愤怒,而实际上这是由于提供商的网络问题造成的。

有趣的是,吵架后大约一个小时后,您的手机发出嘟嘟声,发件人的消息到达了!这种事在我身上发生过好几次了!但是,如果我不知道发送方发生了什么情况(危机、紧急查询等),我该怎么办?

因此,如果从以太网(互联网)向手机发送消息,请务必小心,因为以太网并不完全 100% 稳定(路由器)宕机、DNS 消失、服务器中断等),因此值得牢记这一点。就像问题是如何保证短信即时发送?这是一个大问题,必须考虑可靠性,通常需要额外的努力才能做到这一点......

大多数手机通常都会有所谓的交付报告,有些是打开的,有些是关闭的,是了解收件人手机是否打开或关闭的有用方法,如果它是打开的,您将收到一份即时递送报告,表明它已交付,同样,如果它关闭,则收到交付时会出现明显的时间延迟报告,这取决于您的提供商的最长交付时间。

抱歉,如果这看起来有点漫无目的……

希望这能给你一些思考的空间,
此致,
汤姆.

The one big gotcha, that has happened to me, although this is not a programming question as such, its just an experience of it, that needs to be taken into account.

When someone sends you a message that is of an urgent meaning, and then the sender (owner of the handset) comes over to you and asked you did you get the message, and this is what irks me, a row can arise because you can claim to not have received it, thus making the sender somewhat feeling miffed/cross/angry that you have "ignored them" or "did not respond" when in fact it is down to the provider's network problems.

And funnily enough, after about an hour after having a row, your handset goes beep, and your message from the sender arrived!!!! This has happened to me several times! But what can I do without ever knowing what is happening on the sender's side of things (crisis, urgent query etc)

So be cautious if sending the message across from ethernet (internet) to the handset as ethernet is not exactly 100% stable (routers go down, dns disappearing, server outages etc) so it is worthwhile to keep this in mind. Like the question is how can you guarantee instant delivery of sms? That's a big question and reliability will have to come in, usually requiring extra effort to do so...

Handsets, most of them usually do, have what is known as a delivery report, some are switched on, some are switched off, that is a useful way of knowing if the recipient's handset is switched on or off, if it's on, you will get an instant delivery report indicating that it was delivered, likewise, if it's off, there will be a noticeable time delay in getting the delivery report, that is dependant on your providers' maximum time for delivery.

Sorry if this seems like a rambling...

Hope this gives you some food for thought,
Best regards,
Tom.

寂寞陪衬 2024-08-20 01:23:11

SMS 是一项电信服务,而不是互联网服务。这有一些不同的规则。

对于初学者来说,许多端点都是计费/可计费的,并且与单个服务提供商签订了合同。这将包括您的所有用例。

其次,计费是发送方和接收方的合同事项。作为发件人,您根本不能声明“主机付费”,除非您限制自己向特定国家/地区发送短信。美国是最著名的例外。 “收款人付费”则更糟糕。由于短信垃圾邮件,电信公司通常只有在您与他们签订合同时才会允许此类流量。

第三方短信运营商可以解决其中许多问题。他们很容易比一般电信公司更加注重服务。他们甚至可以为您发送国际短信。

SMS 往往在网络本身缓冲,而不一定在电子邮件网关中缓冲。在个别情况下,您可能看不到差异。但即使您有与电信公司的直接 SS7 链路,您仍然会遇到延迟。

真正的电信公司有测试网关,但我无法向您提供这些网关的使用条款。但这个想法肯定是能够以更低的成本测试您的应用程序。

SMS 使用自己的字母表,这是一种相当讨厌的多七位编码(7/14/21 位!)引用的 160 个字符限制来自 140 字节的有效负载。这也可以编码为 70 个 UTF-16 字符。

SMS is a telco service, not an Internet service. That comes with some different rules.

For starters, many endpoints are billed/billable, and have contracts with a single service provider. This will include all of your use cases.

Secondly, billing is a contract matter both on the sending and the receiving side. You simply cannot state as a sender that "Host pays", unless you restrict yourself to sending SMS to specific countries. USA is the most famous exception. "Receiver pays" is even worse. Due to SMS spam, telco's will usually allow this kind of traffic only when you have a contract with them.

Third-party SMS operators can deal with many of these problems. It's very easy for them to be more service-oriented than the average telco. They might even be able to deliver international SMS for you.

SMS tends to buffer in the network itself, not necessarily the email gateway. In individual cases, the difference is probably invisible to you. But you would still have delays even if you had a direct SS7 link to the telco.

Real telco's have test gateways, but the terms of use for those I can't give you. The idea though is definitely to be able to test you app at lower costs.

SMS uses its own alphabet, a rather nasty multi-septet encoding (7/14/21 bits!) The quoted 160 character limit comes from a 140 byte payload. This could also be coded as 70 UTF-16 characters.

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