2017-09-05 54 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

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