Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper way to get call duration #28

Open
rulfox opened this issue Jan 18, 2021 · 4 comments
Open

Proper way to get call duration #28

rulfox opened this issue Jan 18, 2021 · 4 comments

Comments

@rulfox
Copy link

rulfox commented Jan 18, 2021

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?

@zhangtao1104
Copy link
Collaborator

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 ?

@rulfox
Copy link
Author

rulfox commented Jan 22, 2021

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
Copy link
Author

rulfox commented Jan 22, 2021

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;

@zhangtao1104
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants