I’m trying to create a short program that calls a user’s number and records the conversation using Twilio and send the recording to an S3 bucket
Here’s a link that does it to a dropbox instead of an S3:
https://www.twilio.com/blog/recording-saving-outbound-voice-calls-python-twilio-dropbox
Here’s the code I have so far that allows me to call and recorded conversations go to Twilio’s online storage:
call = client.calls.create(
record=True,
url='http://demo.twilio.com/docs/voice.xml',
to='+15558889988',
from_='+18889992222'
)
print(call.sid)
2
Answers
Twillio has inbuilt mechanism to do it, any specific use case you want to do it. https://www.twilio.com/blog/announcing-external-aws-s3-storage-support-for-voice-recordings
When you create the call you can also create a webhook that tells you when the recording is ready. When you then receive the webhook you can get the file and send it to S3.