webrtc-sdk icon indicating copy to clipboard operation
webrtc-sdk copied to clipboard

Add Access Manager for Security

Open sagar-spkt opened this issue 7 years ago • 4 comments

Allow only some users for call.

sagar-spkt avatar Jun 07 '18 03:06 sagar-spkt

That is a really cool feature!

stephenlb avatar Oct 09 '18 18:10 stephenlb

Is there any milestone for this new feature?

crookedbard avatar Oct 25 '18 11:10 crookedbard

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 avatar Oct 30 '18 20:10 stephenlb

Added: https://github.com/stephenlb/webrtc-sdk/blob/master/readme.md#webrtc-session-call-rejection-and-accept-permissions

stephenlb avatar Oct 30 '18 20:10 stephenlb