We are using Twilio Flex. We have call recording enabled. Recordings can be found via the Twilio Console and Flex insights reporting.
We have agents who want to be able to look up old call recordings via phone #. Adding a view to the Flex UI to do this is simple enough.
However, I am not sure how to obtain the recordings via Twilio's APIs. I am able to locate call resources via searching for calls to/from the desired phone #, but the call resources seem to be lacking recording info.
It seems the call recordings are linked to conferences created by Flex, but there are no APIs (as far as I can tell) for obtaining a conference by a participating call SID so that I can obtain the conference recording.
EDIT Flex calls are a conference which contains two call resources: the inbound call from the customer and a call to the connected agent. The CallSid for the customer inbound call part has 0 recordings associated with it. The recording is linked directly to the conference and the CallSid that connects the agent.
Example: Caller 555-555-2222 calls into a twilio flex # 555-222-1111 and gets CallSid CA123. Once they are sent to Flex via a flow widget, a conference is created (sid CF456) containing CallSid CA123. Once an agent connects, there is a call resource created, CA789 that is added to the conference. This call shows as being from the flex # 555-222-1111 and connected to the agent name, client:agent_40companyname_2Ecom. Only Conference Sid CF456 and call CA789 have a linked recording (the same recording). The inbound call (CA123) has no recording.
So if I search for calls from the client's # (555-555-2222), I see the call info for CA123, but have no means of obtaining the recording as there seems to be no means of obtaining the conference this Call participated in.