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
+7
-9
@@ -2,8 +2,8 @@
|
||||
// A raw AMI session for the e2e scripts (the m2-live Asterisk publishes AMI on 127.0.0.1:15038).
|
||||
import { Socket } from 'node:net';
|
||||
|
||||
/** One AMI Originate with a caller ID (the CLI can't set one). */
|
||||
export function originate(fields) {
|
||||
/** One AMI action on its own session; rejects on Response: Error. */
|
||||
export function action(fields) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const s = new Socket();
|
||||
let buf = '';
|
||||
@@ -11,19 +11,14 @@ export function originate(fields) {
|
||||
s.on('data', (d) => {
|
||||
buf += d;
|
||||
if (/Response: Error/.test(buf)) reject(new Error(buf));
|
||||
if (/ActionID: o1[\s\S]*\r\n\r\n/.test(buf)) {
|
||||
if (/ActionID: a1[\s\S]*\r\n\r\n/.test(buf)) {
|
||||
s.end();
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
s.on('error', reject);
|
||||
s.connect(15038, '127.0.0.1', () => {
|
||||
const lines = Object.entries({
|
||||
...fields,
|
||||
Action: 'Originate',
|
||||
Async: 'true',
|
||||
ActionID: 'o1',
|
||||
})
|
||||
const lines = Object.entries({ ...fields, ActionID: 'a1' })
|
||||
.map(([k, v]) => `${k}: ${v}`)
|
||||
.join('\r\n');
|
||||
s.write(
|
||||
@@ -32,3 +27,6 @@ export function originate(fields) {
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** One AMI Originate with a caller ID (the CLI can't set one). */
|
||||
export const originate = (fields) => action({ ...fields, Action: 'Originate', Async: 'true' });
|
||||
Reference in new issue
Block a user