I'm using a python3 flask REST-ful application to control my twilio-based phone services. Everything is working very well, but I have a question for which I haven't been able to find an answer.
When I want to redirect a caller to voicemail, I call the following voice_mail
function from my REST interface, and I manage the voicemail via a twimlet
, as follows ...
def voice_mail():
vmbase = 'http://twimlets.com/[email protected]&Transcribe=False'
vmurl = '... URL pointing to an mp3 with my voicemail greeting ...'
return redirect(
'{}&Message={}'.format(vmbase, vmurl),
302
)
This works fine, but there doesn't seem to be any way to control how long the caller's voicemail message can last. I'd like to put an upper limit on that duration.
Is there any way via this twimlet
(or perhaps a different twimlet
) to force the voicemail recording to be cut off after a configurable amount of time?
If not, is there a default maximum duration of this twimlet
-based voicemail recording?
And if neither of these are available, can someone point me to a python-based way of using other twilio features to ...
- Route the caller to voice mail
- Play a specified recording
- Capture the caller's message.
- Cut off the caller's recording after a configurable number of seconds.
- Email a notification of the call and the URL of the recorded message to a specified email address.
I know that the existing twimlet
performs items 1, 2, 3, and 5, but I don't know how to implement item 4.
Thank you.