C# 的 IVR 编程库

发布于 2024-11-07 01:46:46 字数 167 浏览 2 评论 0原文

我想编写一个响应调用的程序。欢迎消息后,它必须告诉客户:按 1 输入您的帐号,或按 2 与接线员通话。如果客户按 1,则告诉他或她输入您的帐号,在他或她输入帐号后,该号码必须保存在数据库中。

这在c#中可能吗?如果是的话,我想要一个 C# 的 IVR 库。如果没有,我需要一个很棒的 C++ IVR 库。

I want to write a program that responds to calls. After a welcome message it must tell the client to: press 1 for enter your account number, or 2 for speak with an operator. If the client presses 1 then tell him or her to enter your account number and after he or she enters the account number the number must saved in the database.

Is this possible in c#? If it is, I want an IVR library for c#. If not, I need a great IVR library for c++.

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

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

发布评论

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

评论(3

我也只是我 2024-11-14 01:46:46

Microsoft 拥有 Microsoft 语音 API (SAPI)但是,如果您想要简单的 IVR,最好不要重新发明轮子并自定义 Asterisk 实现(我猜这属于在“伟大的 C++ IVR 库”类别下(它是 c 不是 c++,但如果您了解 c++,您应该能够理解 c)。)使用 AsteriskNow 您甚至可能不需要编写任何自定义代码,它可能已经完成了您想要的操作。

Microsoft has the Microsoft Speech API (SAPI) however if you want simple IVR it is better not to reinvent the wheel and customize an Asterisk implementation (which i guess falls under the "great IVR library for c++" category (it's c not c++ but if you know c++ you should be able to understand the c).) Using AsteriskNow you may not even need to write any custom code, it may do what you want already.

送你一个梦 2024-11-14 01:46:46

我不知道有免费的 C# IVR 库,但我知道有几个相当便宜的:

http:// /www.voiceelements.com/

http://www.componentsource.com/products/velocity/index.html

I don't know of a free IVR library for C#, but I do know of a couple that are fairly inexpensive:

http://www.voiceelements.com/

http://www.componentsource.com/products/velocity/index.html

转身以后 2024-11-14 01:46:46

这里是 Twilio 团队的 Ricky。

我们有使用 C# 构建 IVR 的教程,看看这个可能有助于了解如何构建此类应用程序。

每当有电话打入我们的电话号码时,就会向我们的服务器发出请求,我们可以使用 TwiML,关于如何处理调用:

        public TwiMLResult Welcome()
        {
            var response = new TwilioResponse();
            response.BeginGather(new {action = Url.Action("Show", "Menu"), numDigits = "1"})
                .Play("http://howtodocs.s3.amazonaws.com/et-phone.mp3", new {loop = 3})
                .EndGather();

            return TwiML(response);
        }

因为我们使用的是 动词,当用户按下数字时,将向我们服务器上的另一个路由发出新的 HTTP 请求,我们可以根据用户按下的数字采取行动:

    public TwiMLResult Show(string digits)
    {
        var selectedOption = digits;
        var optionActions = new Dictionary<string, Func<TwiMLResult>>()
        {
            {"1", ReturnInstructions},
            {"2", Planets}
        };

        return optionActions.ContainsKey(selectedOption) ?
            optionActions[selectedOption]() :
            RedirectWelcome();
    }

希望有帮助!

Ricky from the Twilio crew here.

We have a tutorial on building an IVR with C#, taking a look at this may be helpful in getting an idea in how to build this type of application.

Whenever a phone call comes into our phone number, a request is made to our server where we can respond with some basic instructions, using TwiML, on what to do with the call:

        public TwiMLResult Welcome()
        {
            var response = new TwilioResponse();
            response.BeginGather(new {action = Url.Action("Show", "Menu"), numDigits = "1"})
                .Play("http://howtodocs.s3.amazonaws.com/et-phone.mp3", new {loop = 3})
                .EndGather();

            return TwiML(response);
        }

Since we're using the verb, when the user presses a digit a new HTTP request will be made to another route on our server where we can take action based on what digit(s) the user pressed:

    public TwiMLResult Show(string digits)
    {
        var selectedOption = digits;
        var optionActions = new Dictionary<string, Func<TwiMLResult>>()
        {
            {"1", ReturnInstructions},
            {"2", Planets}
        };

        return optionActions.ContainsKey(selectedOption) ?
            optionActions[selectedOption]() :
            RedirectWelcome();
    }

Hope that helps!

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