resources/telephony.ts
Source: sdks/typescript/packages/sdk/src/resources/telephony.ts. Back to the TypeScript SDK reference index.
This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.
Type alias TelephonyDestinationKind
Destination of a number or a routing rule: extension, ivr, queue, voice_agent, external or conference.
Definition: "extension" \| "ivr" \| "queue" \| "voice_agent" \| "external" \| "conference".
Type alias TelephonyPoolMode
Mode of a PBX pool: shared between tenants or dedicated to one tenant.
Definition: "shared" \| "dedicated".
Interface TelephonyForwarding
Call forwarding of an extension.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
always | string | null | no | Unconditional forwarding target: an extension number or an E.164 number. |
busy | string | null | no | Target when the extension is busy. |
no_answer | string | null | no | Target when the extension does not answer. |
no_answer_seconds | number | no | Ring time before the no answer case, 5 to 120 seconds (default 25). |
Interface TelephonyPermissions
Destinations an extension may call.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
internal | boolean | no | Calls to the other extensions of the tenant (default true). |
national | boolean | no | Calls to national numbers (default true). |
international | boolean | no | Calls to other countries, limited to the allowed country prefixes of the quotas (default false). |
premium | boolean | no | Calls to the premium prefixes of the quotas (default false). |
Interface TelephonyNumberingSettings
Numbering plan and options of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
country_code | string | no | Country code of the tenant, for example 33 (default). |
national_prefix | string | no | National prefix dialled before national numbers (default 0). |
international_prefix | string | no | International prefix (default 00). |
emergency_numbers | string[] | no | Emergency numbers, always allowed, routed on every trunk (default 112). |
timezone | string | null | no | Time zone of the time conditions, for example Europe/Paris. |
wss_url | string | null | no | WSS address of Kamailio for the softphone (default wss://<sip domain>:7443). |
Interface TelephonySettingsIn
Telephony settings of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
sip_domain | string | yes | SIP domain of the tenant, unique on the platform; Kamailio maps it to the tenant. |
enabled | boolean | no | Whether the tenant is compiled into its pool (default true). |
model | TelephonyPoolMode | no | shared (pool shared by several tenants, default) or dedicated. Changed by platform_admin. |
pbx_instance_id | string | null | no | PBX pool serving the tenant. Changed by platform_admin. |
cdr_retention_days | number | no | Retention of the call records, 1 to 3650 days (default 365). |
settings | TelephonyNumberingSettings | no | Numbering plan and options. |
Interface TelephonyQuotasIn
Quotas and fraud limits of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
max_concurrent_calls | number | no | Simultaneous calls of the tenant (Kamailio tenant_limits and dialplan). |
cps | number | no | New calls per second, enforced by Kamailio. |
monthly_minutes | number | null | no | Minutes per month (none: unlimited). |
max_call_duration_seconds | number | no | Maximum duration of a call, 60 to 86400 seconds (default 7200). |
allowed_country_prefixes | string[] | no | International prefixes allowed, for example +32 (none: every country for the extensions with the international permission). |
blocked_premium_prefixes | string[] | no | Premium prefixes, for example +3389: only the extensions with the premium permission reach them. |
recording_retention_days | number | no | Retention of the recordings, 1 to 3650 days (default 90). |
Interface TelephonyRuntimeSettingsIn
Runtime settings of the telephony of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
voicemail_storage | "asterisk" | "platform" | no | asterisk (app_voicemail keeps the messages on the PBX) or platform (recorded and filed in SeaweedFS, listed by the API). |
voicemail_max_seconds | number | no | Longest platform voicemail message, 10 to 600 seconds (default 180). |
fraud_auto_block | boolean | no | Whether the fraud signals block automatically (default true). |
fraud_window_minutes | number | no | Window of the refused destinations, 1 to 1440 minutes (default 10). |
fraud_extension_hourly_calls | number | no | Outbound calls of one extension in one hour above which it is flagged and blocked (default 60). |
fraud_refused_attempts | number | no | Refused destinations of one extension that block it, 1 to 1000 (default 5). |
fraud_tenant_block_factor | number | no | The tenant is blocked when its active calls reach this multiple of its quota; 0 disables (default 2). |
Interface TelephonyPoolNode
An Asterisk node of a pool.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the node. |
host | string | yes | Administration address of the node (AMI). |
ami_port | number | no | AMI port (default 5038, 5039 with TLS). |
ari_url | string | null | no | Base URL of ARI on the node, for example https://10.0.0.20:8089 (default http://<host>:8088); the path /ari is added. |
sip_address | string | null | no | SIP address of the node, allowed by the LiveKit SIP trunks. |
manager_instance | string | null | no | Name of the service instance in the Navin Manager. |
Interface TelephonyKamailioEndpoint
A Kamailio JSONRPC endpoint.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the Kamailio instance. |
url | string | yes | JSONRPC address, for example http://10.0.0.10:5071/jsonrpc. |
Interface TelephonyLiveKitBinding
LiveKit binding of a pool.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
url | string | null | no | HTTP address of LiveKit for the Twirp SIP API (none: the LiveKit objects are not reconciled). |
sip_host | string | null | no | SIP address of LiveKit SIP that Asterisk dials, for example 10.0.0.30:5090. |
Interface TelephonyPoolIn
A PBX pool installed by the Navin Manager.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the pool, unique on the platform. |
mode | TelephonyPoolMode | yes | shared (several tenants) or dedicated (one tenant). |
tenant_id | string | null | no | Tenant of a dedicated pool (none for a shared pool). |
enabled | boolean | no | Whether the pool is reconciled (default true). |
nodes | TelephonyPoolNode[] | no | Asterisk nodes of the pool (up to 32): each one gets every publication. |
manager_cluster | string | null | no | Cluster of the pool in the Navin Manager. |
manager_service | string | no | Service of the Navin Manager catalogue (default asterisk). |
ami_username | string | null | no | AMI user of the pool. |
ami_secret_ref | string | null | no | Reference of the AMI secret: openbao://<path> or env://EAI_CRED_<NAME>. |
ami_events_username | string | null | no | Read only AMI user of the event connection (classes call, cdr, cel, agent, reporting, user); none: the configuration user. |
ami_events_secret_ref | string | null | no | Reference of the secret of the read only AMI events user: openbao://<path> or env://EAI_CRED_<NAME>. |
ami_tls | boolean | no | Whether AMI is reached over TLS. |
ari_username | string | null | no | ARI user of the pool. |
ari_secret_ref | string | null | no | Reference of the ARI secret. |
tls_verify | boolean | no | Whether the TLS certificates of the engines are checked (default true). |
kamailio_addresses | string[] | no | Addresses of the Kamailio instances: the only sources the extensions accept. |
kamailio_endpoints | TelephonyKamailioEndpoint[] | no | Kamailio JSONRPC endpoints of the pool (up to 8). |
kamailio_secret_ref | string | null | no | Reference of the JSONRPC credential user:password (none: no authentication). |
ephemeral_secret_ref | string | null | no | Reference of the secret shared with Kamailio auth_ephemeral. |
dispatcher_set | number | no | Dispatcher set of the pool (1 for the shared pool, 100 and up for dedicated pools). |
livekit_sip_set | number | no | Dispatcher set of LiveKit SIP (default 2). |
livekit_binding | TelephonyLiveKitBinding | no | LiveKit binding of the pool. |
Interface TelephonyPublishIn
A publication request.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
reason | string | null | no | Reason, kept with the version and in the audit. |
Interface TelephonyRollbackIn
A rollback request.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
version | number | yes | Number of the version to publish again. |
reason | string | null | no | Reason, kept with the version and in the audit. |
Interface TelephonyDrainIn
A dispatcher destination and its state.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
address | string | yes | SIP URI of the destination, for example sip:10.0.0.20:5070. |
state | "drain" | "active" | yes | drain (no new call) or active. |
group | number | null | no | Dispatcher set (default: the set of the pool). |
Interface TelephonyTrunkIn
A SIP trunk of the tenant toward an operator.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines. |
host | string | yes | Host name or address of the operator SIP server. |
provider | string | null | no | Name of the operator, for display. |
port | number | no | SIP port of the operator (default 5060). |
transport | "udp" | "tcp" | "tls" | no | SIP transport: udp (default), tcp or tls. |
registration | boolean | no | Whether Asterisk registers to the operator (needs auth_username). |
auth_username | string | null | no | User name of the digest authentication toward the operator. |
password | string | null | no | Password of the trunk, 8 to 128 characters. Write only: kept in the vault, never returned (has_password). |
codecs | string[] | no | Codecs in preference order among ulaw, alaw, g722, g729, opus and gsm (default ulaw, alaw). |
outbound_caller_id | string | null | no | E.164 number presented on the calls through this trunk. |
allowed_numbers | string[] | no | E.164 numbers the trunk may present (up to 200). |
failover_order | number | no | Order of the trunk when a rule names no trunk (lower first, default 100). |
enabled | boolean | no | Whether the object is compiled and published (default true). |
Interface TelephonyNumberIn
A public number of the tenant and its destination.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
e164 | string | yes | Public number in E.164 format, unique on the platform. |
destination_kind | TelephonyDestinationKind | yes | Kind of destination: extension, ivr, queue, voice_agent, conference or external. |
destination_id | string | null | no | Identifier (UUID) of the destination object in the tenant (every kind except external). |
destination_value | string | null | no | E.164 number of an external destination. |
branch | "pbx" | "ai" | no | pbx (Kamailio to Asterisk, default) or ai (Kamailio to LiveKit SIP directly, voice agent only). |
label | string | null | no | Label for display. |
trunk_id | string | null | no | Trunk of the tenant the number comes from. |
enabled | boolean | no | Whether the object is compiled and published (default true). |
Interface TelephonyExtensionIn
An extension of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
number | string | yes | Extension number, 2 to 8 digits, unique in the tenant. |
display_name | string | yes | Name shown as caller id. |
kind | "sip" | "webrtc" | no | sip (phone with a password) or webrtc (softphone of the portal, ephemeral credentials). |
password | string | null | no | SIP password, 12 to 128 characters, required for sip. Write only: kept in the vault, never returned (has_password). |
enabled | boolean | no | Whether the object is compiled and published (default true). |
max_concurrent_calls | number | no | Simultaneous calls of the extension, 1 to 100 (default 2), enforced by the dialplan. |
recording_policy | "off" | "always" | "inbound" | "outbound" | no | Recording: off (default), always, inbound or outbound (MixMonitor into the folder of the tenant). |
permissions | TelephonyPermissions | no | Destinations the extension may call. |
forwarding | TelephonyForwarding | no | Call forwarding rules. |
voicemail_enabled | boolean | no | Whether the extension has a voicemail box (needs a PIN). |
voicemail_pin | string | null | no | Voicemail PIN, 4 to 8 digits. Write only (has_voicemail_pin). |
voicemail_email | string | null | no | Address told of new messages. |
Interface TelephonyTimeWindow
A time range in Asterisk syntax.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
start | string | yes | Start time, HH:MM. |
end | string | yes | End time, HH:MM, after the start. |
days | string | no | Days: * or mon to sun, or a range such as mon-fri (default *). |
mdays | string | no | Days of the month: * or a range such as 1-15 (default *). |
months | string | no | Months: * or jan to dec, or a range (default *). |
Interface TelephonyRuleIn
A routing rule of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines. |
direction | "inbound" | "outbound" | yes | inbound (called DID) or outbound (dialled E.164 number). |
pattern | string | yes | Asterisk pattern on the E.164 number, for example _+33X.. |
priority | number | no | Order of the rules, lower first (default 100). |
destination_kind | TelephonyDestinationKind | null | no | Kind of destination: extension, ivr, queue, voice_agent, conference or external. |
destination_id | string | null | no | Identifier (UUID) of the destination object in the tenant (every kind except external). |
destination_value | string | null | no | E.164 number of an external destination. |
trunk_ids | string[] | no | Outbound: trunks of the tenant tried in this order on failure (none: every trunk by failover_order). |
strip_digits | number | no | Digits removed from the start of the number before dialling (0 to 10). |
prepend | string | no | Digits added before the number when dialling. |
time_conditions | TelephonyTimeWindow[] | no | Time ranges when the rule applies (none: always). |
enabled | boolean | no | Whether the object is compiled and published (default true). |
Interface TelephonyIvrFlowIn
An IVR flow of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines. |
description | string | null | no | Description of the flow. |
Interface TelephonyIvrVersionIn
A draft version of an IVR flow.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
graph | Doc | yes | Graph of the flow: start and nodes; menu nodes carry prompt, options (digit, next), timeout, invalid, timeout_seconds and max_retries. |
Interface TelephonyQueueIn
A call queue of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines. |
display_name | string | null | no | Name for display. |
number | string | null | no | Internal number that reaches the queue (optional). |
strategy | "ringall" | "leastrecent" | "fewestcalls" | "random" | "rrmemory" | "linear" | "wrandom" | no | Ring strategy: ringall, leastrecent, fewestcalls, random, rrmemory, linear or wrandom. |
timeout_seconds | number | no | Ring time per member, 1 to 600 seconds (default 15). |
max_wait_seconds | number | no | Maximum wait of a caller, 0 to 86400 seconds (default 300). |
wrapup_seconds | number | no | Pause of a member after a call, 0 to 3600 seconds. |
sla_seconds | number | no | Service level threshold, 1 to 3600 seconds (default 20). |
music_on_hold | string | no | Music on hold class (default default). |
recording | boolean | no | Whether the calls of the queue are recorded. |
Interface TelephonyMemberIn
A member of a queue.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
extension_id | string | null | no | Extension of the tenant (or agent_id, not both). |
agent_id | string | null | no | Human agent of the tenant, reached on its extension. |
penalty | number | no | Penalty 0 to 100, lower rings first. |
Interface TelephonyMemberPatch
New penalty of a queue member.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
penalty | number | yes | New penalty, 0 to 100. |
Interface TelephonyAgentIn
A human agent of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Identifier of the user in the platform, unique in the tenant. |
display_name | string | yes | Name of the agent. |
extension_id | string | null | no | Extension of the tenant the agent answers on. |
skills | string[] | no | Skills of the agent (up to 50). |
enabled | boolean | no | Whether the object is compiled and published (default true). |
Interface TelephonyVoiceAgentIn
An AI voice agent of the tenant, run by the LiveKit Agents workers navin-voice.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines. |
llm_model_alias | string | yes | Alias of the language model in the LLM gateway. |
display_name | string | null | no | Name for display. |
language | string | no | Language, for example fr-FR (default). |
instructions | string | no | Instructions of the agent (system prompt), 20000 characters at most. |
greeting | string | null | no | First sentence said to the caller. |
stt_model | string | null | no | Speech to text model. |
tts_model | string | null | no | Text to speech model. |
tts_voice | string | null | no | Voice of the text to speech model. |
allowed_tools | string[] | no | Tools the agent may call (up to 100). |
transfer_target | string | null | no | Transfer to a human: extension:<number>, queue:<name> or number:<E.164>. |
fallback_queue_id | string | null | no | Queue of the tenant that takes the call when the agent fails. |
max_duration_seconds | number | no | Maximum duration of a call, 30 to 14400 seconds (default 900). |
enabled | boolean | no | Whether the object is compiled and published (default true). |
Interface TelephonyConferenceIn
A conference room of the tenant.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
number | string | yes | Number of the room, 2 to 8 digits, unique in the tenant. |
name | string | yes | Name of the room. |
pin | string | null | no | PIN, 4 to 8 digits. Write only (has_pin). |
max_members | number | no | Maximum participants, 2 to 500 (default 10). |
recording | boolean | no | Whether the conference is recorded. |
Interface TelephonyWebrtcIn
A request of WebRTC credentials.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
extension_id | string | yes | WebRTC extension of the tenant. |
ttl_seconds | number | no | Lifetime of the credentials, 60 to 3600 seconds (default 3600). |
Interface TelephonyTransferIn
Transfer of an active call.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
target | string | yes | Extension number of the tenant (2 to 8 digits) or E.164 number. |
uniqueid | string | null | no | Channel to move (default: the first channel of the call). |
Interface TelephonyLegalHoldIn
Legal hold of a recording.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
legal_hold | boolean | yes | true: hold the recording; false: release it. |
reason | string | yes | Reason kept in the audit trail (300 characters at most). |
Interface TelephonyDeleteIn
Reason of a deletion, kept in the audit trail.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
reason | string | no | Reason (default user request). |
Interface TelephonyBlockIn
A manual block of the tenant or of one extension.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
scope | "tenant" | "extension" | yes | tenant (every call of the tenant) or extension. |
reason | string | yes | Reason kept with the block and in the audit trail. |
extension | string | null | no | Extension number, required for the scope extension only. |
Interface TelephonyLiftIn
Why a block is lifted.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
reason | string | yes | Reason kept with the block and in the audit trail. |
Interface TelephonyInventorySyncIn
The Asterisk instance of the Navin Manager whose PBX pool is created or refreshed.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
cluster_id | string | yes | Identifier of the Manager cluster. |
service | string | yes | Name of the Asterisk instance in the Manager (for example asterisk). |
mode | TelephonyPoolMode | no | shared (default) or dedicated for a new pool. |
name | string | null | no | Name of a new pool (default: the name of the instance); ignored on a refresh. |
tenant_id | string | null | no | Tenant of a new dedicated pool. |
kamailio_service | string | null | no | Kamailio instance to use (default: those bound to this Asterisk). |
livekit_service | string | null | no | LiveKit instance to use (default: the one LiveKit SIP is bound to, else the only one). |
livekit_sip_service | string | null | no | LiveKit SIP instance to use (default: the one Kamailio is bound to, else the only one). |
Interface TelephonyCallQuery
Filters of GET /v1/telephony/calls with limit and cursor (keyset pagination, newest first).
ListParams
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
direction | "inbound" | "outbound" | "internal" | "unknown" | no | inbound (called DID) or outbound (dialled E.164 number). |
branch | "pbx" | "ai" | no | pbx (Kamailio to Asterisk, default) or ai (Kamailio to LiveKit SIP directly, voice agent only). |
disposition | "ANSWERED" | "BUSY" | "CONGESTION" | "FAILED" | "NO ANSWER" | no | Outcome of the call: ANSWERED, BUSY, CONGESTION, FAILED or NO ANSWER. |
extension | string | no | Extension number, required for the scope extension only. |
number | string | no | Calling or called number of the call. |
queue | string | no | Name of the call queue the call went through. |
answered | boolean | no | Only the answered calls (true) or the unanswered ones (false). |
since | string | no | Only the calls started from this time on, ISO 8601. |
until | string | no | Only the calls started before this time, ISO 8601. |
Interface TelephonyRecordingQuery
Filters of GET /v1/telephony/recordings with limit and cursor (newest first).
ListParams
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
call_id | string | no | Only the recordings of this call. |
category | "call-recordings" | "conference-recordings" | "ai-voice-recordings" | "voicemail" | "ivr-prompts" | "audio-exports" | no | Free category, for example data_leak or prompt_injection. Default other. |
status | "pending" | "stored" | "failed" | "deleted" | no | State of the stored object: pending, stored, failed or deleted. |
legal_hold | boolean | no | Only the recordings under legal hold (true) or free of it (false). |
Interface TelephonyPresignedUrl
Presigned GET of 300 seconds returned by the download routes of a recording, a voicemail message or an IVR prompt (audited).
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
url | string | yes | Presigned URL to read the audio with a plain GET, without credentials. |
method | "GET" | yes | Name of the method, for example basic, token or none. |
expires_seconds | number | yes | Lifetime of the URL in seconds, default 900, at most EAI_STORAGE_PRESIGN_MAX_SECONDS (3600 by default) and never more than 604800. |
expires_at | string | yes | Date and time (ISO 8601, UTC) after which the item is no longer valid. |
content_type | string | null | no | Content type passed to the backend when the URL is signed (the type the upload is expected to send); 200 characters at most. |
size_bytes | number | null | no | Size of the audio in bytes, when known. |
sha256 | string | null | no | SHA-256 of the audio, hexadecimal, when known. |
Interface TelephonyWebrtcCredentials
Ephemeral SIP credentials of a WebRTC extension for the Kamailio auth_ephemeral module (one hour at most).
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
username | string | yes | Login of the account, 1 to 128 characters, compared without case. |
password | string | yes | Password. Write only: never returned by the API and never written to the logs. |
expires_at | string | yes | Date and time (ISO 8601, UTC) after which the item is no longer valid. |
ttl_seconds | number | yes | Lifetime in seconds. Once it has elapsed, the item expires and is no longer accepted. |
sip_uri | string | yes | SIP address the softphone registers and calls as, sip:<endpoint>@<domain>. |
ws_url | string | yes | Secure WebSocket address of the SIP proxy, wss://.... |
realm | string | yes | SIP authentication realm, the SIP domain of the tenant. |
endpoint | string | yes | Endpoint name of the extension on the PBX. |
number | string | yes | Internal number of the extension. |
Interface TelephonyPublication
202 answer of a publication or a rollback: the new configuration version and its long operation.
Fields:
| Name | Type | Required | Description |
|---|---|---|---|
version_id | string | yes | Version of the object to delete on a versioned bucket, 1 to 1024 characters. Omit it to delete the current version. |
version | number | yes | Number of the new configuration version of the pool. |
status | string | yes | State of the version, publishing until the delivery ends. |
sha256 | string | yes | SHA-256 of the compiled configuration. |
pool_id | string | yes | Identifier of the PBX pool. |
rollback_of | string | null | no | Version published again by a rollback, null for a publication. |
operation_id | string | yes | Long operation of the delivery, to follow with operations.get. |
Type alias TelephonyAudio
Bytes of an IVR prompt: a Blob, an ArrayBuffer or a Uint8Array.
Definition: Blob \| ArrayBuffer \| Uint8Array.
Class TelephonyResource
Telephony of the tenant: settings, PBX pools, trunks, numbers, extensions, routing, IVR, queues, agents, calls, recordings, voicemail, fraud and infrastructure.
Resource
TelephonyResource.acknowledgeFraudAlert
acknowledgeFraudAlert(alertId: string, opts?: CallOptions)
Acknowledge a fraud alert. Marks the alert acknowledged and answers it. Needs tenant_admin or platform_admin. Audited under telephony.fraud.acknowledge.
Route: /v1/telephony/fraud-alerts/{alert_id}/acknowledge (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
alertId | string | yes | Identifier (UUID) of the fraud alert. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.activeCalls
activeCalls(query?: { extension?: string; queue?: string }, opts?: CallOptions)
List the active calls. Calls in progress of the tenant: {items, count}, each item linkedid, call_id, navin_call_id, branch, state (ringing, queued, answered), direction, from, to, extension, queue, started_at, answered_at, duration_seconds, node and channels (uniqueid, channel, state, node). Kept up to date by the CEL events (CHAN_START, ANSWER, CHAN_END, LINKEDID_END) and the LiveKit webhooks. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/active-calls (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | { extension?: string; queue?: string } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.addQueueMember
addQueueMember(queueId: string, body: TelephonyMemberIn, opts?: CallOptions)
Add a member to a queue. Adds exactly one extension or human agent of the tenant (422 telephony_member_target or telephony_reference_invalid). Idempotency-Key honoured. Needs tenant_admin or platform_admin; audited under telephony.queue_member.create.
Route: /v1/telephony/queues/{queue_id}/members (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
queueId | string | yes | Identifier (UUID) of the queue. | |
body | TelephonyMemberIn | yes | The member and its penalty. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.agent
agent(agentId: string, opts?: CallOptions)
Read a human agent. One human agent of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/agents/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
agentId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.agents
agents(query?: ListParams & { enabled?: boolean }, opts?: CallOptions): Promise<Page<Doc>>
List the human agents. The human agents of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/agents (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { enabled?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the human agents".
Raises: the typed errors of the transport (Errors).
TelephonyResource.blocks
blocks(query?: { active?: boolean }, opts?: CallOptions)
List the blocks. Blocks of the tenant and of its extensions, newest first: id, scope, extension, reason, origin (manual, automatic), alert_id, active, kamailio_key (key of the Kamailio hash table tenant_blocks), kamailio (push report per JSONRPC endpoint), created_by, created_at, lifted_by, lifted_at, lift_reason. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/blocks (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | { active?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.calls
calls(query?: TelephonyCallQuery, opts?: CallOptions): Promise<Page<Doc>>
List the calls. Call history of the tenant, newest first. Each item: id, navin_call_id, linkedid, branch (pbx or ai), direction (inbound, outbound, internal, unknown), from, from_name, to, did, extension, queue, voice_agent_id, started_at, answered_at, ended_at, duration_seconds, billsec, wait_seconds, disposition, hangup_cause, hangup_cause_text, recording_id, legs, sip_call_id, livekit_room, pbx_instance_id, node. Built from the Cdr and CEL events of AMI and the LiveKit webhooks. Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/calls (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | TelephonyCallQuery | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the calls".
Raises: the typed errors of the transport (Errors).
TelephonyResource.conference
conference(conferenceId: string, opts?: CallOptions)
Read a conference room. One conference room of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/conferences/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
conferenceId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.conferenceSession
conferenceSession(sessionId: string, opts?: CallOptions)
Read a conference session. One conference session with its participants (same fields as the list). Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/conference-sessions/{session_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
sessionId | string | yes | Identifier (UUID) of the conference session. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.conferenceSessions
conferenceSessions(query?: ListParams & { conference_id?: string; active?: boolean }, opts?: CallOptions): Promise<Page<Doc>>
List the conference sessions. Sessions of the conference rooms of the tenant, from the Confbridge events of AMI, newest first: id, conference_id, number, started_at, ended_at, active, participant_count, max_participants, total_joins, participants (uniqueid, channel, caller, name, joined_at), recorded, recording_id. Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/conference-sessions (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { conference_id?: string; active?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the conference sessions".
Raises: the typed errors of the transport (Errors).
TelephonyResource.conferences
conferences(query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the conference rooms. The conference rooms of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/conferences (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the conference rooms".
Raises: the typed errors of the transport (Errors).
TelephonyResource.configVersion
configVersion(versionId: string, opts?: CallOptions)
Read a configuration version. One version with its files (secrets masked), Kamailio tables, LiveKit objects, delivery report per node (files read back and compared, reload outputs, restore), status and diff to the previous version. 404 when the caller may not read its pool.
Route: /v1/telephony/config-versions/{version_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
versionId | string | yes | Identifier (UUID) of the configuration version. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createAgent
createAgent(body: TelephonyAgentIn, opts?: CallOptions)
Create a human agent. Creates the human agent in the caller's tenant and returns it (201). The extension must belong to the tenant. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.agent.create.
Route: /v1/telephony/agents (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyAgentIn | yes | The human agent. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createBlock
createBlock(body: TelephonyBlockIn, opts?: CallOptions)
Block the tenant or an extension. Writes the key {tid} or {tid}-{extension} into the Kamailio hash table tenant_blocks of every JSONRPC endpoint of the pool (htable.sets) and answers the block (201); an existing active block of the same scope is answered as is. 422 telephony_block_scope when the scope and the extension do not match. The worker job telephony_blocks pushes the active blocks again after a Kamailio restart. Needs tenant_admin or platform_admin. Audited under telephony.block.create, published as telephony.block.created.
Route: /v1/telephony/blocks (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyBlockIn | yes | The scope, the extension and the reason. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createConference
createConference(body: TelephonyConferenceIn, opts?: CallOptions)
Create a conference room. Creates the conference room in the caller's tenant and returns it (201). The PIN is write only: the answer carries has_pin. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.conference.create.
Route: /v1/telephony/conferences (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyConferenceIn | yes | The conference room. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createExtension
createExtension(body: TelephonyExtensionIn, opts?: CallOptions)
Create an extension. Creates the extension in the caller's tenant and returns it (201). The SIP password and the voicemail PIN are write only: the answer carries has_password and has_voicemail_pin. The number is unique in the tenant across extensions, queues and conferences (409 telephony_number_in_use) and may not start with a national or international prefix nor be an emergency number (422 telephony_number_reserved). With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.extension.create.
Route: /v1/telephony/extensions (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyExtensionIn | yes | The extension. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createIvrFlow
createIvrFlow(body: TelephonyIvrFlowIn, opts?: CallOptions)
Create an IVR flow. Creates the IVR flow in the caller's tenant and returns it (201). The graph lives in the versions of the flow. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.ivr_flow.create.
Route: /v1/telephony/ivr-flows (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyIvrFlowIn | yes | The IVR flow. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createIvrFlowVersion
createIvrFlowVersion(flowId: string, body: TelephonyIvrVersionIn, opts?: CallOptions)
Create a version of an IVR flow. Adds a draft version (number + 1). The graph is validated: one start node, every edge names an existing node, every node reachable, unique DTMF digits, every menu with prompt, timeout and invalid exits, a wait of 1 to 30 seconds and 1 to 5 retries; the extensions, queues and voice agents it names exist in the tenant. The prompt of a play or menu node is a sound name of Asterisk or navin:<name>, an uploaded prompt of the tenant (POST /v1/telephony/ivr-prompts) the dialplan plays from its signed URL. Problems answer 422 with every one in details.errors. Needs tenant_admin or platform_admin; audited under telephony.ivr_flow.version.create.
Route: /v1/telephony/ivr-flows/{flow_id}/versions (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
flowId | string | yes | Identifier (UUID) of the IVR flow. | |
body | TelephonyIvrVersionIn | yes | The graph: start (node id) and nodes (id to node with type start, play, menu, time_condition, transfer, voicemail, queue, voice_agent or hangup). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createNumber
createNumber(body: TelephonyNumberIn, opts?: CallOptions)
Create a phone number. Creates the phone number in the caller's tenant and returns it (201). The E.164 number is unique on the platform (409 telephony_number_taken); the destination must be an object of the tenant (422 telephony_reference_invalid); branch ai needs a voice agent. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.number.create.
Route: /v1/telephony/numbers (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyNumberIn | yes | The phone number. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createPool
createPool(body: TelephonyPoolIn, opts?: CallOptions)
Declare a PBX pool. Declares an Asterisk pool installed by the Navin Manager: nodes and their AMI port, references of the AMI, ARI, JSONRPC and auth_ephemeral secrets (openbao:// or env://EAI_CRED_*, never a value), Kamailio endpoints and addresses, dispatcher sets and LiveKit binding. A shared pool has no tenant, a dedicated pool one (422 telephony_pool_mode). Needs platform_admin; audited under telephony.pbx_pool.create.
Route: /v1/telephony/pbx-pools (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyPoolIn | yes | The pool. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createQueue
createQueue(body: TelephonyQueueIn, opts?: CallOptions)
Create a call queue. Creates the call queue in the caller's tenant and returns it (201). Its optional number follows the extension number rules. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.queue.create.
Route: /v1/telephony/queues (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyQueueIn | yes | The call queue. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createRoutingRule
createRoutingRule(body: TelephonyRuleIn, opts?: CallOptions)
Create a routing rule. Creates the routing rule in the caller's tenant and returns it (201). Outbound rules list the trunks of the tenant in failover order; inbound rules need a destination of the tenant. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.routing_rule.create.
Route: /v1/telephony/routing-rules (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyRuleIn | yes | The routing rule. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createTrunk
createTrunk(body: TelephonyTrunkIn, opts?: CallOptions)
Create a SIP trunk. Creates the SIP trunk in the caller's tenant and returns it (201). The password is write only: the answer carries has_password. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.trunk.create.
Route: /v1/telephony/trunks (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyTrunkIn | yes | The SIP trunk. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.createVoiceAgent
createVoiceAgent(body: TelephonyVoiceAgentIn, opts?: CallOptions)
Create an AI voice agent. Creates the AI voice agent in the caller's tenant and returns it (201). The fallback queue must belong to the tenant. With an Idempotency-Key, a retry with the same body returns the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Validation problems answer 422 with every problem in details.errors (code, path, message_en, message_fr). Needs tenant_admin or platform_admin; audited under telephony.voice_agent.create.
Route: /v1/telephony/voice-agents (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyVoiceAgentIn | yes | The AI voice agent. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteAgent
deleteAgent(agentId: string, opts?: CallOptions)
Delete a human agent. Deletes the human agent (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.agent.delete.
Route: /v1/telephony/agents/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
agentId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteConference
deleteConference(conferenceId: string, opts?: CallOptions)
Delete a conference room. Deletes the conference room (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.conference.delete.
Route: /v1/telephony/conferences/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
conferenceId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteExtension
deleteExtension(extensionId: string, opts?: CallOptions)
Delete an extension. Deletes the extension (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.extension.delete.
Route: /v1/telephony/extensions/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
extensionId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteIvrFlow
deleteIvrFlow(flowId: string, opts?: CallOptions)
Delete an IVR flow. Deletes the IVR flow (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.ivr_flow.delete.
Route: /v1/telephony/ivr-flows/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
flowId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteIvrPrompt
deleteIvrPrompt(promptId: string, opts?: CallOptions)
Delete an IVR prompt. Deletes the prompt and its audio (204); its playback URL answers 404 from then on. 409 telephony_prompt_in_use (with details.ivr_flows) while a draft or published IVR version plays it. Needs tenant_admin or platform_admin. Audited under telephony.ivr_prompt.delete.
Route: /v1/telephony/ivr-prompts/{prompt_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
promptId | string | yes | Identifier (UUID) of the IVR prompt. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteNumber
deleteNumber(numberId: string, opts?: CallOptions)
Delete a phone number. Deletes the phone number (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.number.delete.
Route: /v1/telephony/numbers/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
numberId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deletePool
deletePool(poolId: string, opts?: CallOptions)
Delete a PBX pool. Deletes a pool no tenant uses (409 telephony_pool_in_use otherwise) with its versions. Needs platform_admin; audited under telephony.pbx_pool.delete.
Route: /v1/telephony/pbx-pools/{pool_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteQueue
deleteQueue(queueId: string, opts?: CallOptions)
Delete a call queue. Deletes the call queue (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.queue.delete.
Route: /v1/telephony/queues/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
queueId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteRecording
deleteRecording(recordingId: string, body?: TelephonyDeleteIn, opts?: CallOptions)
Delete a recording. Deletes the object in SeaweedFS and marks the index row deleted (a voicemail message on it is deleted too). 409 telephony_legal_hold under legal hold. Needs tenant_admin or platform_admin. Audited under telephony.recording.delete with the reason.
Route: /v1/telephony/recordings/{recording_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
recordingId | string | yes | Identifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404). | |
body | TelephonyDeleteIn | no | Optional reason kept in the audit trail. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteRoutingRule
deleteRoutingRule(ruleId: string, opts?: CallOptions)
Delete a routing rule. Deletes the routing rule (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.routing_rule.delete.
Route: /v1/telephony/routing-rules/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ruleId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteTrunk
deleteTrunk(trunkId: string, opts?: CallOptions)
Delete a SIP trunk. Deletes the SIP trunk (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.trunk.delete.
Route: /v1/telephony/trunks/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
trunkId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteVoiceAgent
deleteVoiceAgent(voiceAgentId: string, opts?: CallOptions)
Delete an AI voice agent. Deletes the AI voice agent (204); the engines lose it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.voice_agent.delete.
Route: /v1/telephony/voice-agents/{item_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
voiceAgentId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.deleteVoicemail
deleteVoicemail(messageId: string, opts?: CallOptions)
Delete a voicemail message. Deletes the message and its audio (409 telephony_legal_hold when the audio is held) and answers it with status deleted. Allowed to the readers and to the agent of the mailbox. Audited under telephony.voicemail.delete.
Route: /v1/telephony/voicemail/{message_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
messageId | string | yes | Identifier (UUID) of the voicemail message. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.downloadIvrPrompt
downloadIvrPrompt(promptId: string, opts?: CallOptions): Promise<TelephonyPresignedUrl>
Get a download link of an IVR prompt. Answers {url, method: GET, expires_seconds: 300, expires_at, content_type, size_bytes, sha256}: a SeaweedFS presigned URL valid 300 seconds; no storage credential is returned. 409 telephony_recording_unavailable when the object is not stored, 503 telephony_storage_missing when the platform profile is missing, 409 storage_capability_missing when presign was not verified. Needs tenant_admin, support_engineer, auditor or platform_admin. Audited under telephony.ivr_prompt.download.
Route: /v1/telephony/ivr-prompts/{prompt_id}/download (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
promptId | string | yes | Identifier (UUID) of the IVR prompt. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<TelephonyPresignedUrl>. A TelephonyPresignedUrl: Presigned GET of 300 seconds returned by the download routes (audited).
Raises: the typed errors of the transport (Errors).
TelephonyResource.downloadRecording
downloadRecording(recordingId: string, opts?: CallOptions): Promise<TelephonyPresignedUrl>
Get a download link. Answers {url, method: GET, expires_seconds: 300, expires_at, content_type, size_bytes, sha256}: a SeaweedFS presigned URL valid 300 seconds; no storage credential is returned. 409 telephony_recording_unavailable when the object is not stored, 503 telephony_storage_missing when the platform profile is missing, 409 storage_capability_missing when presign was not verified. Needs tenant_admin, support_engineer, auditor or platform_admin. Audited under telephony.recording.download with the SHA-256 of the URL.
Route: /v1/telephony/recordings/{recording_id}/download (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
recordingId | string | yes | Identifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<TelephonyPresignedUrl>. A TelephonyPresignedUrl: Presigned GET of 300 seconds returned by the download routes (audited).
Raises: the typed errors of the transport (Errors).
TelephonyResource.drainDestination
drainDestination(poolId: string, body: TelephonyDrainIn, opts?: CallOptions)
Drain or restore a dispatcher destination. Sets the state of a destination on every Kamailio of the pool (dispatcher.set_state: drain inactive, active back in service) and returns the dispatcher.list of each. Needs platform_admin; audited under telephony.pbx_pool.drain or telephony.pbx_pool.active.
Route: /v1/telephony/pbx-pools/{pool_id}/drain (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
body | TelephonyDrainIn | yes | The destination and its new state. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.eventStreams
eventStreams(opts?: CallOptions)
List the AMI event connections. State of the AMI event connection of every node (worker job telephony_events): pool_id, node, connected, connected_at, events, reconnects, last_error, updated_at. Needs platform_admin.
Route: /v1/telephony/event-streams (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.extension
extension(extensionId: string, opts?: CallOptions)
Read an extension. One extension of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/extensions/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
extensionId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.extensions
extensions(query?: ListParams & { enabled?: boolean }, opts?: CallOptions): Promise<Page<Doc>>
List the extensions. The extensions of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/extensions (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { enabled?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the extensions".
Raises: the typed errors of the transport (Errors).
TelephonyResource.fraudAlerts
fraudAlerts(query?: ListParams & { status?: "open" | "acknowledged"; kind?: "cps" | "concurrency" | "extension_volume" | "destination_refused" }, opts?: CallOptions): Promise<Page<Doc>>
List the fraud alerts. Fraud signals of the tenant, newest first: id, kind (cps, concurrency, destination_refused, extension_volume), severity, extension, destination, linkedid, details, status, block_id, created_at, acknowledged_at, acknowledged_by. Each alert is also published as telephony.fraud.alert. Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/fraud-alerts (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { status?: "open" | "acknowledged"; kind?: "cps" | "concurrency" | "extension_volume" | "destination_refused" } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the fraud alerts".
Raises: the typed errors of the transport (Errors).
TelephonyResource.getCall
getCall(callId: string, opts?: CallOptions)
Read a call. One call with legs (one per Asterisk channel, from the Cdr events), events (CEL, AMI, LiveKit and voice worker events in time order: source, type, occurred_at, uniqueid, channel, node, data) and recordings (same fields as GET /v1/telephony/recordings). Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/calls/{call_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
callId | string | yes | Identifier (UUID) of the call record, in the caller's tenant (another tenant's call answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.hangupCall
hangupCall(linkedId: string, opts?: CallOptions)
Hang up an active call. Hangs up every channel of the call through ARI (DELETE /ari/channels/{uniqueid} on the node of each channel), or removes the SIP participant through the LiveKit RoomService for the AI branch. Answers {linkedid, results} with one status (ok, gone, failed) per channel; 502 telephony_control_failed when every channel failed. Needs tenant_admin or platform_admin. Audited under telephony.call.hangup.
Route: /v1/telephony/active-calls/{linkedid}/hangup (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
linkedId | string | yes | Asterisk linkedid of the active call (linkedid of GET /v1/telephony/active-calls). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.infrastructure
infrastructure(query?: { cluster_id?: string }, opts?: CallOptions)
List the telephony infrastructure of the Navin Manager. Reads, through the Platform Manager bridge (Manager API token, X-NM-On-Behalf-Of, the permissions of the Manager apply), the clusters and their asterisk, kamailio, livekit and livekit-sip instances. Answers {clusters, binding, problems}: each cluster {id, name, mode, services}, each service {name, catalog_service, display_name, mode, method, version, managed, state, health, admin_state, tls_enabled, config_source (manager or defaults), config_version, bound, endpoints [{name, scheme, port, path}], nodes [{name, instance_id, host_id, hostname, fqdn, ip, component, state, desired_state, health, maintenance, host_state, addresses}], bindings {binding: {ref, kind}}, pool ({id, name, mode} of the PBX pool linked to an Asterisk instance, else null)}. Asterisk addresses ami, ari, sip; Kamailio jsonrpc (/RPC, admin address of the host group), sip, wss with TLS; LiveKit api, signal; LiveKit SIP sip. bound is true for the instance bound to navin-enterprise. binding gives flags only (cluster_id, asterisk.bound, asterisk.ami_secret, asterisk.ari_secret, kamailio.bound, kamailio.ephemeral_secret, livekit.bound, livekit.api_secret, livekit_sip.bound), never a value. problems lists the instances whose configuration the Manager refused (telephony_inventory_config_unreadable, catalog defaults used). Needs platform_admin; 503 platform_manager_not_configured, 502 platform_manager_unreachable, a refusal of the Manager is relayed.
Route: /v1/telephony/infrastructure (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | { cluster_id?: string } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.iterCalls
iterCalls(query?: TelephonyCallQuery, opts?: CallOptions): AsyncGenerator<Doc>
List the calls. Call history of the tenant, newest first. Each item: id, navin_call_id, linkedid, branch (pbx or ai), direction (inbound, outbound, internal, unknown), from, from_name, to, did, extension, queue, voice_agent_id, started_at, answered_at, ended_at, duration_seconds, billsec, wait_seconds, disposition, hangup_cause, hangup_cause_text, recording_id, legs, sip_call_id, livekit_room, pbx_instance_id, node. Built from the Cdr and CEL events of AMI and the LiveKit webhooks. Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/calls (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | TelephonyCallQuery | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: AsyncGenerator<Doc>. Decoded JSON answer of the operation "List the calls".
Raises: the typed errors of the transport (Errors).
TelephonyResource.iterRecordings
iterRecordings(query?: TelephonyRecordingQuery, opts?: CallOptions): AsyncGenerator<Doc>
List the recordings. Index of the telephony objects of the tenant in SeaweedFS, newest first. Each item: id, category, status (pending, stored, failed, deleted), source (asterisk, livekit, upload, export), content_type, size_bytes, sha256, duration_seconds, encryption (what the backend reported, and profile_mode), call_record_id, navin_call_id, retention_until, legal_hold, created_at, stored_at, deleted_at, last_error. The object key is never returned. Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/recordings (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | TelephonyRecordingQuery | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: AsyncGenerator<Doc>. Decoded JSON answer of the operation "List the recordings".
Raises: the typed errors of the transport (Errors).
TelephonyResource.ivrFlow
ivrFlow(flowId: string, opts?: CallOptions)
Read an IVR flow. One IVR flow of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/ivr-flows/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
flowId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.ivrFlowVersion
ivrFlowVersion(flowId: string, version: number, opts?: CallOptions)
Read a version of an IVR flow. One version of the flow with its graph; 404 telephony_not_found otherwise. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/ivr-flows/{flow_id}/versions/{version} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
flowId | string | yes | Identifier (UUID) of the IVR flow. | |
version | number | yes | Version number (1, 2, ...). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.ivrFlowVersions
ivrFlowVersions(flowId: string, query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the versions of an IVR flow. Versions of the flow with their status (draft, published, archived) and graph, by identifier. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/ivr-flows/{flow_id}/versions (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
flowId | string | yes | Identifier (UUID) of the IVR flow. | |
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the versions of an IVR flow".
Raises: the typed errors of the transport (Errors).
TelephonyResource.ivrFlows
ivrFlows(query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the IVR flows. The IVR flows of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/ivr-flows (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the IVR flows".
Raises: the typed errors of the transport (Errors).
TelephonyResource.ivrPrompt
ivrPrompt(promptId: string, opts?: CallOptions)
Read an IVR prompt. One IVR prompt; playback_url is filled for tenant_admin and platform_admin only. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/ivr-prompts/{prompt_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
promptId | string | yes | Identifier (UUID) of the IVR prompt. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.ivrPrompts
ivrPrompts(query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the IVR prompts. IVR prompts of the tenant, newest first (fields of the upload answer, playback_url empty). Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/ivr-prompts (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the IVR prompts".
Raises: the typed errors of the transport (Errors).
TelephonyResource.liftBlock
liftBlock(blockId: string, body: TelephonyLiftIn, opts?: CallOptions)
Lift a block. Deletes the Kamailio key on every JSONRPC endpoint (htable.delete) and marks the block lifted. Needs tenant_admin or platform_admin. Audited under telephony.block.lift, published as telephony.block.lifted.
Route: /v1/telephony/blocks/{block_id}/lift (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
blockId | string | yes | Identifier (UUID) of the block. | |
body | TelephonyLiftIn | yes | Why the block is lifted. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.listenVoicemail
listenVoicemail(messageId: string, opts?: CallOptions)
Listen to a voicemail message. Answers the message (message) and its presigned link. Answers {url, method: GET, expires_seconds: 300, expires_at, content_type, size_bytes, sha256}: a SeaweedFS presigned URL valid 300 seconds; no storage credential is returned. 409 telephony_recording_unavailable when the object is not stored, 503 telephony_storage_missing when the platform profile is missing, 409 storage_capability_missing when presign was not verified. Allowed to the readers and to the agent of the mailbox. Audited under telephony.voicemail.download.
Route: /v1/telephony/voicemail/{message_id}/listen (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
messageId | string | yes | Identifier (UUID) of the voicemail message. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.markVoicemail
markVoicemail(messageId: string, query?: { read?: boolean }, opts?: CallOptions)
Mark a voicemail message read. Marks the message read (or new again with read=false) and answers it. Allowed to the readers and to the agent of the mailbox. Audited under telephony.voicemail.read or telephony.voicemail.unread.
Route: /v1/telephony/voicemail/{message_id}/read (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
messageId | string | yes | Identifier (UUID) of the voicemail message. | |
query | { read?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.number
number(numberId: string, opts?: CallOptions)
Read a phone number. One phone number of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/numbers/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
numberId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.numbers
numbers(query?: ListParams & { enabled?: boolean }, opts?: CallOptions): Promise<Page<Doc>>
List the phone numbers. The phone numbers of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/numbers (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { enabled?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the phone numbers".
Raises: the typed errors of the transport (Errors).
TelephonyResource.pool
pool(poolId: string, opts?: CallOptions)
Read a PBX pool. One pool visible to the caller (404 otherwise), limited fields except for platform_admin. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/pbx-pools/{pool_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.poolVersions
poolVersions(poolId: string, query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the configuration versions of a pool. Versions of the pool, newest first, with status, author, reason, sha256, the SHA-256 of every file, current (the version the engines run) and the delivery report; next_cursor pages by version number. Shared pool: platform_admin; dedicated pool: the readers of its tenant.
Route: /v1/telephony/pbx-pools/{pool_id}/versions (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the configuration versions of a pool".
Raises: the typed errors of the transport (Errors).
TelephonyResource.pools
pools(query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the PBX pools. Every pool for platform_admin; for the other readers the shared pools and the pools dedicated to their tenant, with id, name, mode, tenant_id, enabled and dispatcher_set only. Secret references are never returned to them; has_* flags tell whether a secret is set. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/pbx-pools (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the PBX pools".
Raises: the typed errors of the transport (Errors).
TelephonyResource.preview
preview(opts?: CallOptions)
Preview the configuration of the tenant. Compiles the configuration of the caller's tenant alone and validates it, without any delivery: valid, errors (code, path, messages), the five Asterisk files with secrets masked, the Kamailio entries, the desired LiveKit objects and sha256. 409 telephony_not_configured without settings. Needs tenant_admin or platform_admin.
Route: /v1/telephony/preview (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.previewPool
previewPool(poolId: string, opts?: CallOptions)
Preview the configuration of a pool. Compiles every tenant of the pool and validates the result (graphs, references, no context of a tenant naming another tenant, a SIP domain for every tenant with extensions: telephony_sip_domain_missing otherwise), without delivery. Returns valid, errors, files (secrets masked), kamailio, livekit, sha256, tenants, current_version, unchanged and diff (unified diff per file to the published version). Shared pool: platform_admin; dedicated pool: its tenant_admin.
Route: /v1/telephony/pbx-pools/{pool_id}/preview (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.publishIvrFlowVersion
publishIvrFlowVersion(flowId: string, version: number, opts?: CallOptions)
Publish a version of an IVR flow. Validates the version again and makes it the one the compiler uses; the previously published version is archived. The engines get it at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.ivr_flow.version.publish.
Route: /v1/telephony/ivr-flows/{flow_id}/versions/{version}/publish (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
flowId | string | yes | Identifier (UUID) of the IVR flow. | |
version | number | yes | Version number (1, 2, ...). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.publishPool
publishPool(poolId: string, body: TelephonyPublishIn = {}, opts?: CallOptions): Promise<TelephonyPublication>
Publish the configuration of a pool. Compiles and validates the pool (422 with every problem, telephony_sip_domain_missing for a tenant with extensions but no SIP domain), records a new version (publishing) and answers 202 with version_id, version, sha256 and operation_id (headers Operation-Id, Operation-Location). In the background every node of the pool gets the files through AMI (CreateConfig, UpdateConfig, reloads, GetConfig read back), then the Kamailio tables and the LiveKit SIP objects are reconciled. The version ends published or failed (the failed nodes get the previous version back); follow it with GET /v1/telephony/config-versions/{version_id} or the operation. One publication at a time per pool (409 telephony_publication_running). Idempotency-Key honoured. Shared pool: platform_admin; dedicated pool: its tenant_admin. Audited under telephony.config.publish then telephony.config.published or telephony.config.failed.
Route: /v1/telephony/pbx-pools/{pool_id}/publish (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
body | TelephonyPublishIn | {} | no | Why the configuration is published. |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<TelephonyPublication>. A TelephonyPublication: 202 answer of a publication or a rollback: the new configuration version and its long operation.
Raises: the typed errors of the transport (Errors).
TelephonyResource.putQuotas
putQuotas(body: TelephonyQuotasIn, opts?: CallOptions)
Set the telephony quotas. Replaces the quotas of the tenant. Prefixes are + then 1 to 8 digits (422 telephony_prefix_invalid). Needs platform_admin: a tenant never raises its own limits. Audited under telephony.quotas.update.
Route: /v1/telephony/quotas (PUT).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyQuotasIn | yes | The complete quotas; omitted fields take their default. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.putRuntimeSettings
putRuntimeSettings(body: TelephonyRuntimeSettingsIn, opts?: CallOptions)
Set the runtime settings. Replaces the runtime settings. voicemail_storage reaches Asterisk at the next publication of the pool (platform voicemail: Record then the UserEvent NavinVoicemail). Needs tenant_admin or platform_admin. Audited under telephony.runtime_settings.update.
Route: /v1/telephony/runtime-settings (PUT).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyRuntimeSettingsIn | yes | The complete runtime settings; omitted fields take their default. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.putSettings
putSettings(body: TelephonySettingsIn, opts?: CallOptions)
Set the telephony settings. Creates or replaces the settings of the tenant. The SIP domain is unique on the platform (409 telephony_domain_taken). Changing model or pbx_instance_id needs platform_admin (403 otherwise); the pool must be shared or dedicated to this tenant and match the model (422 telephony_pool_mode). Needs tenant_admin or platform_admin; audited under telephony.settings.update.
Route: /v1/telephony/settings (PUT).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonySettingsIn | yes | The complete settings; omitted fields take their default. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.queue
queue(queueId: string, opts?: CallOptions)
Read a call queue. One call queue of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/queues/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
queueId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.queueMembers
queueMembers(queueId: string, query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the members of a queue. Extensions and human agents of the queue with their penalty. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/queues/{queue_id}/members (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
queueId | string | yes | Identifier (UUID) of the queue. | |
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the members of a queue".
Raises: the typed errors of the transport (Errors).
TelephonyResource.queues
queues(query?: ListParams, opts?: CallOptions): Promise<Page<Doc>>
List the call queues. The call queues of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/queues (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the call queues".
Raises: the typed errors of the transport (Errors).
TelephonyResource.quotas
quotas(opts?: CallOptions)
Read the telephony quotas. Quotas and fraud limits of the tenant (defaults with configured: false when never set): concurrent calls and calls per second (pushed to Kamailio tenant_limits), monthly minutes, allowed countries, premium prefixes, maximum call duration (dialplan) and recording retention. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/quotas (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.reconcilePool
reconcilePool(poolId: string, opts?: CallOptions)
Reconcile the routing of a pool. Compares the Kamailio hash tables and the LiveKit SIP trunks and dispatch rules with the published version and fixes the differences (idempotent: nothing changes when they match). A Kamailio whose core.uptime went down restarted and gets every entry again (full_resync). 409 telephony_nothing_published before the first publication. Same roles as the publication; audited under telephony.config.reconcile.
Route: /v1/telephony/pbx-pools/{pool_id}/reconcile (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.recording
recording(recordingId: string, opts?: CallOptions)
Read a recording. One recording of the index (same fields as the list). Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/recordings/{recording_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
recordingId | string | yes | Identifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.recordings
recordings(query?: TelephonyRecordingQuery, opts?: CallOptions): Promise<Page<Doc>>
List the recordings. Index of the telephony objects of the tenant in SeaweedFS, newest first. Each item: id, category, status (pending, stored, failed, deleted), source (asterisk, livekit, upload, export), content_type, size_bytes, sha256, duration_seconds, encryption (what the backend reported, and profile_mode), call_record_id, navin_call_id, retention_until, legal_hold, created_at, stored_at, deleted_at, last_error. The object key is never returned. Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/recordings (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | TelephonyRecordingQuery | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the recordings".
Raises: the typed errors of the transport (Errors).
TelephonyResource.removeQueueMember
removeQueueMember(queueId: string, memberId: string, opts?: CallOptions)
Remove a member from a queue. Removes the member (204). Needs tenant_admin or platform_admin; audited under telephony.queue_member.delete.
Route: /v1/telephony/queues/{queue_id}/members/{member_id} (DELETE).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
queueId | string | yes | Identifier (UUID) of the queue. | |
memberId | string | yes | Identifier (UUID) of the queue member. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.rollbackPool
rollbackPool(poolId: string, body: TelephonyRollbackIn, opts?: CallOptions): Promise<TelephonyPublication>
Roll a pool back to a version. Publishes the files, tables and LiveKit objects of an earlier published or rolled_back version again as a new version (rollback_of), as a long operation like the publication (202). Once published, the later versions become rolled_back. 409 telephony_rollback_target for another status. Same roles as the publication; audited under telephony.config.rollback.
Route: /v1/telephony/pbx-pools/{pool_id}/rollback (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
body | TelephonyRollbackIn | yes | The version to publish again and why. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<TelephonyPublication>. A TelephonyPublication: 202 answer of a publication or a rollback: the new configuration version and its long operation.
Raises: the typed errors of the transport (Errors).
TelephonyResource.routingRule
routingRule(ruleId: string, opts?: CallOptions)
Read a routing rule. One routing rule of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/routing-rules/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ruleId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.routingRules
routingRules(query?: ListParams & { enabled?: boolean; direction?: "inbound" | "outbound" }, opts?: CallOptions): Promise<Page<Doc>>
List the routing rules. The routing rules of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/routing-rules (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { enabled?: boolean; direction?: "inbound" | "outbound" } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the routing rules".
Raises: the typed errors of the transport (Errors).
TelephonyResource.runtimeSettings
runtimeSettings(opts?: CallOptions)
Read the runtime settings. Voicemail storage and fraud thresholds of the tenant (configured false and the defaults when never set). Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/runtime-settings (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.setLegalHold
setLegalHold(recordingId: string, body: TelephonyLegalHoldIn, opts?: CallOptions)
Set the legal hold of a recording. Places or releases the legal hold: a held recording is never deleted, neither by the API nor by the retention job. Needs tenant_admin or platform_admin. Audited under telephony.recording.legal_hold with the reason.
Route: /v1/telephony/recordings/{recording_id}/legal-hold (PUT).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
recordingId | string | yes | Identifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404). | |
body | TelephonyLegalHoldIn | yes | The hold and its reason. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.settings
settings(opts?: CallOptions)
Read the telephony settings. Telephony settings of the caller's tenant: model, SIP domain, PBX pool, CDR retention, numbering plan, and tid, the short identifier the engines know the tenant by. configured: false when they were never set. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/settings (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.stats
stats(query?: { window_hours?: number }, opts?: CallOptions)
Read the live statistics. Dashboard figures of the tenant computed from the call tables: active_calls, active_by_state, active_by_branch, calls, answered, answer_rate, average_billsec, average_wait_seconds, calls_per_hour (hour, calls, answered, inbound, outbound), queues (queue, sla_seconds, offered, answered, abandoned, waiting, average_wait_seconds, max_wait_seconds, sla = share answered within the SLA of the queue, abandon_rate), agents (queue member states: queue, interface, extension, member_name, device_status, paused, paused_reason, in_call, calls_taken, updated_at), registrations (extension, status, contacts, updated_at), open_fraud_alerts, active_blocks, generated_at, window_hours. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/stats (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | { window_hours?: number } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.syncInfrastructurePool
syncInfrastructurePool(body: TelephonyInventorySyncIn, opts?: CallOptions)
Create or refresh a PBX pool from the Manager inventory. Creates (201) or refreshes (200) the PBX pool linked to an Asterisk instance of the Manager (manager_cluster, manager_service): nodes (host, AMI port, SIP address, Manager instance, ARI URL), ami_tls, Kamailio JSONRPC endpoints and addresses (the Kamailio instances bound to this Asterisk, or kamailio_service), livekit_binding (url, sip_host), AMI and ARI user names and the references of the secrets. A secret of the instance bound to navin-enterprise becomes env://EAI_CRED_TELEPHONY_AMI_SECRET, env://EAI_CRED_TELEPHONY_ARI_PASSWORD or env://EAI_CRED_TELEPHONY_EPHEMERAL_SECRET (variables rendered by the Manager in the sensitive environment file), a reference already on the pool is kept, never a value. Idempotent: the same inventory changes nothing (changed: []). Answers {created, changed, pool, secrets {ami, ari, ephemeral: bound, kept or missing}, sources {cluster_id, asterisk, kamailio, livekit, livekit_sip}, problems}. Errors: 404 telephony_inventory_not_found, 409 telephony_inventory_no_nodes, 422 telephony_inventory_too_large, the pool rules (422 telephony_pool_mode, 409 telephony_name_taken). Needs platform_admin; audited under telephony.pbx_pool.sync (plus telephony.pbx_pool.create or telephony.pbx_pool.update).
Route: /v1/telephony/infrastructure/pools (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyInventorySyncIn | yes | The Asterisk instance of the Manager and the options of a new pool. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.transferCall
transferCall(linkedId: string, body: TelephonyTransferIn, opts?: CallOptions)
Transfer an active call. Transfers a channel of the call: AMI Redirect to {tid}-internal (extension of the tenant, 422 telephony_reference_invalid when it does not exist) or {tid}-outbound (E.164 number, the permissions and destination rules of the dialplan apply); for the AI branch, LiveKit TransferSIPParticipant (SIP REFER). ARI continue and redirect are not used: they only act on channels inside a Stasis application. Answers {linkedid, target, status, via, uniqueid}; 502 telephony_control_failed on a refusal. Needs tenant_admin or platform_admin. Audited under telephony.call.transfer.
Route: /v1/telephony/active-calls/{linkedid}/transfer (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
linkedId | string | yes | Asterisk linkedid of the active call (linkedid of GET /v1/telephony/active-calls). | |
body | TelephonyTransferIn | yes | The target and, optionally, the channel to move. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.trunk
trunk(trunkId: string, opts?: CallOptions)
Read a SIP trunk. One SIP trunk of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/trunks/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
trunkId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.trunks
trunks(query?: ListParams & { enabled?: boolean }, opts?: CallOptions): Promise<Page<Doc>>
List the SIP trunks. The SIP trunks of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/trunks (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { enabled?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the SIP trunks".
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateAgent
updateAgent(agentId: string, body: Partial<TelephonyAgentIn>, opts?: CallOptions)
Change a human agent. Changes the sent fields only and returns the human agent; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.agent.update.
Route: /v1/telephony/agents/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
agentId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyAgentIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateConference
updateConference(conferenceId: string, body: Partial<TelephonyConferenceIn>, opts?: CallOptions)
Change a conference room. Changes the sent fields only and returns the conference room; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.conference.update.
Route: /v1/telephony/conferences/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
conferenceId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyConferenceIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateExtension
updateExtension(extensionId: string, body: Partial<TelephonyExtensionIn>, opts?: CallOptions)
Change an extension. Changes the sent fields only and returns the extension; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.extension.update.
Route: /v1/telephony/extensions/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
extensionId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyExtensionIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateIvrFlow
updateIvrFlow(flowId: string, body: Partial<TelephonyIvrFlowIn>, opts?: CallOptions)
Change an IVR flow. Changes the sent fields only and returns the IVR flow; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.ivr_flow.update.
Route: /v1/telephony/ivr-flows/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
flowId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyIvrFlowIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateNumber
updateNumber(numberId: string, body: Partial<TelephonyNumberIn>, opts?: CallOptions)
Change a phone number. Changes the sent fields only and returns the phone number; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.number.update.
Route: /v1/telephony/numbers/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
numberId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyNumberIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updatePool
updatePool(poolId: string, body: Partial<TelephonyPoolIn>, opts?: CallOptions)
Change a PBX pool. Changes the sent fields of the pool. Needs platform_admin; audited under telephony.pbx_pool.update.
Route: /v1/telephony/pbx-pools/{pool_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
poolId | string | yes | Identifier (UUID) of the PBX pool. | |
body | Partial<TelephonyPoolIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateQueue
updateQueue(queueId: string, body: Partial<TelephonyQueueIn>, opts?: CallOptions)
Change a call queue. Changes the sent fields only and returns the call queue; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.queue.update.
Route: /v1/telephony/queues/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
queueId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyQueueIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateQueueMember
updateQueueMember(queueId: string, memberId: string, body: TelephonyMemberPatch, opts?: CallOptions)
Change the penalty of a queue member. Sets the penalty of the member (0 rings first). Needs tenant_admin or platform_admin; audited under telephony.queue_member.update.
Route: /v1/telephony/queues/{queue_id}/members/{member_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
queueId | string | yes | Identifier (UUID) of the queue. | |
memberId | string | yes | Identifier (UUID) of the queue member. | |
body | TelephonyMemberPatch | yes | The new penalty. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateRoutingRule
updateRoutingRule(ruleId: string, body: Partial<TelephonyRuleIn>, opts?: CallOptions)
Change a routing rule. Changes the sent fields only and returns the routing rule; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.routing_rule.update.
Route: /v1/telephony/routing-rules/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
ruleId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyRuleIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateTrunk
updateTrunk(trunkId: string, body: Partial<TelephonyTrunkIn>, opts?: CallOptions)
Change a SIP trunk. Changes the sent fields only and returns the SIP trunk; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.trunk.update.
Route: /v1/telephony/trunks/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
trunkId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyTrunkIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.updateVoiceAgent
updateVoiceAgent(voiceAgentId: string, body: Partial<TelephonyVoiceAgentIn>, opts?: CallOptions)
Change an AI voice agent. Changes the sent fields only and returns the AI voice agent; the same checks as the creation apply. A sent secret replaces the stored one (new vault version). The engines get the change at the next publication of the pool. Needs tenant_admin or platform_admin; audited under telephony.voice_agent.update.
Route: /v1/telephony/voice-agents/{item_id} (PATCH).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
voiceAgentId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
body | Partial<TelephonyVoiceAgentIn> | yes | The fields to change. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.uploadIvrPrompt
uploadIvrPrompt(name: string, audio: TelephonyAudio, opts?: CallOptions)
Upload an IVR prompt. Raw body: a PCM WAV file (Content-Type: audio/wav, 415 telephony_prompt_type otherwise, 413 telephony_prompt_size above 10 MB, 422 telephony_prompt_invalid when it is not readable, 422 telephony_prompt_format when it is not 8000 Hz, 16 bit, mono, the only WAV the wav format of Asterisk reads). The file goes through the file security pipeline (422 file_blocked, 503 file_scan_unavailable), is stored in the category ivr-prompts (no expiry) and answers 201 with id, name, recording_id, content_type, size_bytes, sha256, duration_seconds, scan_id, created_at and playback_url, the signed URL an IVR plays. 409 telephony_name_taken when the name is used. Needs tenant_admin or platform_admin. Audited under telephony.ivr_prompt.create.
Route: /v1/telephony/ivr-prompts (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
name | string | yes | Name of the prompt, unique in the tenant (lowercase letters, digits, -). | |
audio | TelephonyAudio | yes | Raw bytes of the PCM WAV file (10 MB at most), sent as is with Content-Type: audio/wav; anything else is refused before sending. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.voiceAgent
voiceAgent(voiceAgentId: string, opts?: CallOptions)
Read an AI voice agent. One AI voice agent of the caller's tenant; 404 telephony_not_found otherwise. Secrets are never returned, only has_* flags. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/voice-agents/{item_id} (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
voiceAgentId | string | yes | Identifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404). | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Raises: the typed errors of the transport (Errors).
TelephonyResource.voiceAgents
voiceAgents(query?: ListParams & { enabled?: boolean }, opts?: CallOptions): Promise<Page<Doc>>
List the AI voice agents. The AI voice agents of the caller's tenant, by identifier, limit per page (default 50, at most 500) with next_cursor for the next page. Needs tenant_admin, support_engineer, auditor or platform_admin.
Route: /v1/telephony/voice-agents (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { enabled?: boolean } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the AI voice agents".
Raises: the typed errors of the transport (Errors).
TelephonyResource.voicemail
voicemail(query?: ListParams & { mailbox?: string; status?: "new" | "read" }, opts?: CallOptions): Promise<Page<Doc>>
List the voicemail messages. Voicemail messages (status new or read) of the tenant, newest first: id, mailbox, extension_id, caller_number, caller_name, navin_call_id, recording_id, duration_seconds, status, read_at, received_at. A message appears once its audio is stored. Readers see every mailbox; a human agent (any role) sees the mailboxes of the extensions it is bound to, 403 for anyone else. Keyset pagination: limit (1 to 500, default 50) and the opaque cursor of next_cursor.
Route: /v1/telephony/voicemail (GET).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
query | ListParams & { mailbox?: string; status?: "new" | "read" } | no | Query string parameters of the route. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<Page<Doc>>. Decoded JSON answer of the operation "List the voicemail messages".
Raises: the typed errors of the transport (Errors).
TelephonyResource.webrtcCredentials
webrtcCredentials(body: TelephonyWebrtcIn, opts?: CallOptions): Promise<TelephonyWebrtcCredentials>
Get WebRTC credentials. Ephemeral SIP credentials of a WebRTC extension for the Kamailio auth_ephemeral module: username <expiry>:<endpoint>, password base64(HMAC-SHA1(shared secret, username)), expires_at (one hour at most), sip_uri sip:<endpoint>@<SIP domain> (the softphone registers and calls with its endpoint name as From and To user, the user Kamailio checks against the credentials), ws_url, realm, endpoint (<tid>-<extension>) and number (the extension number, for display). The SIP password of the extension never reaches the browser. Allowed for tenant_admin, platform_admin and the human agent bound to the extension (404 for anyone else). 409 telephony_not_webrtc or telephony_not_configured. Audited under telephony.webrtc.credentials.
Route: /v1/telephony/webrtc/credentials (POST).
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
body | TelephonyWebrtcIn | yes | The extension and the lifetime. | |
opts | CallOptions | no | Per call options (query, idempotency key, traceparent, headers). |
Returns: Promise<TelephonyWebrtcCredentials>. A TelephonyWebrtcCredentials: Ephemeral SIP credentials of a WebRTC extension for the Kamailio auth_ephemeral module.
Raises: the typed errors of the transport (Errors).