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

Rings API #134

Closed
github4f opened this issue May 26, 2017 · 2 comments
Closed

Rings API #134

github4f opened this issue May 26, 2017 · 2 comments
Assignees

Comments

@github4f
Copy link

I need to build a Business collaboration apps using the new Twilio Video’s new Rooms API. It uses a traditional calling model, where one user “rings” another user and waits for them to answer. However, I cannot find any "ringing" API in SDK. I was wondering how the Video’s new Rooms API gives (can be used) the ability to build such a call model?

@piyushtank
Copy link
Contributor

@github4f TwilioVideo is a Room based model where participants can join a Room and share audio and video with the participants connected to the Room. In order to implement the traditional calling model where one user "rings" another user, you will have to write your own signaling to notify remote participant to start "ringing" whenever you wish the participant to connect to the Room. Please note that using Twilio Notify library you can send notifications to achieve this use case.

@ceaglest
Copy link
Contributor

@github4f sorry that we took so long to respond to your original question. Here is a more detailed answer:

To implement a classic “calling” experience (alice calls bob, bob’s app “rings”, bob answers), you'll need to decide how you want to send notifications between users. Twilio Sync is a great solution. Others include Socket.io, Firebase, Pusher, or PubNub.

Once you figure out what notification service you want to use, it’s pretty easy to implement a calling experience. The high-level overview would be this:

  1. When user A indicates they want to call user B, your back-end server should send a notification to user B. The notification to user B should contain a Video Access Token containing a grant user B will use to connect to the Room where they will talk to user A. At the same, time you can go ahead and place user A in the Room identified above.
  2. When user B receives the notification, you should display whatever UI you would like to indicate that user A is calling (you can play a ringing sound, show a “User A is calling you” screen, or whatever).
  3. If user B accepts the call, the app should call .connect() and pass the Access Token from step Build failed after following instructions in readme #1 to connect the user to the Room. Since user A connected to the Room in step 1 above, the two users should now be connected and able to speak with one another.

A couple docs related to this solution:
https://www.twilio.com/docs/api/video/user-identity-access-tokens
https://www.twilio.com/docs/api/video/status-callbacks

Going to close this one out due to lack of activity.

Best,
Chris Eagleston

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

3 participants