diff --git a/src/api/constants.ts b/src/api/constants.ts index f832936..706e3cc 100644 --- a/src/api/constants.ts +++ b/src/api/constants.ts @@ -90,6 +90,26 @@ export const NETMASK_OPTIONS = NETMASK_BITS.map((bit) => ({ value: bit.toString(), })); +/** SIP Gateway Protocol */ +export const SIP_GATEWAY_PROTOCOL_OPTIONS = [ + { + name: "UDP", + value: "udp", + }, + { + name: "TCP", + value: "tcp", + }, + { + name: "TLS", + value: "tls", + }, + { + name: "TLS/SRTP", + value: "tls/srtp", + }, +]; + /** Password Length options */ export const PASSWORD_MIN = 8; diff --git a/src/api/types.ts b/src/api/types.ts index 614a4ae..9af9f77 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -385,6 +385,7 @@ export interface Gateway { export interface SipGateway extends Gateway { sip_gateway_sid?: null | string; is_active: boolean; + protocol?: string; } export interface SmppGateway extends Gateway { diff --git a/src/containers/internal/views/carriers/form.tsx b/src/containers/internal/views/carriers/form.tsx index 784674a..ba41d30 100644 --- a/src/containers/internal/views/carriers/form.tsx +++ b/src/containers/internal/views/carriers/form.tsx @@ -23,6 +23,7 @@ import { FQDN_TOP_LEVEL, INVALID, NETMASK_OPTIONS, + SIP_GATEWAY_PROTOCOL_OPTIONS, TCP_MAX_PORT, TECH_PREFIX_MINLENGTH, USER_ACCOUNT, @@ -975,18 +976,33 @@ export const CarrierForm = ({ } /> -