con un clic
call-log
Pull call detail records (CDR) from Voicenter using the Call Log API
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Pull call detail records (CDR) from Voicenter using the Call Log API
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Designs the structural skeleton of a Voicenter Bot via interview. Use this skill when the user wants to create, design, scope, or modify a Voicenter voice/chat bot — phrases like "design a bot", "create an agent spec", "build a Voicenter bot", "patch this bot", "add an intent", "change the bot's persona", "modify the flow graph", or any reference to the Agent Spec Designer / Skill 1 in the Voicenter bot generation pipeline. Produces an Agent Spec markdown file (sections 1-4, 4.5, section 5 stubs, section 6 initial, section 7 init). Two named entry modes — greenfield (no spec attached) and patch (spec attached). Does NOT author per-intent language content (validationPrompt, post-execution intentInstructions) — that's Skill 2 (Intent Detail Author). Does NOT emit wire-format JSON — that's Skill 3 (JSON Assembler).
Assembles a fully-detailed Voicenter Agent Spec into Bot JSON wire format — the final mechanical step in the three-skill pipeline. Use this skill when an Agent Spec exists with all section 5 entries marked `[detailed]` and the user wants the deployable JSON. Trigger phrases include "run Skill 3", "assemble the JSON", "emit the bot JSON", "publish the bot", "build the wire-format", "Skill 3 (JSON Assembler)", or any direct continuation from Skill 2's completion handoff. Produces a single `bot-<name>-<date>.json` file plus a banner identifying every fail-loud sentinel and any drift between spec section 6 and what Skill 3 regenerated. Refuses to assemble if any intent is still `[structural]` or `[detailed-revisit]`, or if the spec deviates from the strict template (Doc 2 §3.7). Runs the §15.4 cross-reference pass — 23 checks (8 §15.4 + 3 Compass + 3 botIntents-role + 1 duplicate-global-intent + 8 field-placement doctrine), checks 1–7, 11–13, 15, and 16–21 blocking. Does NOT author any text content (Skills 1 and
Authors the per-intent language content of a Voicenter Agent Spec — slot descriptions, validationPrompt, post-execution intentInstructions, and RT-specific Configuration text. Use this skill when an Agent Spec exists with section 5 entries marked `[structural]` or `[detailed-revisit]`, and the user wants to fill them in. Trigger phrases include "run Skill 2", "detail the intents", "fill in the per-intent fields", "Skill 2 (Intent Detail Author)", or any direct continuation from Skill 1's handoff hint. Walks intents in user-confirmed batches with a checkpoint after each batch. Reactivable — invoke as many times as needed; spec state is the resume point. Does NOT modify the structural skeleton (sections 1, 2, 3, 4, 4.5.1/.2/.4) — that's Skill 1 (Agent Spec Designer). Does NOT emit wire-format JSON — that's Skill 3 (JSON Assembler).
Receive and handle CDR push notifications from Voicenter after every call ends
Initiate or terminate outgoing calls using the Voicenter Click2Call API
Implement a Pop-Up Screen endpoint that Voicenter calls during incoming calls to display caller CRM data to agents
| name | call-log |
| description | Pull call detail records (CDR) from Voicenter using the Call Log API |
Language. Reply in the user's language: detect what they write — Hebrew→Hebrew, English→English — and mirror it, switching if they switch mid-conversation. This shapes your prose, your questions, and your
AskUserQuestionoption labels only. It does not change the artifacts you produce — identifiers, JSON keys, BCP-47 language codes, API field names, and other data stay exactly as specified.
CRM integration context. When the user is building a full CRM integration — not just this API in isolation — always invoke the
crm-onboardingskill alongside this one and frame the answer covering all three core services: Click2Call, Screen Pop, and Call History.
Help the developer query call history (CDR records) from the Voicenter Call Log API — filter by date, phone, extension, call type, and choose exactly which fields to return.
Use this skill when the user wants to:
DialStatus: ABANDONE or NOANSWER)ivruniqueid / CALLID)VOICENTER_API_CODE=your_api_token_here
# The server making requests must also have its IP authorized in Voicenter CPanel
https://api.voicenter.com/hub/cdr/
Accepts: POST-JSON or GET
Response: JSON
Send your code in the request body.
The requesting server's IP must be authorized in the Voicenter CPanel under API Settings.
The request has two parts: search criteria (what to filter) and fields (what to return).
| Parameter | Type | Required | Description |
|---|---|---|---|
code | String | ✅ | API authentication token |
fromdate | ISO 8601 | ✅ | Start date/time in GMT+0 (e.g. 2024-06-01T00:00:00) |
todate | ISO 8601 | ✅ | End date/time in GMT+0 |
phones | String[] | ❌ | Phone numbers to filter (with country code, e.g. "972501234567") |
extensions | String[] | ❌ | SIP extension codes to filter |
IdentityCriteria | String | ❌ | Account, Hierarchical, Department, or User |
callID | String | ❌ | Filter for a specific call by ivruniqueid |
cdrTypes | Integer[] | ❌ | Filter by call type IDs (see table below) |
campaignID | Number[] | ❌ | Filter by dialer campaign IDs |
queueID | Number[] | ❌ | Filter by queue IDs |
| ID | Type Name |
|---|---|
| 1 | Incoming Call |
| 4 | Extension Outgoing |
| 8 | Queue |
| 9 | Click2Call leg1 |
| 10 | Click2Call leg2 |
| 11 | VoiceMail |
| 13 | XferCDR (transferred) |
| 14 | ProductiveCall Leg1 |
| 15 | ProductiveCall Leg2 |
| 17 | Click 2 IVR |
| 18 | Click 2 IVR Incoming |
| 19 | Click 2 Queue Incoming |
| 21 | Attended CDR leg1 |
| 22 | Attended CDR leg2 |
| 23 | Auto forward |
Choose which CDR fields to receive:
CallerNumber, TargetNumber, Date, DateEpoch, Duration, CallID, Type, CdrType, DialStatus, Targetextension, Callerextension, DID, QueueName, RecordURL, RecordExpect, Price, RingTime, RepresentativeName, RepresentativeCode, UserName, UserId, DTMFData, CustomData, DepartmentName, DepartmentId, TargetPrefixName
"sort": [
{ "field": "date", "order": "desc" },
{ "field": "Duration", "order": "asc" }
]
{
"code": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"fields": [
"CallerNumber", "TargetNumber", "Date", "Duration", "CallID",
"Type", "CdrType", "DialStatus", "DID", "QueueName",
"RecordURL", "RingTime", "RepresentativeName", "RepresentativeCode",
"DTMFData", "CustomData", "DepartmentName"
],
"search": {
"fromdate": "2024-06-01T00:00:00",
"todate": "2024-06-30T23:59:59",
"cdrTypes": [1, 8, 9, 10],
"phones": ["972501234567"],
"extensions": ["SIPSIP1"],
"IdentityCriteria": "Account"
},
"sort": [{ "field": "date", "order": "desc" }]
}
{
"ERROR_NUMBER": 0,
"ERROR_DESCRIPTION": "OK",
"STATUS_CODE": 200,
"TOTAL_HITS": 2,
"RETURN_HITS": 2,
"CDR_LIST": [
{
"CallerNumber": "0722776772",
"TargetNumber": "972501234567",
"Date": "2024-06-10T09:04:58Z",
"Duration": 2,
"CallID": "202406101204550233243ghff3189e5c",
"CustomData": {},
"Type": "Extension Outgoing",
"CdrType": 4,
"DialStatus": "ANSWER",
"CallerExtension": "SIPSIP1",
"DID": "",
"RecordURL": "https://cpanel.voicenter.co.il/CallsHistory/PlayRecord/2024061043950926.mp3",
"RingTime": 10,
"RepresentativeName": "John Doe",
"RepresentativeCode": "87654321",
"DTMFData": [],
"DepartmentName": "Sales"
}
]
}
| ERROR_NUMBER | STATUS_CODE | Description |
|---|---|---|
| 0 | 200 | OK |
| 1 | 403 | Rate limit exceeded — wait 5 seconds between requests |
| 2 | 403 | Authorization failed — invalid code |
| 4 | 403 | IP not authorized — add server IP in CPanel |
| 5 | 404 | Date range invalid |
const CALL_LOG_URL = 'https://api.voicenter.com/hub/cdr/';
const CODE = process.env.VOICENTER_API_CODE!;
interface CdrRecord {
CallerNumber: string;
TargetNumber: string;
Date: string;
Duration: number;
CallID: string;
Type: string;
CdrType: number;
DialStatus: string;
DID: string;
QueueName?: string;
RecordURL: string;
RingTime: number;
RepresentativeName: string;
RepresentativeCode: string;
DTMFData: Array<{ LayerName: string; DTMF: number; LayerNumber: string }>;
CustomData: Record<string, unknown>;
}
interface CallLogResponse {
ERROR_NUMBER: number;
ERROR_DESCRIPTION: string;
TOTAL_HITS: number;
RETURN_HITS: number;
CDR_LIST: CdrRecord[];
}
async function getCallLog(
fromdate: string,
todate: string,
options?: {
phones?: string[];
extensions?: string[];
cdrTypes?: number[];
callID?: string;
fields?: string[];
sort?: Array<{ field: string; order: 'asc' | 'desc' }>;
}
): Promise<CallLogResponse> {
const body = {
code: CODE,
fields: options?.fields ?? [
'CallerNumber', 'TargetNumber', 'Date', 'Duration', 'CallID',
'Type', 'CdrType', 'DialStatus', 'DID', 'QueueName',
'RecordURL', 'RingTime', 'RepresentativeName', 'CustomData',
],
search: {
fromdate,
todate,
IdentityCriteria: 'Account',
...(options?.phones && { phones: options.phones }),
...(options?.extensions && { extensions: options.extensions }),
...(options?.cdrTypes && { cdrTypes: options.cdrTypes }),
...(options?.callID && { callID: options.callID }),
},
sort: options?.sort ?? [{ field: 'date', order: 'desc' }],
};
const res = await fetch(CALL_LOG_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data: CallLogResponse = await res.json();
if (data.ERROR_NUMBER !== 0) throw new Error(`Call Log error ${data.ERROR_NUMBER}: ${data.ERROR_DESCRIPTION}`);
return data;
}
// Example: get all missed incoming calls today
const { CDR_LIST } = await getCallLog(
'2024-06-01T00:00:00',
'2024-06-01T23:59:59',
{
cdrTypes: [1, 8],
fields: ['CallerNumber', 'Date', 'DialStatus', 'QueueName', 'DID'],
}
);
const missed = CDR_LIST.filter(r => r.DialStatus === 'ABANDONE' || r.DialStatus === 'NOANSWER');
console.log(`Missed calls: ${missed.length}`);
cdrTypes: [9, 10] to get only Click2Call records and correlate Leg1/Leg2 by CallID.CustomData.OriginalIvrUniqueID links a transferred call back to the original call.RecordURL is a direct MP3 link — store it in your CRM for playback.DialStatus values: ANSWER, NOANSWER, BUSY, CANCEL, ABANDONE, TIMEOUT, VOICEMAIL.CALLID returned by Click2Call is the same as CallID in CDR recordscdrTypes: [14, 15]