Add Access Manager for Security
sagar-spkt opened this issue · 4 comments
sagar-spkt commented
Allow only some users for call.
stephenlb commented
That is a really cool feature!
crookedbard commented
Is there any milestone for this new feature?
stephenlb commented
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
}