0
votes


Suppose for an incoming call to a Twilio Number '+18XXXXXXXXXX' the call is forwarded to a client with name 'CLIENT'. Now there are two legs with Callsids 'CSid1' and 'CSid2'.

If the 'CLIENT' wants to hold the call, the Connection leg with Callsid 'CSid1' is redirected to a Music url. If the 'CLIENT' resumes the call, the call 'CSid1' is again redirected to the 'CLIENT' with new CallSid 'CSid3'.

Now, how to get the single recording url for the whole Incoming call (connection with CallSid 'CSid1').
Note: The recording url for connection with callsid 'CSid2' and 'CSid3' can be obtained by setting record verb in dial tag (Two recording urls).

Any other suggestions to achieve Incoming Call recording in Twilio with hold option is also welcome.

1

1 Answers

1
votes

Twilio developer evangelist here.

If you want to record the whole call in one recording, including holds, then you may want to investigate using a <Conference>.

Once your original caller dials in, put them into a <Conference>, using <Dial> with the record attribute set. At the same time, use the REST API to make a phone call to the client which also lands them in the conference.

You can then use the Participants resource to hold and unhold the caller.

This would not redirect the caller, therefore giving you one recording URL.

Let me know if this helps.