paging: paging groups, *80 intercom, auto-answer headers
/api/paging-groups CRUD (members as memberIds). The generator renders
sp-page-{id} per 03 §6.11 (desk phones only, auto-answer headers via
sp-sub-autoanswer) plus the number in sp-local-numbers. Added the `s`
option so phones already on a call aren't paged, which also keeps a
pager who is a member from being paged themselves. A group with no
members just hangs up.
*80<ext> intercom checks the target first: digits only and an endpoint
in sp-from-ext, else ss-noservice (the spec's one-liner passed
${EXTEN:3} straight into Page()). Both written back into 03.
Web: Paging page (list, drawer form with member checkboxes). Golden
case paging. e2e m8-t4 with baresip phones that honor the headers
(sip_autoanswer): an ordinary call rings, a page is answered by itself
and muted, the busy pager is skipped, *80 is two-way, *80999 refused.
The check on a real Yealink/Grandstream stays open (09).
Task: M8-T4
This commit is contained in:
1 parent
a6c423de97
commit
e95271e694
47 files changed
+1466
-22
No files matched your search
@@ -12,7 +12,9 @@ const docker = (...a) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* phones: [{ ext, password, answer: 'auto' | 'manual', toneHz = 440 }]
|
||||
* phones: [{ ext, password, answer: 'auto' | 'manual', toneHz = 440, intercom = false }]
|
||||
* intercom: a manual phone still answers by itself when the INVITE asks it to (Call-Info
|
||||
* answer-after, Alert-Info auto-answer), like a Yealink or Grandstream.
|
||||
* Returns { log(ext) → text so far, stop() }.
|
||||
*/
|
||||
export function startPhones({ name, net, ast, phones }) {
|
||||
@@ -37,7 +39,7 @@ export function startPhones({ name, net, ast, phones }) {
|
||||
);
|
||||
writeFileSync(
|
||||
join(d, 'accounts'),
|
||||
`<sip:${p.ext}@${ast};transport=udp>;auth_pass=${p.password};answermode=${p.answer};audio_codecs=PCMU\n`,
|
||||
`<sip:${p.ext}@${ast};transport=udp>;auth_pass=${p.password};answermode=${p.answer}${p.intercom ? ';sip_autoanswer=yes;sip_autoanswer_beep=off' : ''};audio_codecs=PCMU\n`,
|
||||
);
|
||||
});
|
||||
const run = phones.map((p) => `(baresip -f /phones/${p.ext} > /phones/${p.ext}/log 2>&1 &)`);
|
||||
|
||||
Reference in new issue
Block a user