Regression: Server crashing if Voip credentials are invalid (#24646)

pull/24647/head
Murtaza Patrawala 3 years ago committed by GitHub
parent 8c4a40ff47
commit 1ce8825407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      server/services/voip/service.ts

@ -47,14 +47,22 @@ export class VoipService extends ServiceClassInternal implements IVoipService {
async init(): Promise<void> {
this.logger.info('Starting VoIP service');
await this.commandHandler.initConnection(CommandType.AMI);
this.logger.info('VoIP service started');
try {
await this.commandHandler.initConnection(CommandType.AMI);
this.logger.info('VoIP service started');
} catch (err) {
this.logger.error('Error initializing VOIP service', err);
}
}
async stop(): Promise<void> {
this.logger.info('Stopping VoIP service');
await this.commandHandler.stop();
this.logger.info('VoIP service stopped');
try {
this.commandHandler.stop();
this.logger.info('VoIP service stopped');
} catch (err) {
this.logger.error('Error stopping VoIP service', err);
}
}
getServerConfigData(type: ServerType): IVoipCallServerConfig | IVoipManagementServerConfig {

Loading…
Cancel
Save