claude-phone-local 2.0.9 → 2.0.10

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.
@@ -233,11 +233,34 @@ async function setupInstallationType(installationType, existingConfig, isPi, opt
233
233
  // than in postinstall because only now do we know which extension to ring.
234
234
  if (installationType !== 'api-server') {
235
235
  console.log(chalk.bold('\nMCP server (lets Claude call you)'));
236
- const firstDevice = config.devices && Object.keys(config.devices).length
237
- ? Object.values(config.devices)[0]
238
- : null;
236
+
237
+ const answeringExtension = config.devices?.[0]?.extension;
238
+ const { callbackNumber } = await inquirer.prompt([
239
+ {
240
+ type: 'input',
241
+ name: 'callbackNumber',
242
+ message: 'Number/extension for Claude to call YOU on (must be different ' +
243
+ `from ${answeringExtension || 'the device extension'} above - 3CX rejects ` +
244
+ 'a device calling itself):',
245
+ default: config.sip?.callbackNumber || '',
246
+ validate: (input) => {
247
+ if (!input || input.trim() === '') {
248
+ return 'A callback number is required for Claude to call you';
249
+ }
250
+ if (answeringExtension && input.trim() === answeringExtension) {
251
+ return `Must differ from ${answeringExtension} - that number answers as ` +
252
+ 'Maya, so calling it from itself is rejected by 3CX as a self-call.';
253
+ }
254
+ return true;
255
+ }
256
+ }
257
+ ]);
258
+
259
+ config.sip.callbackNumber = callbackNumber.trim();
260
+ await saveConfig(config);
261
+
239
262
  registerMcpServerWithOutput({
240
- defaultTo: config.sip?.callbackNumber || firstDevice?.extension || config.sip?.extension,
263
+ defaultTo: config.sip.callbackNumber,
241
264
  httpPort: config.server?.httpPort || 3000,
242
265
  });
243
266
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-phone-local",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "Local/offline fork of NetworkChuck's claude-phone: talk to Claude Code over 3CX/SIP with faster-whisper STT + Piper TTS in one Docker container.",
5
5
  "type": "module",
6
6
  "bin": {