b24_telephony_calls
List call history with filters for CRM entity, user, duration, and date to retrieve specific telephony records.
Instructions
Lista el historial de llamadas con filtros por entidad CRM, usuario, duración y fecha.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No | Filtros. Ejemplo: { "CRM_ENTITY_TYPE": "DEAL", "CRM_ENTITY_ID": 123 } o { "CALL_DURATION": ">60" } para llamadas de más de 60 segundos | |
| select | No | ||
| webhook_url | No |
Implementation Reference
- index.js:257-260 (registration)Registration of the 'b24_telephony_calls' tool with the MCP server, using telephonyCallsSchema and telephonyCalls handler.
// ── Telefonía ───────────────────────────────────────────────────────────────── server.tool('b24_telephony_calls', 'Lista el historial de llamadas con filtros por entidad CRM, usuario, duración y fecha.', telephonyCallsSchema.shape, wrap(telephonyCalls)); - Zod schema defining the input parameters for b24_telephony_calls: filter (record), select (array of strings), webhook_url (optional URL).
export const telephonyCallsSchema = z.object({ filter: z.record(z.any()).optional().default({}).describe( 'Filtros. Ejemplo: { "CRM_ENTITY_TYPE": "DEAL", "CRM_ENTITY_ID": 123 } ' + 'o { "CALL_DURATION": ">60" } para llamadas de más de 60 segundos' ), select: z.array(z.string()).optional(), webhook_url: z.string().url().optional(), }); - src/tools/feed-notifications.js:143-150 (handler)Handler function that calls Bitrix24 API method 'voximplant.statistic.get' to list call history with filters, returning portal info and call records.
export async function telephonyCalls({ filter = {}, select, webhook_url }) { const client = new Bitrix24Client(resolveWebhook(webhook_url)); const res = await client.call('voximplant.statistic.get', { filter, ...(select ? { select } : {}), }); return { portal: client.portal, calls: res.result ?? [] }; }