Add VoIP webhook connector for call logging, notifications, and optional click-to-call; align brand to Montact.

This commit is contained in:
2026-09-27 08:47:11 +03:30
parent 26085b54a9
commit db65b55660
17 changed files with 1385 additions and 14 deletions
+15 -2
View File
@@ -447,9 +447,22 @@ function closeMenus() {
filterOpen.value = false;
}
function goCall() {
async function goCall() {
closeMenus();
if (telHref.value) window.location.href = telHref.value;
const number = phoneNumber.value;
if (!number) return;
try {
const { data } = await api.post<{ ok: boolean; mode: string; dialUrl: string }>(
'/integrations/voip/click-to-call',
{ number, personId: id.value },
);
if (data.mode === 'tel' && data.dialUrl) {
window.location.href = data.dialUrl;
}
// mode url: سانترال تماس را شروع کرده؛ نیازی به tel نیست
} catch {
if (telHref.value) window.location.href = telHref.value;
}
}
function goMail() {