I am able to make a call doing this. The call goes out, but how do I set it so when I make the outgoing call, the conversation is recorded, and once the call is done, I want to tie that recording id (retrieve the call/recording sid) and store it in some model.
export function callCustomer(phoneNumber) {
const params = {
phone_number: phoneNumber,
};
Twilio.Device.connect(params);
}
In my views.py
@csrf_exempt
def call(request):
"""Returns TwiML instructions to Twilio's POST requests"""
response = twiml.Response()
with response.dial(callerId=settings.TWILIO['SOURCE_NUMBER']) as r:
r.number(request.POST['phone_number'])
return HttpResponse(str(response))