From 7e410bcc78f821d922977876c8f6a020eee040e2 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Wed, 2 Aug 2023 12:57:35 +0700 Subject: [PATCH] add carrier instructions to send call to sip-realm --- .../internal/views/carriers/index.tsx | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/containers/internal/views/carriers/index.tsx b/src/containers/internal/views/carriers/index.tsx index f61b424..9a195b8 100644 --- a/src/containers/internal/views/carriers/index.tsx +++ b/src/containers/internal/views/carriers/index.tsx @@ -30,16 +30,24 @@ import { API_SIP_GATEWAY, API_SMPP_GATEWAY, CARRIER_REG_OK, + ENABLE_HOSTED_SYSTEM, USER_ACCOUNT, } from "src/api/constants"; import { DeleteCarrier } from "./delete"; -import type { Account, Carrier, SipGateway, SmppGateway } from "src/api/types"; +import type { + Account, + Carrier, + CurrentUserData, + SipGateway, + SmppGateway, +} from "src/api/types"; import { Scope } from "src/store/types"; import { getAccountFilter, setLocation } from "src/store/localStore"; export const Carriers = () => { const user = useSelectState("user"); + const [userData] = useApiData("Users/me"); const currentServiceProvider = useSelectState("currentServiceProvider"); const [apiUrl, setApiUrl] = useState(""); const [carrier, setCarrier] = useState(null); @@ -130,7 +138,16 @@ export const Carriers = () => { return ( <>
-

Carriers

+
+

Carriers

+ {ENABLE_HOSTED_SYSTEM && ( + + Have your carrier send calls to{" "} + {userData?.account?.sip_realm} + + )} +
+ {" "}