C# ASP.NET 和发送短信/拨打电话
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45293/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ASP.NET and sending SMS/making phone calls
提问by Codeslayer
I have a scenario where I need to make a call to a telephone(landline/mobile) or send SMS to a particular set of users only using ASP.NET and C#. The web application is not a mobile application.
我有一个场景,我需要拨打电话(固定电话/移动电话)或仅使用 ASP.NET 和 C# 向一组特定用户发送短信。Web 应用程序不是移动应用程序。
How do I go about doing these? What typically would be the hardware requirements? I would be extremely gratefulif you could provide me with pointers and reference websites.
我该怎么做?硬件要求通常是什么?如果您能给我提供指导和参考网站,我将不胜感激。
回答by Gareth Jenkins
Not sure if you're looking for hardware solutions to automate yourself, or external services. However, I've used BT's Web21Cpretty extensively.
不确定您是在寻找硬件解决方案来自动化自己还是外部服务。但是,我已经非常广泛地使用了 BT 的Web21C。
They have an excellent .Net API and a host of functionality. Their pricing is the best in the UK, but might fall down with US SMS, which is obviously cheaper - there are plenty of other SMS API providers though.
它们具有出色的 .Net API 和大量功能。他们的定价是英国最好的,但可能会因美国短信而下降,这显然更便宜——不过还有很多其他的短信 API 提供商。
What BT do offer, which is rare, is an API interface for automating call dialling, conferencing and managing call flow.
BT 提供的很少见的是用于自动呼叫拨号、会议和管理呼叫流程的 API 接口。
回答by VanOrman
Via WebServiceX, you can send SMS messages anywhere in the world. For phone calls I'd use Asterisk.
通过WebServiceX,您可以在世界任何地方发送 SMS 消息。对于电话,我会使用Asterisk。
回答by jerhinesmith
Most carriers provide an email address that you can send text messages to — for example, with Verizon, you can send an email to [email protected]and it will show up as a text message to that number.
大多数运营商都提供了一个电子邮件地址,您可以将短信发送到该地址——例如,使用 Verizon,您可以向[email protected]发送电子邮件,它会显示为发送到该号码的短信。
Wikipediahas a full list of the carrier-provided email addresses.
维基百科有运营商提供的电子邮件地址的完整列表。
By sending text messages as "emails" you can take advantage of System.Net.Mailand the like.
通过将文本消息作为“电子邮件”发送,您可以利用System.Net.Mail等。
回答by chrisntr
回答by sectrean
What exactly do you mean by "make a call"? Do you just need to call someone to transfer them or make your own custom, interactive automated call?
你所说的“打电话”到底是什么意思?您是否只需要呼叫某人来转接他们或进行您自己的自定义交互式自动呼叫?
If you just need to make a simple call to transfer someone, there are services like VoiceStarthat can do this. If you need to make a custom automated call, I would suggest OCS 2007 Speech Server. Asterisk is a SIP PBX and may or may not work for you depending on exactly what you're trying to do.
如果您只需要拨打一个简单的电话来转接某人,那么VoiceStar 之类的服务可以做到这一点。如果您需要进行自定义自动呼叫,我建议使用OCS 2007 Speech Server。Asterisk 是一个 SIP PBX,可能适合您,也可能不适合您,具体取决于您要做什么。
As far as sending text messages, I don't have much experience so others answers would probably be better.
至于发送短信,我没有太多经验,所以其他人的答案可能会更好。
回答by luccastera
messagepub, provides a single interface API to send not just SMS and make phone calls, but also IM, Twitter, and email messages. It might help you solve your problem.
messagepub提供了一个单一的接口 API,不仅可以发送 SMS 和拨打电话,还可以发送 IM、Twitter 和电子邮件消息。它可能会帮助您解决问题。
They have a C# helper library that you could use to easily integrate multichannel messaging into your application.
他们有一个 C# 帮助程序库,您可以使用它轻松地将多渠道消息传递到您的应用程序中。
回答by Eugene Osovetsky
Take a look at Twilio. You can find the .NET/C# helper library on GitHub.
看看Twilio。您可以在 GitHub 上找到.NET/C# 帮助程序库。
回答by Mükremin
For Turkish developers: http://www.mutlusms.com/yazilimgelistiriciler.html
对于土耳其开发人员:http: //www.mutlusms.com/yazilimgelistiriciler.html
回答by SoftwareGeek
I had built one a while back using an SMS gateway server. This was done in .net 1.1,ASP.net & vb.net. If i remember correctly, i built up a simple webpage and posted my request to the sms gateway server via http post.
我曾经使用 SMS 网关服务器构建了一个。这是在 .net 1.1、ASP.net 和 vb.net 中完成的。如果我没记错的话,我建立了一个简单的网页,并通过 http post 将我的请求发布到 sms 网关服务器。
The webpage carried a simple textbox and a button to submit. Once that was done, posted the message. The packet included username & password for authentication & an sms message.
该网页带有一个简单的文本框和一个提交按钮。说完,发了条消息。该数据包包括用于身份验证的用户名和密码以及一条短信。
Hope this helps.
希望这可以帮助。
回答by DJ'
I do not know much about calls but a very good API is available for free in Pakistan for sending and receiving smseasily. I gave it a try and my application is working great!
我对通话了解不多,但巴基斯坦有一个非常好的免费 API,可以轻松发送和接收短信。我试了一下,我的应用程序运行良好!