Skip to content

Commit e62f146

Browse files
fix: graceful CTI empty state, expanded README use cases
- cti_status now returns friendly empty result when CUCM has no CTI apps connected (instead of propagating SOAP 500 'unknown' fault) - README expanded with 20+ real-world use cases organized by category: troubleshooting, capacity, health, inventory
1 parent 5956fed commit e62f146

2 files changed

Lines changed: 42 additions & 10 deletions

File tree

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,32 @@ An [MCP](https://modelcontextprotocol.io/) server that gives AI assistants direc
1111

1212
**You ask about your cluster in plain language. The LLM queries RIS and PerfMon for you.**
1313

14-
- *"Are all phones registered?"*
14+
### Troubleshooting & Triage
15+
- *"Are all phones registered? Which ones aren't?"*
16+
- *"Find all phones on subnet 10.1.5.x — are any unregistered?"*
17+
- *"Is SEP001122334455 registered? What node is it on? What's its IP?"*
18+
- *"Show me all rejected phones and their rejection reasons"*
19+
- *"Which CUCM node has the most unregistered devices?"*
20+
21+
### Capacity & Performance
1522
- *"Show me call volume over the last 5 minutes"*
23+
- *"How many MTP and transcoder resources are available?"*
24+
- *"Are we running low on conference bridge resources?"*
25+
- *"What's the CPU utilization on the publisher?"*
26+
- *"Monitor SIP trunk call activity for the next 2 minutes"*
27+
28+
### Health & Situational Awareness
1629
- *"Is the cluster healthy?"*
30+
- *"Give me a registration breakdown by protocol — how many SIP vs SCCP?"*
31+
- *"How many Jabber clients are connected via MRA?"*
32+
- *"Are any CTI applications connected? What's their status?"*
33+
- *"Compare registration counts to what CUCM thinks is registered via PerfMon"*
34+
35+
### Inventory & Reporting
36+
- *"How many phones are registered by model/firmware?"*
37+
- *"List all registered hardware phones and their IPs"*
38+
- *"What PerfMon counters are available on this cluster?"*
39+
- *"Show me all instances of Cisco SIP trunk counters"*
1740

1841
## Installation
1942

src/tools/device-tools.ts

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,24 @@ export async function handleDeviceTool(name: string, args: Record<string, unknow
156156
}
157157

158158
if (name === "cti_status") {
159-
const result = await selectCtiItem(creds, {
160-
ctiMgrClass: args.ctiMgrClass as string | undefined,
161-
maxItems: args.maxItems as number | undefined,
162-
appId: args.appId as string | undefined,
163-
nodeName: args.nodeName as string | undefined,
164-
status: args.status as string | undefined,
165-
timeoutMs: args.timeoutMs as number | undefined,
166-
});
167-
return jsonResponse(result);
159+
try {
160+
const result = await selectCtiItem(creds, {
161+
ctiMgrClass: args.ctiMgrClass as string | undefined,
162+
maxItems: args.maxItems as number | undefined,
163+
appId: args.appId as string | undefined,
164+
nodeName: args.nodeName as string | undefined,
165+
status: args.status as string | undefined,
166+
timeoutMs: args.timeoutMs as number | undefined,
167+
});
168+
return jsonResponse(result);
169+
} catch (ctiErr) {
170+
// CUCM returns SOAP 500 "unknown" when no CTI apps are connected — not a real error
171+
const msg = ctiErr instanceof Error ? ctiErr.message : String(ctiErr);
172+
if (/500.*unknown|unknown.*500/i.test(msg)) {
173+
return jsonResponse({ totalItemsFound: 0, items: [], note: "No CTI applications connected to cluster. Start a JTAPI/TAPI provider to see CTI status." });
174+
}
175+
throw ctiErr;
176+
}
168177
}
169178

170179
return { content: [{ type: "text", text: `Unknown device tool: ${name}` }], isError: true };

0 commit comments

Comments
 (0)