dids: phone numbers, destinations, inbound dialplan, Phone numbers page
DIDs CRUD (any input format, normalized; 409 on duplicates; a number
that is an emergency or default caller ID can't be removed). Shared
destination service: assertDestinationExists, describeDestination
("Ring Dan Doe (101)") and findReferences over every destination
column in 02 §1 plus the unmatched-number setting; deleting an
extension a destination points at is now a 409 naming the places.
Generator: destApp (user, external, hangup for now), sp-from-trunk-*
per enabled trunk, sp-did-exists (left out when empty) and sp-inbound
with caller-name prefix. Golden case voipms-basic. Phone numbers page
with a minimal DestinationPicker (user, outside number, hang up).
trunk-test.ts: the fake provider calls the DID with a 10-digit
Request-URI like voip.ms; baresip 101 answers, caller ID arrives
normalized, 500 packets each way on both legs. scripts/e2e/m3-t2.mjs
checks the UI → Asterisk path. Still to do with real voip.ms: the
mobile-to-DID call and recording which header carries the DID (06 §3).
Task: M3-T2
This commit is contained in:
1 parent
1b7f60b5f2
commit
c117d8bb1d
28 files changed
+1371
-21
No files matched your search
@@ -2,6 +2,9 @@
|
||||
// Typed fetch wrappers (05 §1). Every request sends X-Requested-With (CSRF, 04 §2.2).
|
||||
import type {
|
||||
AuthUser,
|
||||
DidCreate,
|
||||
DidDto,
|
||||
DidUpdate,
|
||||
ExtensionCreate,
|
||||
ExtensionDto,
|
||||
ExtensionUpdate,
|
||||
@@ -67,6 +70,7 @@ export const usersApi = {
|
||||
};
|
||||
|
||||
export const extensionsApi = {
|
||||
list: () => api<ListResponse<ExtensionDto>>('GET', '/api/extensions').then((r) => r.items),
|
||||
get: (id: string) => api<ExtensionDto>('GET', `/api/extensions/${id}`),
|
||||
create: (e: ExtensionCreate) => api<ExtensionDto>('POST', '/api/extensions', e),
|
||||
update: (id: string, e: ExtensionUpdate) =>
|
||||
@@ -86,3 +90,10 @@ export const trunksApi = {
|
||||
remove: (id: string) => api<{ ok: true }>('DELETE', `/api/trunks/${id}`),
|
||||
test: (id: string) => api<TrunkTestResult>('POST', `/api/trunks/${id}/test`),
|
||||
};
|
||||
|
||||
export const didsApi = {
|
||||
list: () => api<ListResponse<DidDto>>('GET', '/api/dids').then((r) => r.items),
|
||||
create: (d: DidCreate) => api<DidDto>('POST', '/api/dids', d),
|
||||
update: (id: string, d: DidUpdate) => api<DidDto>('PATCH', `/api/dids/${id}`, d),
|
||||
remove: (id: string) => api<{ ok: true }>('DELETE', `/api/dids/${id}`),
|
||||
};
|
||||
Reference in new issue
Block a user