import { Input } from '@/components/base/input/input'; // Telephony form — covers Ozonetel cloud-call-center, the Ozonetel WebRTC // gateway, and Exotel REST API credentials. Mirrors the TelephonyConfig shape // in helix-engage-server/src/config/telephony.defaults.ts. // // Secrets (ozonetel.agentPassword, exotel.apiToken) come back from the GET // endpoint as the sentinel '***masked***' — the form preserves that sentinel // untouched unless the admin actually edits the field, in which case the // backend overwrites the stored value. This is the same convention used by // TelephonyConfigService.getMaskedConfig / updateConfig. export type TelephonyFormValues = { ozonetel: { agentId: string; agentPassword: string; did: string; sipId: string; campaignName: string; }; sip: { domain: string; wsPort: string; }; exotel: { apiKey: string; apiToken: string; accountSid: string; subdomain: string; }; }; export const emptyTelephonyFormValues = (): TelephonyFormValues => ({ ozonetel: { agentId: '', agentPassword: '', did: '', sipId: '', campaignName: '', }, sip: { domain: 'blr-pub-rtc4.ozonetel.com', wsPort: '444', }, exotel: { apiKey: '', apiToken: '', accountSid: '', subdomain: 'api.exotel.com', }, }); type TelephonyFormProps = { value: TelephonyFormValues; onChange: (value: TelephonyFormValues) => void; }; export const TelephonyForm = ({ value, onChange }: TelephonyFormProps) => { const patchOzonetel = (updates: Partial) => onChange({ ...value, ozonetel: { ...value.ozonetel, ...updates } }); const patchSip = (updates: Partial) => onChange({ ...value, sip: { ...value.sip, ...updates } }); const patchExotel = (updates: Partial) => onChange({ ...value, exotel: { ...value.exotel, ...updates } }); return (

Ozonetel Cloud Agent

Outbound dialing, SIP registration, and agent provisioning. Get these values from your Ozonetel dashboard under Admin → Users and Numbers.

patchOzonetel({ agentId: v })} /> patchOzonetel({ agentPassword: v })} />
patchOzonetel({ did: v })} /> patchOzonetel({ sipId: v })} />
patchOzonetel({ campaignName: v })} />

SIP Gateway (WebRTC)

Used by the staff portal softphone. Defaults work for most Indian Ozonetel tenants — only change if Ozonetel support instructs you to.

patchSip({ domain: v })} /> patchSip({ wsPort: v })} />

Exotel (SMS + inbound numbers)

Optional — only required if you use Exotel for SMS or want inbound number management from this portal.

patchExotel({ apiKey: v })} /> patchExotel({ apiToken: v })} />
patchExotel({ accountSid: v })} /> patchExotel({ subdomain: v })} />
); };