Can you set a time limit with the Twilio Voicemail Twimlet?

痞子三分冷 提交于 2019-12-24 15:11:58

问题


I'm using the Voicemail Twimlet and I'm receiving these automated calls that play recordings related to politics for 30 minutes or longer. The Twimlet doesn't have a time limit option that I can find, so it just records these giant mp3 files. I want to just hangup the call after 3 minutes or so. Does anyone know a way to set a time limit for a twimlet or how to create quick Twilio php script that could handle this? https://www.twilio.com/labs/twimlets/voicemail


回答1:


Ricky from Twilio here.

Although you can't set a timeout using the twimlet, you can do this using TwiML. The verb has an attribute called maxLength that will accomplish what you're looking for. As an example, if you returned this TwiML your recording would timeout after 30 seconds:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Record maxLength="30" />
</Response>

Hope that helps!



来源:https://stackoverflow.com/questions/32911651/can-you-set-a-time-limit-with-the-twilio-voicemail-twimlet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!