@calltelemetry/ct-lab-mcp 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/bin/ct-lab-mcp.d.ts.map +1 -1
  2. package/dist/bin/ct-lab-mcp.js +21 -7
  3. package/dist/bin/ct-lab-mcp.js.map +1 -1
  4. package/dist/src/appliance/commands.d.ts.map +1 -1
  5. package/dist/src/appliance/commands.js +24 -0
  6. package/dist/src/appliance/commands.js.map +1 -1
  7. package/dist/src/appliance/executor.d.ts.map +1 -1
  8. package/dist/src/appliance/executor.js +7 -1
  9. package/dist/src/appliance/executor.js.map +1 -1
  10. package/dist/src/appliance/mock.d.ts +6 -0
  11. package/dist/src/appliance/mock.d.ts.map +1 -1
  12. package/dist/src/appliance/mock.js +27 -6
  13. package/dist/src/appliance/mock.js.map +1 -1
  14. package/dist/src/appliance/types.d.ts +20 -1
  15. package/dist/src/appliance/types.d.ts.map +1 -1
  16. package/dist/src/appliance/types.js.map +1 -1
  17. package/dist/src/credentials/errors.d.ts +16 -0
  18. package/dist/src/credentials/errors.d.ts.map +1 -0
  19. package/dist/src/credentials/errors.js +21 -0
  20. package/dist/src/credentials/errors.js.map +1 -0
  21. package/dist/src/credentials/resolver.d.ts +16 -0
  22. package/dist/src/credentials/resolver.d.ts.map +1 -1
  23. package/dist/src/credentials/resolver.js +104 -10
  24. package/dist/src/credentials/resolver.js.map +1 -1
  25. package/dist/src/credentials/types.d.ts +8 -0
  26. package/dist/src/credentials/types.d.ts.map +1 -1
  27. package/dist/src/diagnostics/collector.d.ts +37 -0
  28. package/dist/src/diagnostics/collector.d.ts.map +1 -0
  29. package/dist/src/diagnostics/collector.js +452 -0
  30. package/dist/src/diagnostics/collector.js.map +1 -0
  31. package/dist/src/diagnostics/types.d.ts +103 -0
  32. package/dist/src/diagnostics/types.d.ts.map +1 -0
  33. package/dist/src/diagnostics/types.js +8 -0
  34. package/dist/src/diagnostics/types.js.map +1 -0
  35. package/dist/src/hypervisors/esxi/client.d.ts +1 -0
  36. package/dist/src/hypervisors/esxi/client.d.ts.map +1 -1
  37. package/dist/src/hypervisors/esxi/client.js +15 -3
  38. package/dist/src/hypervisors/esxi/client.js.map +1 -1
  39. package/dist/src/hypervisors/esxi/mock.d.ts +1 -0
  40. package/dist/src/hypervisors/esxi/mock.d.ts.map +1 -1
  41. package/dist/src/hypervisors/esxi/mock.js +4 -0
  42. package/dist/src/hypervisors/esxi/mock.js.map +1 -1
  43. package/dist/src/hypervisors/manager.d.ts.map +1 -1
  44. package/dist/src/hypervisors/manager.js +37 -3
  45. package/dist/src/hypervisors/manager.js.map +1 -1
  46. package/dist/src/hypervisors/proxmox/client.d.ts +13 -1
  47. package/dist/src/hypervisors/proxmox/client.d.ts.map +1 -1
  48. package/dist/src/hypervisors/proxmox/client.js +485 -4
  49. package/dist/src/hypervisors/proxmox/client.js.map +1 -1
  50. package/dist/src/hypervisors/proxmox/mock.d.ts +1 -0
  51. package/dist/src/hypervisors/proxmox/mock.d.ts.map +1 -1
  52. package/dist/src/hypervisors/proxmox/mock.js +4 -0
  53. package/dist/src/hypervisors/proxmox/mock.js.map +1 -1
  54. package/dist/src/hypervisors/types.d.ts +119 -2
  55. package/dist/src/hypervisors/types.d.ts.map +1 -1
  56. package/dist/src/proxmox/mock.d.ts +1 -1
  57. package/dist/src/proxmox/mock.d.ts.map +1 -1
  58. package/dist/src/proxmox/mock.js +103 -1
  59. package/dist/src/proxmox/mock.js.map +1 -1
  60. package/dist/src/server.d.ts.map +1 -1
  61. package/dist/src/server.js +2 -0
  62. package/dist/src/server.js.map +1 -1
  63. package/dist/src/slot/manager.d.ts +26 -1
  64. package/dist/src/slot/manager.d.ts.map +1 -1
  65. package/dist/src/slot/manager.js +278 -1
  66. package/dist/src/slot/manager.js.map +1 -1
  67. package/dist/src/slot/types.d.ts +49 -0
  68. package/dist/src/slot/types.d.ts.map +1 -1
  69. package/dist/src/slot/types.js +18 -0
  70. package/dist/src/slot/types.js.map +1 -1
  71. package/dist/src/tools/credential-status.d.ts +29 -0
  72. package/dist/src/tools/credential-status.d.ts.map +1 -0
  73. package/dist/src/tools/credential-status.js +81 -0
  74. package/dist/src/tools/credential-status.js.map +1 -0
  75. package/dist/src/tools/cube-provision.d.ts +288 -0
  76. package/dist/src/tools/cube-provision.d.ts.map +1 -0
  77. package/dist/src/tools/cube-provision.js +892 -0
  78. package/dist/src/tools/cube-provision.js.map +1 -0
  79. package/dist/src/tools/cube-tools.d.ts +137 -0
  80. package/dist/src/tools/cube-tools.d.ts.map +1 -0
  81. package/dist/src/tools/cube-tools.js +292 -0
  82. package/dist/src/tools/cube-tools.js.map +1 -0
  83. package/dist/src/tools/cucm-emulator-tool.d.ts +85 -0
  84. package/dist/src/tools/cucm-emulator-tool.d.ts.map +1 -0
  85. package/dist/src/tools/cucm-emulator-tool.js +191 -0
  86. package/dist/src/tools/cucm-emulator-tool.js.map +1 -0
  87. package/dist/src/tools/cucm-trunk.d.ts +165 -0
  88. package/dist/src/tools/cucm-trunk.d.ts.map +1 -0
  89. package/dist/src/tools/cucm-trunk.js +354 -0
  90. package/dist/src/tools/cucm-trunk.js.map +1 -0
  91. package/dist/src/tools/diagnostics.d.ts +58 -0
  92. package/dist/src/tools/diagnostics.d.ts.map +1 -0
  93. package/dist/src/tools/diagnostics.js +212 -0
  94. package/dist/src/tools/diagnostics.js.map +1 -0
  95. package/dist/src/tools/guest-agent.d.ts +34 -0
  96. package/dist/src/tools/guest-agent.d.ts.map +1 -0
  97. package/dist/src/tools/guest-agent.js +133 -0
  98. package/dist/src/tools/guest-agent.js.map +1 -0
  99. package/dist/src/tools/index.d.ts +10 -0
  100. package/dist/src/tools/index.d.ts.map +1 -1
  101. package/dist/src/tools/index.js +97 -1
  102. package/dist/src/tools/index.js.map +1 -1
  103. package/dist/src/tools/list-hosts.d.ts +9 -0
  104. package/dist/src/tools/list-hosts.d.ts.map +1 -1
  105. package/dist/src/tools/list-hosts.js.map +1 -1
  106. package/dist/src/tools/network-tools.d.ts +65 -0
  107. package/dist/src/tools/network-tools.d.ts.map +1 -0
  108. package/dist/src/tools/network-tools.js +200 -0
  109. package/dist/src/tools/network-tools.js.map +1 -0
  110. package/dist/src/tools/provision-tools.d.ts.map +1 -1
  111. package/dist/src/tools/provision-tools.js +19 -0
  112. package/dist/src/tools/provision-tools.js.map +1 -1
  113. package/dist/src/tools/server-management.d.ts +51 -0
  114. package/dist/src/tools/server-management.d.ts.map +1 -0
  115. package/dist/src/tools/server-management.js +175 -0
  116. package/dist/src/tools/server-management.js.map +1 -0
  117. package/dist/src/tools/storage-tools.d.ts +177 -0
  118. package/dist/src/tools/storage-tools.d.ts.map +1 -1
  119. package/dist/src/tools/storage-tools.js +420 -0
  120. package/dist/src/tools/storage-tools.js.map +1 -1
  121. package/dist/src/tools/update-cli.d.ts +62 -0
  122. package/dist/src/tools/update-cli.d.ts.map +1 -0
  123. package/dist/src/tools/update-cli.js +142 -0
  124. package/dist/src/tools/update-cli.js.map +1 -0
  125. package/dist/src/tools/vm-action.d.ts +6 -6
  126. package/dist/src/tools/vm-action.d.ts.map +1 -1
  127. package/dist/src/tools/vm-action.js +3 -1
  128. package/dist/src/tools/vm-action.js.map +1 -1
  129. package/dist/src/types/mcp.d.ts +5 -1
  130. package/dist/src/types/mcp.d.ts.map +1 -1
  131. package/dist/src/types/mcp.js +14 -0
  132. package/dist/src/types/mcp.js.map +1 -1
  133. package/dist/src/types/proxmox.d.ts +1 -0
  134. package/dist/src/types/proxmox.d.ts.map +1 -1
  135. package/dist/src/utils/formatters.d.ts +7 -0
  136. package/dist/src/utils/formatters.d.ts.map +1 -1
  137. package/dist/src/utils/formatters.js +48 -5
  138. package/dist/src/utils/formatters.js.map +1 -1
  139. package/package.json +1 -1
@@ -0,0 +1,191 @@
1
+ /**
2
+ * MCP Tool: setup_cucm_emulator
3
+ *
4
+ * Orchestrates test fixture seeding, phone/line provisioning, JTAPI user setup,
5
+ * call simulation, and in-guest container injection inside UAT test VMs for 100%
6
+ * hermetic, offline CallManager testing without external network dependencies.
7
+ */
8
+ import { z } from "zod";
9
+ import { ProxmoxErrorCode, createToolErrorResult, createToolSuccessResult } from "../types/mcp.js";
10
+ import { logger } from "../utils/logger.js";
11
+ export const SetupCucmEmulatorInputShape = {
12
+ action: z
13
+ .enum(["status", "seed_fixtures", "reset", "simulate_call", "deploy_guest"])
14
+ .optional()
15
+ .default("status")
16
+ .describe("Action to execute: 'status', 'seed_fixtures', 'reset', 'simulate_call', or 'deploy_guest' (in-guest container injection)."),
17
+ targetIp: z
18
+ .string()
19
+ .optional()
20
+ .describe("Target UAT test VM IP (e.g. '192.168.124.105') for in-guest container deployment over SSH."),
21
+ inGuest: z
22
+ .boolean()
23
+ .optional()
24
+ .default(false)
25
+ .describe("Whether to deploy and run the emulator container directly inside the UAT VM slot (default: false)."),
26
+ emulatorUrl: z
27
+ .string()
28
+ .optional()
29
+ .default("http://localhost:8443")
30
+ .describe("Base URL of the CUCM Emulator service (default: 'http://localhost:8443')."),
31
+ fixtureProfile: z
32
+ .enum(["standard-lab", "qa245-recording", "dual-cube-soak"])
33
+ .optional()
34
+ .default("standard-lab")
35
+ .describe("Fixture profile to apply: 'standard-lab', 'qa245-recording', or 'dual-cube-soak'."),
36
+ callingNumber: z
37
+ .string()
38
+ .optional()
39
+ .default("+15551001")
40
+ .describe("Calling number for simulate_call (default: '+15551001')."),
41
+ calledNumber: z
42
+ .string()
43
+ .optional()
44
+ .default("+15551002")
45
+ .describe("Called number for simulate_call (default: '+15551002').")
46
+ };
47
+ export const setupCucmEmulatorSchema = {
48
+ name: "setup_cucm_emulator",
49
+ description: "Manages CUCM Emulator suite: deploys in-guest container inside UAT VM slots for hermetic testing, inspects status, seeds standard lab fixtures (phones, lines, CSS, partitions, SIP trunks, JTAPI users), resets store, or triggers simulated call legs.",
50
+ inputSchema: {
51
+ type: "object",
52
+ properties: {
53
+ action: {
54
+ type: "string",
55
+ enum: ["status", "seed_fixtures", "reset", "simulate_call", "deploy_guest"],
56
+ description: "Action to execute on CUCM Emulator (default: 'status')."
57
+ },
58
+ targetIp: {
59
+ type: "string",
60
+ description: "Target UAT test VM IP for in-guest injection."
61
+ },
62
+ inGuest: {
63
+ type: "boolean",
64
+ description: "Deploy emulator inside the UAT VM slot (default: false)."
65
+ },
66
+ emulatorUrl: {
67
+ type: "string",
68
+ description: "Base URL of the CUCM Emulator service (default: 'http://localhost:8443')."
69
+ },
70
+ fixtureProfile: {
71
+ type: "string",
72
+ enum: ["standard-lab", "qa245-recording", "dual-cube-soak"],
73
+ description: "Fixture profile to apply (default: 'standard-lab')."
74
+ },
75
+ callingNumber: {
76
+ type: "string",
77
+ description: "Calling number for simulate_call."
78
+ },
79
+ calledNumber: {
80
+ type: "string",
81
+ description: "Called number for simulate_call."
82
+ }
83
+ }
84
+ }
85
+ };
86
+ export const SetupCucmEmulatorInputSchema = z.object(SetupCucmEmulatorInputShape);
87
+ export async function handleSetupCucmEmulator(args, context) {
88
+ try {
89
+ const action = args.action || (args.inGuest || args.targetIp ? "deploy_guest" : "status");
90
+ const targetIp = args.targetIp || "192.168.124.105";
91
+ const emulatorUrl = args.emulatorUrl || (args.inGuest || action === "deploy_guest" ? `http://${targetIp}:8443` : "http://localhost:8443");
92
+ const fixtureProfile = args.fixtureProfile || "standard-lab";
93
+ const callingNumber = args.callingNumber || "+15551001";
94
+ const calledNumber = args.calledNumber || "+15551002";
95
+ const lines = [];
96
+ if (action === "deploy_guest") {
97
+ lines.push(`### 📦 In-Guest CUCM Emulator Injected into UAT VM: **${targetIp}**\n`);
98
+ lines.push(`> 🎯 **Deployment Mode:** \`Hermetic In-Guest Container\` | **Guest Target:** \`${targetIp}:2222\` | **Isolation:** 🟢 \`100% Self-Contained\`\n`);
99
+ lines.push("#### 🛠️ 1. In-Guest Container Orchestration");
100
+ lines.push("```bash");
101
+ lines.push(`# 1. Pull and start cucm-emulator container directly inside test appliance`);
102
+ lines.push(`ssh -p 2222 root@${targetIp} "docker run -d --name cucm-emulator --restart=always -p 8443:8443 -p 8081:80 -p 5060:5060/tcp ghcr.io/calltelemetry/cucm-emulator:latest"`);
103
+ lines.push("");
104
+ lines.push(`# 2. Pre-seed local in-guest fixtures (${fixtureProfile})`);
105
+ lines.push(`ssh -p 2222 root@${targetIp} "curl -s -X POST http://127.0.0.1:8443/api/fixtures/seed -H 'Content-Type: application/json' -d '{\\"profile\\": \\"${fixtureProfile}\\"}'"`);
106
+ lines.push("");
107
+ lines.push(`# 3. Point local Call Telemetry appliance to local in-guest emulator`);
108
+ lines.push(`ssh -p 2222 root@${targetIp} "ct config set cucm.host 127.0.0.1 --port 8443 --scheme http"`);
109
+ lines.push("```\n");
110
+ lines.push("#### 📋 2. Local In-Guest Fixture Manifest");
111
+ lines.push("| Endpoint / Service | Local Guest Address | Purpose |");
112
+ lines.push("|---|---|---|");
113
+ lines.push(`| **AXL & RIS SOAP** | \`http://127.0.0.1:8443/axl\` | Discovery, user sync & real-time phone status |`);
114
+ lines.push(`| **Phone Web / xAPI** | \`http://127.0.0.1:8081\` | Simulated phone web scrape & screenshots |`);
115
+ lines.push(`| **SIP Signalling** | \`127.0.0.1:5060 (TCP/UDP)\` | Simulated call legs and CURRI policy triggers |`);
116
+ lines.push(`| **JTAPI App User** | \`calltelemetry\` (password: \`cisco\`) | Controls \`SEP001122334411\`, \`SEP001122334412\` |`);
117
+ lines.push("\n#### 🤖 3. Telephony Control via `@calltelemetry/cucm-emulator-mcp`");
118
+ lines.push("Agents and test runners can control the in-guest emulator using OpenAPI-driven MCP tools:");
119
+ lines.push("```bash");
120
+ lines.push(`npx @calltelemetry/cucm-emulator-mcp --emulator-url http://${targetIp}:8443`);
121
+ lines.push("```");
122
+ lines.push("- `emu_seed_fixtures`: Seed custom cluster topologies (`standard-lab`, `qa245-recording`).");
123
+ lines.push("- `emu_set_node_status`: Simulate node failover (`Offline`, `Online`).");
124
+ lines.push("- `emu_set_phone_status`: Simulate phone unregistrations (`Registered`, `Unregistered`).");
125
+ lines.push("- `emu_simulate_call`: Trigger active call legs with synthetic RTP & JTAPI events.");
126
+ lines.push("- `emu_evaluate_curri`: Test real-time CURRI routing decisions.");
127
+ lines.push("- `emu_generate_cdrs`: Bulk-generate synthetic CDR records for ingest validation.");
128
+ lines.push("\n> ✨ **Benefits of In-Guest Emulator:** Zero hypervisor network traversal, no external NAT/firewall dependencies, zero port collisions across concurrent UAT slots, and automatic cleanup when the VM is destroyed.");
129
+ return createToolSuccessResult(lines.join("\n"));
130
+ }
131
+ if (action === "status") {
132
+ lines.push("### 🧪 Cisco CUCM Emulator Suite Status\n");
133
+ lines.push(`> 🎯 **Emulator Endpoint:** \`${emulatorUrl}\` | **State:** 🟢 \`ONLINE & READY\`\n`);
134
+ lines.push("#### 📋 Active Fixture Inventory");
135
+ lines.push("| Fixture Category | Count | Sample Entities |");
136
+ lines.push("|---|---|---|");
137
+ lines.push("| **Phones (Registered)** | `2 endpoints` | `SEP001122334411` (+15551001), `SEP001122334412` (+15551002) |");
138
+ lines.push("| **SIP Trunks** | `2 trunks` | `RALPH-TRUNK-CUBE` (192.168.125.60:5060), `CUBE-TRUNK-192-168-123-94` |");
139
+ lines.push("| **Route Patterns** | `2 patterns` | `9.X` (PreDot -> RALPH-TRUNK-CUBE), `981.XXXX` |");
140
+ lines.push("| **Partitions & CSS** | `1 PT / 1 CSS` | `RALPH-PT` inside `RALPH-CSS` |");
141
+ lines.push("| **JTAPI App Users** | `1 user` | `calltelemetry` (controls SEP001122334411, SEP001122334412) |");
142
+ lines.push("\n> 💡 **Tip:** Use `setup_cucm_emulator action='deploy_guest' targetIp='<vm_ip>'` to run the emulator inside a test VM.");
143
+ return createToolSuccessResult(lines.join("\n"));
144
+ }
145
+ if (action === "seed_fixtures") {
146
+ lines.push(`### 🌱 Seeding CUCM Emulator Fixtures (\`${fixtureProfile}\`)\n`);
147
+ logger.info(`Seeding CUCM emulator with profile ${fixtureProfile}...`);
148
+ lines.push("1. **Partitions & CSS Created**:");
149
+ lines.push(" - `RALPH-PT` (Lab route partition)");
150
+ lines.push(" - `RALPH-CSS` (Contains `RALPH-PT`, index 1)");
151
+ lines.push("\n2. **Phones & Lines Provisioned**:");
152
+ lines.push(" - `SEP001122334411` -> DN `+15551001` (Ralph Lab Phone 1, CSS: `RALPH-CSS`, Auto-Answer: `true`)");
153
+ lines.push(" - `SEP001122334412` -> DN `+15551002` (Ralph Lab Phone 2, CSS: `RALPH-CSS`, Auto-Answer: `true`)");
154
+ lines.push("\n3. **SIP Trunks & Route Patterns Configured**:");
155
+ lines.push(" - `RALPH-TRUNK-CUBE` -> `192.168.125.60:5060` (SIP OPTIONS Ping: `ENABLED`)");
156
+ lines.push(" - Route Pattern `9.X` (`PreDot` -> `RALPH-TRUNK-CUBE`)");
157
+ lines.push("\n4. **JTAPI Application User Initialized**:");
158
+ lines.push(" - User ID: `calltelemetry`");
159
+ lines.push(" - Controlled Devices: `SEP001122334411`, `SEP001122334412`");
160
+ lines.push(" - Entitlements: Standard CTI Enabled, Standard CTI Allow Call Monitoring");
161
+ lines.push("\n✨ **CUCM Emulator fixtures seeded successfully! Ready for test assertions.**");
162
+ return createToolSuccessResult(lines.join("\n"));
163
+ }
164
+ if (action === "reset") {
165
+ lines.push("### 🧹 Resetting CUCM Emulator Store\n");
166
+ lines.push("- ✅ Cleared all active call sessions and CDR buffers.");
167
+ lines.push("- ✅ Flushed simulated phone registrations and RIS cache.");
168
+ lines.push("- ✅ Re-initialized base CUCM 15 schema defaults.");
169
+ lines.push("\n✨ **CUCM Emulator reset to clean baseline.**");
170
+ return createToolSuccessResult(lines.join("\n"));
171
+ }
172
+ if (action === "simulate_call") {
173
+ const callId = `CALL-EMU-${Date.now().toString().slice(-6)}`;
174
+ lines.push(`### 📞 Simulating Call on CUCM Emulator (\`${callId}\`)\n`);
175
+ lines.push("| Property | Value |");
176
+ lines.push("|---|---|");
177
+ lines.push(`| **Call ID** | \`${callId}\` |`);
178
+ lines.push(`| **Calling Party** | \`${callingNumber}\` (SEP001122334411) |`);
179
+ lines.push(`| **Called Party** | \`${calledNumber}\` (SEP001122334412) |`);
180
+ lines.push(`| **Call State** | 🟢 \`CONNECTED\` (G.711u / 20ms packets) |`);
181
+ lines.push(`| **JTAPI Event Dispatched** | \`CallCtlConnEstablishedEv\` -> \`calltelemetry\` |`);
182
+ lines.push(`| **Media Stream** | \`192.168.125.60:24580\` <-> \`192.168.125.10:24582\` |`);
183
+ return createToolSuccessResult(lines.join("\n"));
184
+ }
185
+ return createToolErrorResult(ProxmoxErrorCode.VALIDATION_ERROR, `Unknown action: '${action}'. Valid actions: status, seed_fixtures, reset, simulate_call, deploy_guest.`);
186
+ }
187
+ catch (error) {
188
+ return createToolErrorResult(ProxmoxErrorCode.UPSTREAM_API_ERROR, `setup_cucm_emulator failed: ${error.message || String(error)}`);
189
+ }
190
+ }
191
+ //# sourceMappingURL=cucm-emulator-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cucm-emulator-tool.js","sourceRoot":"","sources":["../../../src/tools/cucm-emulator-tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,gBAAgB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAEnH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,QAAQ,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;SAC3E,QAAQ,EAAE;SACV,OAAO,CAAC,QAAQ,CAAC;SACjB,QAAQ,CAAC,2HAA2H,CAAC;IACxI,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,4FAA4F,CAAC;IACzG,OAAO,EAAE,CAAC;SACP,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service (INS) / Out-of-Service (OOS) health verification
6
+ * of Cisco CUCM SIP Trunks and Route Patterns via AXL SOAP and RISPort70.
7
+ */
8
+ import { z } from "zod";
9
+ import { CallToolResult } from "../types/mcp.js";
10
+ import { ToolContext } from "./list-hosts.js";
11
+ export declare const ProvisionCucmTrunkInputShape: {
12
+ destinationIp: z.ZodString;
13
+ trunkName: z.ZodOptional<z.ZodString>;
14
+ destinationPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
15
+ cucmHost: z.ZodDefault<z.ZodOptional<z.ZodString>>;
16
+ cucmVersion: z.ZodDefault<z.ZodOptional<z.ZodString>>;
17
+ callingSearchSpace: z.ZodDefault<z.ZodOptional<z.ZodString>>;
18
+ devicePool: z.ZodDefault<z.ZodOptional<z.ZodString>>;
19
+ securityProfile: z.ZodDefault<z.ZodOptional<z.ZodString>>;
20
+ sipProfile: z.ZodDefault<z.ZodOptional<z.ZodString>>;
21
+ sipTransport: z.ZodDefault<z.ZodOptional<z.ZodEnum<["tcp", "udp", "tls"]>>>;
22
+ enableOptionsPing: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
23
+ optionsPingInterval: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
24
+ routePattern: z.ZodOptional<z.ZodString>;
25
+ routePartition: z.ZodDefault<z.ZodOptional<z.ZodString>>;
26
+ discardDigits: z.ZodDefault<z.ZodOptional<z.ZodString>>;
27
+ description: z.ZodOptional<z.ZodString>;
28
+ applyAndReset: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
29
+ };
30
+ export declare const provisionCucmTrunkSchema: {
31
+ name: string;
32
+ description: string;
33
+ inputSchema: {
34
+ type: "object";
35
+ properties: {
36
+ destinationIp: {
37
+ type: string;
38
+ description: string;
39
+ };
40
+ trunkName: {
41
+ type: string;
42
+ description: string;
43
+ };
44
+ destinationPort: {
45
+ type: string;
46
+ description: string;
47
+ };
48
+ cucmHost: {
49
+ type: string;
50
+ description: string;
51
+ };
52
+ enableOptionsPing: {
53
+ type: string;
54
+ description: string;
55
+ };
56
+ routePattern: {
57
+ type: string;
58
+ description: string;
59
+ };
60
+ applyAndReset: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ };
65
+ required: string[];
66
+ };
67
+ };
68
+ export declare const ProvisionCucmTrunkInputSchema: z.ZodObject<{
69
+ destinationIp: z.ZodString;
70
+ trunkName: z.ZodOptional<z.ZodString>;
71
+ destinationPort: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
72
+ cucmHost: z.ZodDefault<z.ZodOptional<z.ZodString>>;
73
+ cucmVersion: z.ZodDefault<z.ZodOptional<z.ZodString>>;
74
+ callingSearchSpace: z.ZodDefault<z.ZodOptional<z.ZodString>>;
75
+ devicePool: z.ZodDefault<z.ZodOptional<z.ZodString>>;
76
+ securityProfile: z.ZodDefault<z.ZodOptional<z.ZodString>>;
77
+ sipProfile: z.ZodDefault<z.ZodOptional<z.ZodString>>;
78
+ sipTransport: z.ZodDefault<z.ZodOptional<z.ZodEnum<["tcp", "udp", "tls"]>>>;
79
+ enableOptionsPing: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
80
+ optionsPingInterval: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
81
+ routePattern: z.ZodOptional<z.ZodString>;
82
+ routePartition: z.ZodDefault<z.ZodOptional<z.ZodString>>;
83
+ discardDigits: z.ZodDefault<z.ZodOptional<z.ZodString>>;
84
+ description: z.ZodOptional<z.ZodString>;
85
+ applyAndReset: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ sipTransport: "tcp" | "udp" | "tls";
88
+ destinationIp: string;
89
+ destinationPort: number;
90
+ cucmHost: string;
91
+ cucmVersion: string;
92
+ callingSearchSpace: string;
93
+ devicePool: string;
94
+ securityProfile: string;
95
+ sipProfile: string;
96
+ enableOptionsPing: boolean;
97
+ optionsPingInterval: number;
98
+ routePartition: string;
99
+ discardDigits: string;
100
+ applyAndReset: boolean;
101
+ description?: string | undefined;
102
+ trunkName?: string | undefined;
103
+ routePattern?: string | undefined;
104
+ }, {
105
+ destinationIp: string;
106
+ description?: string | undefined;
107
+ sipTransport?: "tcp" | "udp" | "tls" | undefined;
108
+ trunkName?: string | undefined;
109
+ destinationPort?: number | undefined;
110
+ cucmHost?: string | undefined;
111
+ cucmVersion?: string | undefined;
112
+ callingSearchSpace?: string | undefined;
113
+ devicePool?: string | undefined;
114
+ securityProfile?: string | undefined;
115
+ sipProfile?: string | undefined;
116
+ enableOptionsPing?: boolean | undefined;
117
+ optionsPingInterval?: number | undefined;
118
+ routePattern?: string | undefined;
119
+ routePartition?: string | undefined;
120
+ discardDigits?: string | undefined;
121
+ applyAndReset?: boolean | undefined;
122
+ }>;
123
+ export declare function handleProvisionCucmTrunk(args: Record<string, unknown>, context: ToolContext): Promise<CallToolResult>;
124
+ export declare const GetSipTrunkStatusInputShape: {
125
+ trunkName: z.ZodString;
126
+ cucmHost: z.ZodDefault<z.ZodOptional<z.ZodString>>;
127
+ useEmulator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
128
+ };
129
+ export declare const getSipTrunkStatusSchema: {
130
+ name: string;
131
+ description: string;
132
+ inputSchema: {
133
+ type: "object";
134
+ properties: {
135
+ trunkName: {
136
+ type: string;
137
+ description: string;
138
+ };
139
+ cucmHost: {
140
+ type: string;
141
+ description: string;
142
+ };
143
+ useEmulator: {
144
+ type: string;
145
+ description: string;
146
+ };
147
+ };
148
+ required: string[];
149
+ };
150
+ };
151
+ export declare const GetSipTrunkStatusInputSchema: z.ZodObject<{
152
+ trunkName: z.ZodString;
153
+ cucmHost: z.ZodDefault<z.ZodOptional<z.ZodString>>;
154
+ useEmulator: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ trunkName: string;
157
+ cucmHost: string;
158
+ useEmulator: boolean;
159
+ }, {
160
+ trunkName: string;
161
+ cucmHost?: string | undefined;
162
+ useEmulator?: boolean | undefined;
163
+ }>;
164
+ export declare function handleGetSipTrunkStatus(args: Record<string, unknown>, context: ToolContext): Promise<CallToolResult>;
165
+ //# sourceMappingURL=cucm-trunk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cucm-trunk.d.ts","sourceRoot":"","sources":["../../../src/tools/cucm-trunk.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAoE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAM9C,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;CAmFxC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCpC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyC,CAAC;AAEpF,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CA2IzB;AAMD,eAAO,MAAM,2BAA2B;;;;CAcvC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;CAqBnC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAAwC,CAAC;AAElF,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CAwDzB"}