Inbound and outbound sipgateway can be duplicated (#576)

This commit is contained in:
Hoan Luu Huu
2025-11-08 20:49:00 +07:00
committed by GitHub
parent 1c1f97f045
commit 0260b1ec8b

View File

@@ -577,26 +577,6 @@ export const CarrierForm = ({
return "Each SIP gateway must have a unique IP address.";
}
}
// Check for duplicates between inbound and outbound gateways
for (let i = 0; i < sipInboundGateways.length; i++) {
const inboundGateway = sipInboundGateways[i];
const dupeInOutbound = sipOutboundGateways.find((g) => {
return (
inboundGateway.ipv4 &&
g.ipv4 === inboundGateway.ipv4 &&
g.port === inboundGateway.port
);
});
if (dupeInOutbound) {
if (refSipInboundIp.current[i]) {
refSipInboundIp.current[i].focus();
}
setActiveTab("inbound");
return "Each SIP gateway must have a unique IP address.";
}
}
};
const getSmppValidation = () => {