Hello all, I understand that there are no webhooks to know if a recording is available, I’ve done most of my integration, I’m getting the recordingId from the telephony event “disconnect”, now I need to get the recording, Tech Support said that the recording is not available real time that I will have to poll the content API, which should be this one: /restapi/v1.0/account/accountId/recording/recordingId/content, however in the docs it says that that API only returns 200 with the recording media as the body, so, my question is, how does the return code and body looks like when the recording is not available to download? should I check for a 404 status code and retry later? how does that work?
I know how to download it, what I would like to know is when I poll the content API, what will the payload look like if the recording is not available to download? will I get a 404? I already have the recordingId from the disconnect webhook, I just need to know what will happen if I query /restapi/v1.0/account/~/recording/{my-recording-id}/content and the recording is still not ready to be downloaded.
Thanks!
Since there is no exact event notification for this. I work around it be first setting a delay to 30-40 secs before I try to get the recording using the contentUri. However, for long call recordings, it may take even longer than 40 secs. in case I will get 404, I will set the delay for another 30-40 secs and try again.
You are right about there is no push notification for a call recording event. However, using the telephony session event notification with the disconnected event should work.
Read this article to learn how to download the recording binary file.
I know how to download it, what I would like to know is when I poll the content API, what will the payload look like if the recording is not available to download? will I get a 404? I already have the recordingId from the disconnect webhook, I just need to know what will happen if I query /restapi/v1.0/account/~/recording/{my-recording-id}/content and the recording is still not ready to be downloaded.
I know how to download it, what I would like to know is when I poll the content API, what will the payload look like if the recording is not available to download? will I get a 404? I already have the recordingId from the disconnect webhook, I just need to know what will happen if I query /restapi/v1.0/account/~/recording/{my-recording-id}/content and the recording is still not ready to be downloaded.
Thanks!
Since there is no exact event notification for this. I work around it be first setting a delay to 30-40 secs before I try to get the recording using the contentUri. However, for long call recordings, it may take even longer than 40 secs. in case I will get 404, I will set the delay for another 30-40 secs and try again.
hello @PhongVu thanks for getting back to me, just to clarify, the content URL included in the disconnect event, will return 404 if the recording is not available and 200 when it is, did I get it right?
hello @PhongVu thanks for getting back to me, just to clarify, the content URL included in the disconnect event, will return 404 if the recording is not available and 200 when it is, did I get it right?
yes, you are correct it gives me the ID, but yet again, how can I check if the recording is available???
If I query this API will it return 404 if the recording is not available?
I just can’t remember what it would return. It happens to my app sometimes. You can quickly test and find out, or if I have some spare time next week, I will try and let you know.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.