fix: return engine call IDs

This commit is contained in:
2026-05-08 16:24:45 +00:00
parent 980a1500f5
commit 04e706715f
4 changed files with 539 additions and 721 deletions
+9 -11
View File
@@ -159,18 +159,16 @@ initWebUi({
port: appConfig.proxy.webUiPort,
getStatus,
log,
onStartCall: (number, deviceId, providerId) => {
onStartCall: async (number, deviceId, providerId) => {
log(`[dashboard] start call: ${number} device=${deviceId || 'any'} provider=${providerId || 'auto'}`);
void makeCall(number, deviceId, providerId).then((callId) => {
if (callId) {
log(`[dashboard] call started: ${callId}`);
statusStore.noteDashboardCallStarted(callId, number, providerId);
} else {
log(`[dashboard] call failed for ${number}`);
}
});
return { id: `pending-${Date.now()}` };
const callId = await makeCall(number, deviceId, providerId);
if (!callId) {
log(`[dashboard] call failed for ${number}`);
return null;
}
log(`[dashboard] call started: ${callId}`);
statusStore.noteDashboardCallStarted(callId, number, providerId);
return { id: callId };
},
onHangupCall: (callId) => {
void hangupCall(callId);