parking: parked calls live, on the dashboard and Home, pick up from Home
res_parking was configured in M0 (700, slots 701-720, slot hints); this makes parked calls visible. ParkingTracker loads ParkedCalls and follows ParkedCall/UnParkedCall/ParkedCallTimeOut/ParkedCallGiveUp; everyone gets parked.updated/parked.removed. Who parked comes from ParkerDialString. A blind transfer to 700 parks without running Park() in the dialplan, so the live call's "parked" state now comes from those events by ParkeeLinkedid; the picking-up phone runs ParkedCall() while talking, which no longer counts as parked. Web: "Parked calls" on the Dashboard and on Home, where "Pick up 701" calls the slot like Call back (softphone, or the desk phone first). CDR fixture park-pickup (recorded: 101 parks an inbound call, 103 picks it up); the call counts as answered by 101 with 103 in rang. e2e m8-t2 with real phones: park by blind transfer, hint InUse, both lists, pick up from Home, a second park on 702 (findslot = next) picked up by dialing it from another phone. Specs 01/04/05 note what was verified. Task: M8-T2
This commit is contained in:
1 parent
2d9f8ed99e
commit
863a9d121c
21 files changed
+635
-23
No files matched your search
@@ -5,7 +5,7 @@
|
||||
// 103 Carol auto-answer 104 Dave no phone, no voicemail
|
||||
// Each scenario's Cdr events go to apps/api/test/fixtures/cdr/<name>.json.
|
||||
// Queue 550 has Alice (answers); queue 551 has Bob (never answers) and sends callers who wait
|
||||
// 8 s to his voicemail. Parking arrives with M8-T2.
|
||||
// 8 s to his voicemail. Park: Alice parks a caller on 700 (→ 701), Carol picks it up.
|
||||
// Usage: node --conditions=source apps/api/test/asterisk/cdr-record.ts
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
||||
@@ -444,6 +444,23 @@ async function main() {
|
||||
await sleep(6000);
|
||||
});
|
||||
|
||||
await scenario('park-pickup', async () => {
|
||||
fromMobile('3125551234');
|
||||
await waitFor('101 answers', () => !!pbxChannel('PJSIP/101-'));
|
||||
await sleep(2000);
|
||||
await ami.action({
|
||||
Action: 'BlindTransfer',
|
||||
Channel: pbxChannel('PJSIP/101-')!,
|
||||
Context: 'sp-from-ext',
|
||||
Exten: '700',
|
||||
});
|
||||
await waitFor('parked on 701', () => /701/.test(cli(PBX, 'parking show default')), 20);
|
||||
await sleep(2000);
|
||||
await fromPhone('103', '701', 'Carol');
|
||||
await waitFor('103 picks up', () => !!pbxChannel('PJSIP/103-'), 20);
|
||||
await sleep(4000);
|
||||
});
|
||||
|
||||
mkdirSync(OUT, { recursive: true });
|
||||
for (const [name, evs] of Object.entries(recorded)) {
|
||||
if (!evs.length) throw new Error(`${name}: no Cdr events`);
|
||||
|
||||
Reference in new issue
Block a user