Voice-Call-for-Mobile-Gaming icon indicating copy to clipboard operation
Voice-Call-for-Mobile-Gaming copied to clipboard

Proper way to get call duration

Open rulfox opened this issue 4 years ago • 4 comments

How to calculate call duration for each user joined in a room ? Is there any api available for this call duration ? (call search ?) How can I get a callback when a room is closed. Is webhook available for room closed event?

rulfox avatar Jan 18 '21 07:01 rulfox

Yes, you can get the call duration in the callback named OnLeaveChannel, the parameter named rtcStats contain the duration of the call.

There is no callback of channel is closed. When you leave channel, you can get a callback named OnLeaveChannel, If you joinChannel, you can get a callback named OnJoinChannelSuccess.

I do not know what is the webhook you mean. Can you explain it ?

zhangtao1104 avatar Jan 22 '21 13:01 zhangtao1104

It's like getting a callback(from Agora) to our backend(Node) mentioning that a channel(with details - users list & duration) has been closed

rulfox avatar Jan 22 '21 13:01 rulfox

I have one more query, Is there an API to get the channel total duration along with the list of users(Not the last 10 users, entire users) who participated with their corresponding duration. If there is one, please mention API;

rulfox avatar Jan 22 '21 13:01 rulfox

It's like getting a callback(from Agora) to our backend(Node) mentioning that a channel(with details - users list & duration) has been closed

Sorry, we don't have this callback. We do not have close channel this concept. You can join any channel and you can join Channel Success.

https://docs.agora.io/cn/rtc/restfulapi/#/%E6%9F%A5%E8%AF%A2%E9%A1%B9%E7%9B%AE%E7%94%A8%E9%87%8F/getProjectUsagesV3 You can get the userList of a channel by restful, but can't get a channel duration.

zhangtao1104 avatar Jan 22 '21 13:01 zhangtao1104