"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SipExtension = void 0;
class SipExtension {
    constructor(values) {
        Object.assign(this, values);
    }
    gatewayDevice(deviceList) {
        return deviceList.find((d) => d.id === this.gateway);
    }
    onCompleteDevice(deviceList) {
        return deviceList.find((d) => d.id === this.onComplete);
    }
    onFailDevice(deviceList) {
        return deviceList.find((d) => d.id === this.onFail);
    }
    onNoAnswerDevice(deviceList) {
        return deviceList.find((d) => d.id === this.onNoAnswer);
    }
    onBusyDevice(deviceList) {
        return deviceList.find((d) => d.id === this.onBusy);
    }
}
exports.SipExtension = SipExtension;
