Add stopRingingIfPossible()

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-08-26 15:00:36 +02:00
parent f54c6d75ac
commit e4f8c795bc
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D
1 changed files with 6 additions and 0 deletions

View File

@ -937,6 +937,12 @@ export default class CallHandler extends EventEmitter {
}
};
private stopRingingIfPossible(callId: string): void {
this.silencedCalls.delete(callId);
if (this.areAnyCallsUnsilenced()) return;
this.pause(AudioID.Ring);
}
private async dialNumber(number: string) {
const results = await this.pstnLookup(number);
if (!results || results.length === 0 || !results[0].userid) {