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

Add Access Manager for Security #53

Open
sagar-spkt opened this issue Jun 7, 2018 · 4 comments
Open

Add Access Manager for Security #53

sagar-spkt opened this issue Jun 7, 2018 · 4 comments

Comments

@sagar-spkt
Copy link

Allow only some users for call.

@stephenlb
Copy link
Owner

That is a really cool feature!

@crookedbard
Copy link

Is there any milestone for this new feature?

@stephenlb
Copy link
Owner

stephenlb commented Oct 30, 2018

You can add a "Accept Call" phase before the parties video/audio starts. This isn't planned at this time. You can add this feature here near this function: https://github.com/stephenlb/webrtc-sdk/blob/master/index.html#L196-L208

I'll walk you through this:

Before the Sending the Video/Audio Stream, send a signal to ask for call permission:

let user_number = "1235445"; // my friends number
phone.send( { "accept" : "Would you like to accept this call?" }, user_number );

Like this:

function call_request(number) {
    phone.send( { "accept" : "Would you like to accept this call?" }, user_number );
}
function call_accepted() {
    // start voice/video session
    phone.dial(user_number);
}
function call_rejected() {
    // show call rejected screen
}

@stephenlb
Copy link
Owner

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

No branches or pull requests

3 participants