Chat-only commands reset voicemail mailbox and voice portal passcodes via telephony_config_write, with extension lookup and unit tests. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
299 B
JavaScript
13 lines
299 B
JavaScript
// services/voicePin/parseVpPinStore.js
|
|
|
|
const STORE_RE = /^\d{2,4}$/;
|
|
|
|
/**
|
|
* @param {string} raw
|
|
* @returns {{ storeNum: string } | null}
|
|
*/
|
|
export function parseVpPinStore(raw) {
|
|
const storeNum = String(raw || '').trim();
|
|
if (!STORE_RE.test(storeNum)) return null;
|
|
return { storeNum };
|
|
}
|