LCC: add support for conf_hold_status to hold/unhold a participant in a conference

This commit is contained in:
Dave Horton
2021-09-20 15:50:00 -04:00
parent 0d6cb8a2b3
commit 3cd4c399d4
2 changed files with 42 additions and 24 deletions

View File

@@ -375,6 +375,24 @@ class Conference extends Task {
this.emitter.emit('join', opts);
}
async mute(callSid, muted) {
if (this.memberId) {
const prop = muted === true ? 'mute' : 'unmute';
this.ep.api(`conference ${this.confName} ${prop} ${this.memberId}`)
.catch((err) => this.logger.info({err}, `Error ${prop} participant`));
return true;
}
}
async deaf(callSid, deafed) {
if (this.memberId) {
const prop = deafed === true ? 'deaf' : 'undeaf';
this.ep.api(`conference ${this.confName} ${prop} ${this.memberId}`)
.catch((err) => this.logger.info({err}, `Error ${prop} participant`));
return true;
}
}
/**
* Add ourselves to the waitlist of sessions to be notified once
* the conference starts