Add VoIP webhook connector for call logging, notifications, and optional click-to-call; align brand to Montact.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user