当前位置: 首页>>代码示例>>C#>>正文


C# TwilioResponse.Hangup方法代码示例

本文整理汇总了C#中TwilioResponse.Hangup方法的典型用法代码示例。如果您正苦于以下问题:C# TwilioResponse.Hangup方法的具体用法?C# TwilioResponse.Hangup怎么用?C# TwilioResponse.Hangup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TwilioResponse的用法示例。


在下文中一共展示了TwilioResponse.Hangup方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Can_Generate_Single_Hangup

        public void Can_Generate_Single_Hangup()
        {
            var response = new TwilioResponse();
            response.Hangup();

            Assert.True(IsValidTwiML(response.ToXDocument()));
        }
开发者ID:kevinburke,项目名称:twilio-csharp,代码行数:7,代码来源:HangupTests.cs

示例2: Example_1

        public void Example_1()
        {
            var response = new TwilioResponse();
            response.Hangup();

            Assert.IsTrue(IsValidTwiML(response.ToXDocument()));
        }
开发者ID:nkerkin,项目名称:twilio-csharp,代码行数:7,代码来源:Hangup.cs

示例3: GetResponseVoicemail

            //create a TwiML response to send the call to voicemail; appends the response to an existing response
            public static TwilioResponse GetResponseVoicemail(TwilioResponse resp, TwilioRequestVoice request, Entity.Client client, Entity.Call call)
            {
                if (log.IsDebugEnabled) { log.Debug("GetResponseVoicemail.request." + (request == null ? "null" : request.ToJsonString())); }

                //TODO: create valid voicemail box dial plan
                resp.Pause(1);
                resp.Say("You are being transferred to voicemail, but it's not setup yet.  Goodbye.");
                resp.Pause(1);
                resp.Hangup();

                //log the current call state
                if (call != null)
                {
                    call.CallResult = "sent to voicemail";
                    call.Save();
                }

                return resp;
            }
开发者ID:travisrussi,项目名称:KissCaller,代码行数:20,代码来源:TwilioResponse.cs

示例4: GetResponseUnknownClient

            //create a TwiML response for calls to an unknown client
            public static TwilioResponse GetResponseUnknownClient(TwilioRequestVoice request, Entity.Call call)
            {
                if (log.IsDebugEnabled) { log.Debug("GetResponseUnknownClient.request." + (request == null ? "null" : request.ToJsonString())); }

                TwilioResponse resp = new TwilioResponse();

                resp.Pause(1);
                resp.Say("We're sorry.  The person you are trying to reach could not be found.");
                resp.Pause(1);
                resp.Hangup();

                //log the current call state
                if (call != null)
                {
                    call.CallResult = "unknown client";
                    call.Save();
                }

                return resp;
            }
开发者ID:travisrussi,项目名称:KissCaller,代码行数:21,代码来源:TwilioResponse.cs

示例5: GetResponseIgnore

            //create a TwiML response to ignore the call
            public static TwilioResponse GetResponseIgnore(TwilioRequestVoice request, Entity.Client client, Entity.Call call)
            {
                if (log.IsDebugEnabled) { log.Debug("GetResponseIgnore.request." + (request == null ? "null" : request.ToJsonString())); }

                TwilioResponse resp = new TwilioResponse();

                //TODO: create an ignored voicemail box to send the call to
                resp.Pause(1);
                resp.Say("Your call was ignored.");
                resp.Pause(1);
                resp.Hangup();

                //log the current call state
                if (call != null)
                {
                    call.CallResult = "call was ignored";
                    call.Save();
                }

                return resp;
            }
开发者ID:travisrussi,项目名称:KissCaller,代码行数:22,代码来源:TwilioResponse.cs


注:本文中的TwilioResponse.Hangup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。