【问题标题】:recording chunks with twilio用 twilio 记录块
【发布时间】:2017-12-10 12:22:10
【问题描述】:

twilio 新手。我正在尝试向我公司的 IVR 拨打 twilio 电话并记录语音块。例如,当我拨打 IVR 时,我得到: 您好,欢迎来到... 按 1 获取... 我们的菜单最近发生了变化,对于...按 1

我可以使用以下方式拨号:

static void Main(string[] args) 
{
string accountSid = "xxxxxxxx";
string authToken = "xxxxxxx";
Twilio.TwilioClient.Init(accountSid, authToken);
var call = CallResource.Create( 9876543210, 1234567890,
                                record: true,
                                recordingChannels: "dual",
                                url: new Uri("http://www.mycompany.com/DialOption"),
                                sendDigits: "wwww1234wwww1234567890")
 }

在我的网络服务器上,我有:

public class DialOptionController : TwilioController
    {

        [HttpPost]
        public TwiMLResult Index(VoiceRequest request)
        {  
            var response = new VoiceResponse();           
            response.Pause(19);
            response.Play(digits: "1");           

            response.Pause(19);
            response.Play(digits: "1");

            response.Pause(9);
            response.Play(digits: "1");

            return TwiML(response);
        }
    }

在我选择选项而不是在一个文件中的整个录音之前,如何让录音给我块?

【问题讨论】:

    标签: c# twilio


    【解决方案1】:

    我相信您无法获取大块的通话录音。您只会在通话结束时获得指向整个录音的链接。

    如果您选择input=speechinput=speech dtmf 而不是默认的input=dtmf 并为partialResultCallback 参数提供值,那么您可以在块中获得的唯一记录是Gather 动词期间的记录。示例:

    var response = new VoiceResponse();
    var gather = new Gather(input: "speech",
                            action: new Uri("/completed"),
                            partialResultCallback: new Uri("/partial"));
    gather.Say("Welcome to Twilio, please tell us why you're calling");
    response.Append(gather);
    Console.WriteLine(response.ToString());
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-03
      • 2018-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多