Very similar to this question: How to use twilio and twiml to record a call and redirect the call or join someone else to the call
I'm trying to record an incoming call. The solution in the post above is written in JavaScript. How do you write the same solution in Python? There is no method in twilio's Python library like client.calls(callSid).recordings.create()
. I'm trying the following:
client = Client(os.getenv("TWILIO_ACCOUNT_SID"), os.getenv("TWILIO_AUTH_TOKEN"))
callCon = client.calls(request.form["CallSid"])
recordings = callCon.recordings(request.form["CallSid"]).create() # this line errors out
I was expecting twilio to start recording the call. Instead I get an error saying no create()
method exists.