skip to Main Content

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


  1. 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

    Login or Signup to reply.
  2. 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.

    ...
        record=True,
        recording_status_callback=callbackURL+"/recordings",
        recording_status_callback_event=["completed"],
    ...
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search