Skip to main content

resources/telephony.ts

Source: sdks/typescript/packages/sdk/src/resources/telephony.ts. Back to the TypeScript SDK reference index.

note

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:

NameTypeRequiredDescription
alwaysstring | nullnoUnconditional forwarding target: an extension number or an E.164 number.
busystring | nullnoTarget when the extension is busy.
no_answerstring | nullnoTarget when the extension does not answer.
no_answer_secondsnumbernoRing time before the no answer case, 5 to 120 seconds (default 25).

Interface TelephonyPermissions​

Destinations an extension may call.

Fields:

NameTypeRequiredDescription
internalbooleannoCalls to the other extensions of the tenant (default true).
nationalbooleannoCalls to national numbers (default true).
internationalbooleannoCalls to other countries, limited to the allowed country prefixes of the quotas (default false).
premiumbooleannoCalls to the premium prefixes of the quotas (default false).

Interface TelephonyNumberingSettings​

Numbering plan and options of the tenant.

Fields:

NameTypeRequiredDescription
country_codestringnoCountry code of the tenant, for example 33 (default).
national_prefixstringnoNational prefix dialled before national numbers (default 0).
international_prefixstringnoInternational prefix (default 00).
emergency_numbersstring[]noEmergency numbers, always allowed, routed on every trunk (default 112).
timezonestring | nullnoTime zone of the time conditions, for example Europe/Paris.
wss_urlstring | nullnoWSS address of Kamailio for the softphone (default wss://<sip domain>:7443).

Interface TelephonySettingsIn​

Telephony settings of the tenant.

Fields:

NameTypeRequiredDescription
sip_domainstringyesSIP domain of the tenant, unique on the platform; Kamailio maps it to the tenant.
enabledbooleannoWhether the tenant is compiled into its pool (default true).
modelTelephonyPoolModenoshared (pool shared by several tenants, default) or dedicated. Changed by platform_admin.
pbx_instance_idstring | nullnoPBX pool serving the tenant. Changed by platform_admin.
cdr_retention_daysnumbernoRetention of the call records, 1 to 3650 days (default 365).
settingsTelephonyNumberingSettingsnoNumbering plan and options.

Interface TelephonyQuotasIn​

Quotas and fraud limits of the tenant.

Fields:

NameTypeRequiredDescription
max_concurrent_callsnumbernoSimultaneous calls of the tenant (Kamailio tenant_limits and dialplan).
cpsnumbernoNew calls per second, enforced by Kamailio.
monthly_minutesnumber | nullnoMinutes per month (none: unlimited).
max_call_duration_secondsnumbernoMaximum duration of a call, 60 to 86400 seconds (default 7200).
allowed_country_prefixesstring[]noInternational prefixes allowed, for example +32 (none: every country for the extensions with the international permission).
blocked_premium_prefixesstring[]noPremium prefixes, for example +3389: only the extensions with the premium permission reach them.
recording_retention_daysnumbernoRetention of the recordings, 1 to 3650 days (default 90).

Interface TelephonyRuntimeSettingsIn​

Runtime settings of the telephony of the tenant.

Fields:

NameTypeRequiredDescription
voicemail_storage"asterisk" | "platform"noasterisk (app_voicemail keeps the messages on the PBX) or platform (recorded and filed in SeaweedFS, listed by the API).
voicemail_max_secondsnumbernoLongest platform voicemail message, 10 to 600 seconds (default 180).
fraud_auto_blockbooleannoWhether the fraud signals block automatically (default true).
fraud_window_minutesnumbernoWindow of the refused destinations, 1 to 1440 minutes (default 10).
fraud_extension_hourly_callsnumbernoOutbound calls of one extension in one hour above which it is flagged and blocked (default 60).
fraud_refused_attemptsnumbernoRefused destinations of one extension that block it, 1 to 1000 (default 5).
fraud_tenant_block_factornumbernoThe 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:

NameTypeRequiredDescription
namestringyesName of the node.
hoststringyesAdministration address of the node (AMI).
ami_portnumbernoAMI port (default 5038, 5039 with TLS).
ari_urlstring | nullnoBase URL of ARI on the node, for example https://10.0.0.20:8089 (default http://<host>:8088); the path /ari is added.
sip_addressstring | nullnoSIP address of the node, allowed by the LiveKit SIP trunks.
manager_instancestring | nullnoName of the service instance in the Navin Manager.

Interface TelephonyKamailioEndpoint​

A Kamailio JSONRPC endpoint.

Fields:

NameTypeRequiredDescription
namestringyesName of the Kamailio instance.
urlstringyesJSONRPC address, for example http://10.0.0.10:5071/jsonrpc.

Interface TelephonyLiveKitBinding​

LiveKit binding of a pool.

Fields:

NameTypeRequiredDescription
urlstring | nullnoHTTP address of LiveKit for the Twirp SIP API (none: the LiveKit objects are not reconciled).
sip_hoststring | nullnoSIP 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:

NameTypeRequiredDescription
namestringyesName of the pool, unique on the platform.
modeTelephonyPoolModeyesshared (several tenants) or dedicated (one tenant).
tenant_idstring | nullnoTenant of a dedicated pool (none for a shared pool).
enabledbooleannoWhether the pool is reconciled (default true).
nodesTelephonyPoolNode[]noAsterisk nodes of the pool (up to 32): each one gets every publication.
manager_clusterstring | nullnoCluster of the pool in the Navin Manager.
manager_servicestringnoService of the Navin Manager catalogue (default asterisk).
ami_usernamestring | nullnoAMI user of the pool.
ami_secret_refstring | nullnoReference of the AMI secret: openbao://<path> or env://EAI_CRED_<NAME>.
ami_events_usernamestring | nullnoRead only AMI user of the event connection (classes call, cdr, cel, agent, reporting, user); none: the configuration user.
ami_events_secret_refstring | nullnoReference of the secret of the read only AMI events user: openbao://<path> or env://EAI_CRED_<NAME>.
ami_tlsbooleannoWhether AMI is reached over TLS.
ari_usernamestring | nullnoARI user of the pool.
ari_secret_refstring | nullnoReference of the ARI secret.
tls_verifybooleannoWhether the TLS certificates of the engines are checked (default true).
kamailio_addressesstring[]noAddresses of the Kamailio instances: the only sources the extensions accept.
kamailio_endpointsTelephonyKamailioEndpoint[]noKamailio JSONRPC endpoints of the pool (up to 8).
kamailio_secret_refstring | nullnoReference of the JSONRPC credential user:password (none: no authentication).
ephemeral_secret_refstring | nullnoReference of the secret shared with Kamailio auth_ephemeral.
dispatcher_setnumbernoDispatcher set of the pool (1 for the shared pool, 100 and up for dedicated pools).
livekit_sip_setnumbernoDispatcher set of LiveKit SIP (default 2).
livekit_bindingTelephonyLiveKitBindingnoLiveKit binding of the pool.

Interface TelephonyPublishIn​

A publication request.

Fields:

NameTypeRequiredDescription
reasonstring | nullnoReason, kept with the version and in the audit.

Interface TelephonyRollbackIn​

A rollback request.

Fields:

NameTypeRequiredDescription
versionnumberyesNumber of the version to publish again.
reasonstring | nullnoReason, kept with the version and in the audit.

Interface TelephonyDrainIn​

A dispatcher destination and its state.

Fields:

NameTypeRequiredDescription
addressstringyesSIP URI of the destination, for example sip:10.0.0.20:5070.
state"drain" | "active"yesdrain (no new call) or active.
groupnumber | nullnoDispatcher set (default: the set of the pool).

Interface TelephonyTrunkIn​

A SIP trunk of the tenant toward an operator.

Fields:

NameTypeRequiredDescription
namestringyesName, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines.
hoststringyesHost name or address of the operator SIP server.
providerstring | nullnoName of the operator, for display.
portnumbernoSIP port of the operator (default 5060).
transport"udp" | "tcp" | "tls"noSIP transport: udp (default), tcp or tls.
registrationbooleannoWhether Asterisk registers to the operator (needs auth_username).
auth_usernamestring | nullnoUser name of the digest authentication toward the operator.
passwordstring | nullnoPassword of the trunk, 8 to 128 characters. Write only: kept in the vault, never returned (has_password).
codecsstring[]noCodecs in preference order among ulaw, alaw, g722, g729, opus and gsm (default ulaw, alaw).
outbound_caller_idstring | nullnoE.164 number presented on the calls through this trunk.
allowed_numbersstring[]noE.164 numbers the trunk may present (up to 200).
failover_ordernumbernoOrder of the trunk when a rule names no trunk (lower first, default 100).
enabledbooleannoWhether the object is compiled and published (default true).

Interface TelephonyNumberIn​

A public number of the tenant and its destination.

Fields:

NameTypeRequiredDescription
e164stringyesPublic number in E.164 format, unique on the platform.
destination_kindTelephonyDestinationKindyesKind of destination: extension, ivr, queue, voice_agent, conference or external.
destination_idstring | nullnoIdentifier (UUID) of the destination object in the tenant (every kind except external).
destination_valuestring | nullnoE.164 number of an external destination.
branch"pbx" | "ai"nopbx (Kamailio to Asterisk, default) or ai (Kamailio to LiveKit SIP directly, voice agent only).
labelstring | nullnoLabel for display.
trunk_idstring | nullnoTrunk of the tenant the number comes from.
enabledbooleannoWhether the object is compiled and published (default true).

Interface TelephonyExtensionIn​

An extension of the tenant.

Fields:

NameTypeRequiredDescription
numberstringyesExtension number, 2 to 8 digits, unique in the tenant.
display_namestringyesName shown as caller id.
kind"sip" | "webrtc"nosip (phone with a password) or webrtc (softphone of the portal, ephemeral credentials).
passwordstring | nullnoSIP password, 12 to 128 characters, required for sip. Write only: kept in the vault, never returned (has_password).
enabledbooleannoWhether the object is compiled and published (default true).
max_concurrent_callsnumbernoSimultaneous calls of the extension, 1 to 100 (default 2), enforced by the dialplan.
recording_policy"off" | "always" | "inbound" | "outbound"noRecording: off (default), always, inbound or outbound (MixMonitor into the folder of the tenant).
permissionsTelephonyPermissionsnoDestinations the extension may call.
forwardingTelephonyForwardingnoCall forwarding rules.
voicemail_enabledbooleannoWhether the extension has a voicemail box (needs a PIN).
voicemail_pinstring | nullnoVoicemail PIN, 4 to 8 digits. Write only (has_voicemail_pin).
voicemail_emailstring | nullnoAddress told of new messages.

Interface TelephonyTimeWindow​

A time range in Asterisk syntax.

Fields:

NameTypeRequiredDescription
startstringyesStart time, HH:MM.
endstringyesEnd time, HH:MM, after the start.
daysstringnoDays: * or mon to sun, or a range such as mon-fri (default *).
mdaysstringnoDays of the month: * or a range such as 1-15 (default *).
monthsstringnoMonths: * or jan to dec, or a range (default *).

Interface TelephonyRuleIn​

A routing rule of the tenant.

Fields:

NameTypeRequiredDescription
namestringyesName, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines.
direction"inbound" | "outbound"yesinbound (called DID) or outbound (dialled E.164 number).
patternstringyesAsterisk pattern on the E.164 number, for example _+33X..
prioritynumbernoOrder of the rules, lower first (default 100).
destination_kindTelephonyDestinationKind | nullnoKind of destination: extension, ivr, queue, voice_agent, conference or external.
destination_idstring | nullnoIdentifier (UUID) of the destination object in the tenant (every kind except external).
destination_valuestring | nullnoE.164 number of an external destination.
trunk_idsstring[]noOutbound: trunks of the tenant tried in this order on failure (none: every trunk by failover_order).
strip_digitsnumbernoDigits removed from the start of the number before dialling (0 to 10).
prependstringnoDigits added before the number when dialling.
time_conditionsTelephonyTimeWindow[]noTime ranges when the rule applies (none: always).
enabledbooleannoWhether the object is compiled and published (default true).

Interface TelephonyIvrFlowIn​

An IVR flow of the tenant.

Fields:

NameTypeRequiredDescription
namestringyesName, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines.
descriptionstring | nullnoDescription of the flow.

Interface TelephonyIvrVersionIn​

A draft version of an IVR flow.

Fields:

NameTypeRequiredDescription
graphDocyesGraph 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:

NameTypeRequiredDescription
namestringyesName, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines.
display_namestring | nullnoName for display.
numberstring | nullnoInternal number that reaches the queue (optional).
strategy"ringall" | "leastrecent" | "fewestcalls" | "random" | "rrmemory" | "linear" | "wrandom"noRing strategy: ringall, leastrecent, fewestcalls, random, rrmemory, linear or wrandom.
timeout_secondsnumbernoRing time per member, 1 to 600 seconds (default 15).
max_wait_secondsnumbernoMaximum wait of a caller, 0 to 86400 seconds (default 300).
wrapup_secondsnumbernoPause of a member after a call, 0 to 3600 seconds.
sla_secondsnumbernoService level threshold, 1 to 3600 seconds (default 20).
music_on_holdstringnoMusic on hold class (default default).
recordingbooleannoWhether the calls of the queue are recorded.

Interface TelephonyMemberIn​

A member of a queue.

Fields:

NameTypeRequiredDescription
extension_idstring | nullnoExtension of the tenant (or agent_id, not both).
agent_idstring | nullnoHuman agent of the tenant, reached on its extension.
penaltynumbernoPenalty 0 to 100, lower rings first.

Interface TelephonyMemberPatch​

New penalty of a queue member.

Fields:

NameTypeRequiredDescription
penaltynumberyesNew penalty, 0 to 100.

Interface TelephonyAgentIn​

A human agent of the tenant.

Fields:

NameTypeRequiredDescription
user_idstringyesIdentifier of the user in the platform, unique in the tenant.
display_namestringyesName of the agent.
extension_idstring | nullnoExtension of the tenant the agent answers on.
skillsstring[]noSkills of the agent (up to 50).
enabledbooleannoWhether 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:

NameTypeRequiredDescription
namestringyesName, unique in the tenant: lowercase letters, digits and -, 1 to 41 characters; it is part of the names on the engines.
llm_model_aliasstringyesAlias of the language model in the LLM gateway.
display_namestring | nullnoName for display.
languagestringnoLanguage, for example fr-FR (default).
instructionsstringnoInstructions of the agent (system prompt), 20000 characters at most.
greetingstring | nullnoFirst sentence said to the caller.
stt_modelstring | nullnoSpeech to text model.
tts_modelstring | nullnoText to speech model.
tts_voicestring | nullnoVoice of the text to speech model.
allowed_toolsstring[]noTools the agent may call (up to 100).
transfer_targetstring | nullnoTransfer to a human: extension:<number>, queue:<name> or number:<E.164>.
fallback_queue_idstring | nullnoQueue of the tenant that takes the call when the agent fails.
max_duration_secondsnumbernoMaximum duration of a call, 30 to 14400 seconds (default 900).
enabledbooleannoWhether the object is compiled and published (default true).

Interface TelephonyConferenceIn​

A conference room of the tenant.

Fields:

NameTypeRequiredDescription
numberstringyesNumber of the room, 2 to 8 digits, unique in the tenant.
namestringyesName of the room.
pinstring | nullnoPIN, 4 to 8 digits. Write only (has_pin).
max_membersnumbernoMaximum participants, 2 to 500 (default 10).
recordingbooleannoWhether the conference is recorded.

Interface TelephonyWebrtcIn​

A request of WebRTC credentials.

Fields:

NameTypeRequiredDescription
extension_idstringyesWebRTC extension of the tenant.
ttl_secondsnumbernoLifetime of the credentials, 60 to 3600 seconds (default 3600).

Interface TelephonyTransferIn​

Transfer of an active call.

Fields:

NameTypeRequiredDescription
targetstringyesExtension number of the tenant (2 to 8 digits) or E.164 number.
uniqueidstring | nullnoChannel to move (default: the first channel of the call).

Interface TelephonyLegalHoldIn​

Legal hold of a recording.

Fields:

NameTypeRequiredDescription
legal_holdbooleanyestrue: hold the recording; false: release it.
reasonstringyesReason kept in the audit trail (300 characters at most).

Interface TelephonyDeleteIn​

Reason of a deletion, kept in the audit trail.

Fields:

NameTypeRequiredDescription
reasonstringnoReason (default user request).

Interface TelephonyBlockIn​

A manual block of the tenant or of one extension.

Fields:

NameTypeRequiredDescription
scope"tenant" | "extension"yestenant (every call of the tenant) or extension.
reasonstringyesReason kept with the block and in the audit trail.
extensionstring | nullnoExtension number, required for the scope extension only.

Interface TelephonyLiftIn​

Why a block is lifted.

Fields:

NameTypeRequiredDescription
reasonstringyesReason 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:

NameTypeRequiredDescription
cluster_idstringyesIdentifier of the Manager cluster.
servicestringyesName of the Asterisk instance in the Manager (for example asterisk).
modeTelephonyPoolModenoshared (default) or dedicated for a new pool.
namestring | nullnoName of a new pool (default: the name of the instance); ignored on a refresh.
tenant_idstring | nullnoTenant of a new dedicated pool.
kamailio_servicestring | nullnoKamailio instance to use (default: those bound to this Asterisk).
livekit_servicestring | nullnoLiveKit instance to use (default: the one LiveKit SIP is bound to, else the only one).
livekit_sip_servicestring | nullnoLiveKit 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:

NameTypeRequiredDescription
direction"inbound" | "outbound" | "internal" | "unknown"noinbound (called DID) or outbound (dialled E.164 number).
branch"pbx" | "ai"nopbx (Kamailio to Asterisk, default) or ai (Kamailio to LiveKit SIP directly, voice agent only).
disposition"ANSWERED" | "BUSY" | "CONGESTION" | "FAILED" | "NO ANSWER"noOutcome of the call: ANSWERED, BUSY, CONGESTION, FAILED or NO ANSWER.
extensionstringnoExtension number, required for the scope extension only.
numberstringnoCalling or called number of the call.
queuestringnoName of the call queue the call went through.
answeredbooleannoOnly the answered calls (true) or the unanswered ones (false).
sincestringnoOnly the calls started from this time on, ISO 8601.
untilstringnoOnly the calls started before this time, ISO 8601.

Interface TelephonyRecordingQuery​

Filters of GET /v1/telephony/recordings with limit and cursor (newest first).

ListParams

Fields:

NameTypeRequiredDescription
call_idstringnoOnly the recordings of this call.
category"call-recordings" | "conference-recordings" | "ai-voice-recordings" | "voicemail" | "ivr-prompts" | "audio-exports"noFree category, for example data_leak or prompt_injection. Default other.
status"pending" | "stored" | "failed" | "deleted"noState of the stored object: pending, stored, failed or deleted.
legal_holdbooleannoOnly 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:

NameTypeRequiredDescription
urlstringyesPresigned URL to read the audio with a plain GET, without credentials.
method"GET"yesName of the method, for example basic, token or none.
expires_secondsnumberyesLifetime of the URL in seconds, default 900, at most EAI_STORAGE_PRESIGN_MAX_SECONDS (3600 by default) and never more than 604800.
expires_atstringyesDate and time (ISO 8601, UTC) after which the item is no longer valid.
content_typestring | nullnoContent type passed to the backend when the URL is signed (the type the upload is expected to send); 200 characters at most.
size_bytesnumber | nullnoSize of the audio in bytes, when known.
sha256string | nullnoSHA-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:

NameTypeRequiredDescription
usernamestringyesLogin of the account, 1 to 128 characters, compared without case.
passwordstringyesPassword. Write only: never returned by the API and never written to the logs.
expires_atstringyesDate and time (ISO 8601, UTC) after which the item is no longer valid.
ttl_secondsnumberyesLifetime in seconds. Once it has elapsed, the item expires and is no longer accepted.
sip_uristringyesSIP address the softphone registers and calls as, sip:<endpoint>@<domain>.
ws_urlstringyesSecure WebSocket address of the SIP proxy, wss://....
realmstringyesSIP authentication realm, the SIP domain of the tenant.
endpointstringyesEndpoint name of the extension on the PBX.
numberstringyesInternal number of the extension.

Interface TelephonyPublication​

202 answer of a publication or a rollback: the new configuration version and its long operation.

Fields:

NameTypeRequiredDescription
version_idstringyesVersion of the object to delete on a versioned bucket, 1 to 1024 characters. Omit it to delete the current version.
versionnumberyesNumber of the new configuration version of the pool.
statusstringyesState of the version, publishing until the delivery ends.
sha256stringyesSHA-256 of the compiled configuration.
pool_idstringyesIdentifier of the PBX pool.
rollback_ofstring | nullnoVersion published again by a rollback, null for a publication.
operation_idstringyesLong 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).

NameTypeDefaultRequiredDescription
alertIdstringyesIdentifier (UUID) of the fraud alert.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
query{ extension?: string; queue?: string }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queueIdstringyesIdentifier (UUID) of the queue.
bodyTelephonyMemberInyesThe member and its penalty.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
agentIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { enabled?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
query{ active?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryTelephonyCallQuerynoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
conferenceIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
sessionIdstringyesIdentifier (UUID) of the conference session.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { conference_id?: string; active?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
versionIdstringyesIdentifier (UUID) of the configuration version.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyAgentInyesThe human agent.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyBlockInyesThe scope, the extension and the reason.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyConferenceInyesThe conference room.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyExtensionInyesThe extension.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyIvrFlowInyesThe IVR flow.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
flowIdstringyesIdentifier (UUID) of the IVR flow.
bodyTelephonyIvrVersionInyesThe graph: start (node id) and nodes (id to node with type start, play, menu, time_condition, transfer, voicemail, queue, voice_agent or hangup).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyNumberInyesThe phone number.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyPoolInyesThe pool.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyQueueInyesThe call queue.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyRuleInyesThe routing rule.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyTrunkInyesThe SIP trunk.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyVoiceAgentInyesThe AI voice agent.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
agentIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
conferenceIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
extensionIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
flowIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
promptIdstringyesIdentifier (UUID) of the IVR prompt.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
numberIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queueIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
recordingIdstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
bodyTelephonyDeleteInnoOptional reason kept in the audit trail.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
ruleIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
trunkIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
voiceAgentIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
messageIdstringyesIdentifier (UUID) of the voicemail message.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
promptIdstringyesIdentifier (UUID) of the IVR prompt.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
recordingIdstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
bodyTelephonyDrainInyesThe destination and its new state.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
extensionIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { enabled?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { status?: "open" | "acknowledged"; kind?: "cps" | "concurrency" | "extension_volume" | "destination_refused" }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
callIdstringyesIdentifier (UUID) of the call record, in the caller's tenant (another tenant's call answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
linkedIdstringyesAsterisk linkedid of the active call (linkedid of GET /v1/telephony/active-calls).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
query{ cluster_id?: string }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryTelephonyCallQuerynoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryTelephonyRecordingQuerynoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
flowIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
flowIdstringyesIdentifier (UUID) of the IVR flow.
versionnumberyesVersion number (1, 2, ...).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
flowIdstringyesIdentifier (UUID) of the IVR flow.
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
promptIdstringyesIdentifier (UUID) of the IVR prompt.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
blockIdstringyesIdentifier (UUID) of the block.
bodyTelephonyLiftInyesWhy the block is lifted.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
messageIdstringyesIdentifier (UUID) of the voicemail message.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
messageIdstringyesIdentifier (UUID) of the voicemail message.
query{ read?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
numberIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { enabled?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
flowIdstringyesIdentifier (UUID) of the IVR flow.
versionnumberyesVersion number (1, 2, ...).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
bodyTelephonyPublishIn{}noWhy the configuration is published.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyQuotasInyesThe complete quotas; omitted fields take their default.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyRuntimeSettingsInyesThe complete runtime settings; omitted fields take their default.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonySettingsInyesThe complete settings; omitted fields take their default.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queueIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queueIdstringyesIdentifier (UUID) of the queue.
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParamsnoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
recordingIdstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryTelephonyRecordingQuerynoQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queueIdstringyesIdentifier (UUID) of the queue.
memberIdstringyesIdentifier (UUID) of the queue member.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
bodyTelephonyRollbackInyesThe version to publish again and why.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
ruleIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { enabled?: boolean; direction?: "inbound" | "outbound" }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
recordingIdstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
bodyTelephonyLegalHoldInyesThe hold and its reason.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
query{ window_hours?: number }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyInventorySyncInyesThe Asterisk instance of the Manager and the options of a new pool.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
linkedIdstringyesAsterisk linkedid of the active call (linkedid of GET /v1/telephony/active-calls).
bodyTelephonyTransferInyesThe target and, optionally, the channel to move.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
trunkIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { enabled?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
agentIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyAgentIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
conferenceIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyConferenceIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
extensionIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyExtensionIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
flowIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyIvrFlowIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
numberIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyNumberIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
poolIdstringyesIdentifier (UUID) of the PBX pool.
bodyPartial<TelephonyPoolIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queueIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyQueueIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queueIdstringyesIdentifier (UUID) of the queue.
memberIdstringyesIdentifier (UUID) of the queue member.
bodyTelephonyMemberPatchyesThe new penalty.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
ruleIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyRuleIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
trunkIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyTrunkIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
voiceAgentIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyPartial<TelephonyVoiceAgentIn>yesThe fields to change.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
namestringyesName of the prompt, unique in the tenant (lowercase letters, digits, -).
audioTelephonyAudioyesRaw bytes of the PCM WAV file (10 MB at most), sent as is with Content-Type: audio/wav; anything else is refused before sending.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
voiceAgentIdstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { enabled?: boolean }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
queryListParams & { mailbox?: string; status?: "new" | "read" }noQuery string parameters of the route.
optsCallOptionsnoPer 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).

NameTypeDefaultRequiredDescription
bodyTelephonyWebrtcInyesThe extension and the lifetime.
optsCallOptionsnoPer 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).