2017-09-05 52 views
1

我用Python写 这里使用Twilio的IVR应用程序样本Twiml:Twilio <Gather>执行网络挂接动作太慢

<?xml version="1.0" encoding="UTF-8"?> 
<Response> 
    <Gather action="/twilio/ivr/action/callback" input="dtmf" method="GET"> 
     <Say>Press 1 to do something</Say> 
    </Gather> 
</Response> 

样品Twiml在twilio/ivr/action/callback

<?xml version="1.0" encoding="UTF-8"?> 
<Response> 
    <Sa>Please say something</Say> 
    <Record method="GET" timeout="3" trim="do-not-trim" /> 
</Response> 

但是,当用户按1 ,我必须等待5到6秒才能收到回拨操作。我认为我的IVR系统太慢了。这是正常的反应时间吗?或者这与我的国家有关?

我的服务区域是台湾,服务器建立在AWS东京。

回答

2

您可以使用<Gather>上的timeout属性,因此它不会默认为5秒。此外,如果您只希望获得一位数字,则可以使用numDigits属性。

<?xml version="1.0" encoding="UTF-8"?> 
<Response> 
    <Gather 
     action="/twilio/ivr/action/callback" 
     input="dtmf" 
     method="GET" 
     timeout="3" 
     numDigits="1" 
    > 
     <Say>Press 1 to do something</Say> 
    </Gather> 
</Response> 

这里更多:https://www.twilio.com/docs/api/twiml/gather#attributes

+0

它的工作原理!谢谢你的回答 –