0
votes

With Twilio we make outbound calls:

curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ACc1....4658a/Calls.json' \
-d 'From=%2B44987654321' \
-d 'To=%2B123456789' \
-d 'Url=http%3A%2F%2Fourdomain.com%2Ftwiml.php%3Faction%3Dcall_is_taken' \
-u ACc1....4658a:{AuthToken}

Not that it matters, but when someone picks up the phone, our response twiml code (which will change) is just:

<Response><Say>Thank you for picking up.</Say></Response>

We can add a <Record> in our Twiml code to start recording a section, but we want to record the ENTIRE call (including Twiml voice and human voice), right from the START till the END of the outbound call.

I could find the <Dial record="true">, but thats for calling outside the call. I did try <Response record="true">, but that didn't give me any recording SIDs either, it's not documented anyway.

How do I record the entire call?

1

1 Answers

2
votes

I figured this out myself. This will record an entire conversation:

curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ACc1....4658a/Calls.json' \
-d 'From=%2B44987654321' \
-d 'To=%2B123456789' \
-d 'Record=true' \
-d 'Url=http%3A%2F%2Fourdomain.com%2Ftwiml.php%3Faction%3Dcall_is_taken' \
-u ACc1....4658a:{AuthToken}

The only thing added was the -d 'Record=true' parameter. I couldn't quite find it in the documentation though.