Skip to main content

telephony.go (package eai)

Source: sdks/go/telephony.go. Back to the Go 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.

Class TelephonyService​

TelephonyService groups the endpoints of Navin telephony (ADR-0173): settings, quotas, PBX pools, SIP trunks, phone numbers, extensions, routing rules, IVR flows, queues, human and AI voice agents, conferences, publication of the configuration to the engines installed by the Navin Manager (Asterisk, Kamailio, LiveKit), calls, recordings, voicemail, IVR prompts and fraud protection. Writers are platform_admin and tenant_admin; secrets are write only (has_* flags) and every change is audited.

TelephonyService.AcknowledgeFraudAlert​

AcknowledgeFraudAlert(ctx context.Context, alertID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
alertIDstringyesIdentifier (UUID) of the fraud alert.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Acknowledge a fraud alert". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.AddQueueMember​

AddQueueMember(ctx context.Context, queueID string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
queueIDstringyesIdentifier (UUID) of the queue.
bodyanyyesThe member and its penalty.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Add a member to a queue". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateAgent​

CreateAgent(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe human agent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a human agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateBlock​

CreateBlock(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe scope, the extension and the reason.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Block the tenant or an extension". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateConference​

CreateConference(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe conference room.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a conference room". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateExtension​

CreateExtension(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe extension.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create an extension". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateInfrastructurePool​

CreateInfrastructurePool(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe Asterisk instance of the Manager and the options of a new pool.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create or refresh a PBX pool from the Manager inventory". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateIvrFlow​

CreateIvrFlow(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe IVR flow.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create an IVR flow". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateIvrVersion​

CreateIvrVersion(ctx context.Context, flowID string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
flowIDstringyesIdentifier (UUID) of the IVR flow.
bodyanyyesThe graph: start (node id) and nodes (id to node with type start, play, menu, time_condition, transfer, voicemail, queue, voice_agent or hangup).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a version of an IVR flow". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateNumber​

CreateNumber(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe phone number.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a phone number". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreatePool​

CreatePool(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe pool.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Declare a PBX pool". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateQueue​

CreateQueue(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe call queue.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a call queue". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateRoutingRule​

CreateRoutingRule(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe routing rule.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a routing rule". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateTrunk​

CreateTrunk(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe SIP trunk.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a SIP trunk". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.CreateVoiceAgent​

CreateVoiceAgent(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe AI voice agent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create an AI voice agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteAgent​

DeleteAgent(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a human agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteConference​

DeleteConference(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a conference room". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteExtension​

DeleteExtension(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete an extension". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteIvrFlow​

DeleteIvrFlow(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete an IVR flow". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteNumber​

DeleteNumber(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a phone number". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeletePool​

DeletePool(ctx context.Context, poolID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a PBX pool". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeletePrompt​

DeletePrompt(ctx context.Context, promptID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
promptIDstringyesIdentifier (UUID) of the IVR prompt.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete an IVR prompt". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteQueue​

DeleteQueue(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a call queue". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteRecording​

DeleteRecording(ctx context.Context, recordingID string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
recordingIDstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
bodyanyyesOptional reason kept in the audit trail.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a recording". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteRoutingRule​

DeleteRoutingRule(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a routing rule". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteTrunk​

DeleteTrunk(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a SIP trunk". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteVoiceAgent​

DeleteVoiceAgent(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete an AI voice agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DeleteVoicemail​

DeleteVoicemail(ctx context.Context, messageID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
messageIDstringyesIdentifier (UUID) of the voicemail message.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a voicemail message". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DownloadPrompt​

DownloadPrompt(ctx context.Context, promptID string, opts ...CallOption) (*TelephonyDownloadLink, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
promptIDstringyesIdentifier (UUID) of the IVR prompt.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*TelephonyDownloadLink, error). A TelephonyDownloadLink: TelephonyDownloadLink is the presigned GET returned for a recording or an IVR prompt (valid expires_seconds). The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DownloadRecording​

DownloadRecording(ctx context.Context, recordingID string, opts ...CallOption) (*TelephonyDownloadLink, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
recordingIDstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*TelephonyDownloadLink, error). A TelephonyDownloadLink: TelephonyDownloadLink is the presigned GET returned for a recording or an IVR prompt (valid expires_seconds). The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.DrainPool​

DrainPool(ctx context.Context, poolID string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
bodyanyyesThe destination and its new state.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Drain or restore a dispatcher destination". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.EventStreams​

EventStreams(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the AMI event connections". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetAgent​

GetAgent(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a human agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetCall​

GetCall(ctx context.Context, callID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
callIDstringyesIdentifier (UUID) of the call record, in the caller's tenant (another tenant's call answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a call". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetConference​

GetConference(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a conference room". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetConferenceSession​

GetConferenceSession(ctx context.Context, sessionID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
sessionIDstringyesIdentifier (UUID) of the conference session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a conference session". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetConfigVersion​

GetConfigVersion(ctx context.Context, versionID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
versionIDstringyesIdentifier (UUID) of the configuration version.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a configuration version". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetExtension​

GetExtension(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read an extension". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetIvrFlow​

GetIvrFlow(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read an IVR flow". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetIvrVersion​

GetIvrVersion(ctx context.Context, flowID string, version string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
flowIDstringyesIdentifier (UUID) of the IVR flow.
versionstringyesVersion number (1, 2, ...).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a version of an IVR flow". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetNumber​

GetNumber(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a phone number". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetPool​

GetPool(ctx context.Context, poolID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a PBX pool". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetPrompt​

GetPrompt(ctx context.Context, promptID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
promptIDstringyesIdentifier (UUID) of the IVR prompt.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read an IVR prompt". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetQueue​

GetQueue(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a call queue". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetRecording​

GetRecording(ctx context.Context, recordingID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
recordingIDstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a recording". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetRoutingRule​

GetRoutingRule(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a routing rule". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetTrunk​

GetTrunk(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a SIP trunk". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.GetVoiceAgent​

GetVoiceAgent(ctx context.Context, id string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read an AI voice agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.HangUp​

HangUp(ctx context.Context, linkedID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
linkedIDstringyesAsterisk linkedid of the active call (linkedid of GET /v1/telephony/active-calls).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Hang up an active call". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.Infrastructure​

Infrastructure(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the telephony infrastructure of the Navin Manager". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.LiftBlock​

LiftBlock(ctx context.Context, blockID string, reason string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
blockIDstringyesIdentifier (UUID) of the block.
reasonstringyesReason kept with the block and in the audit trail.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Lift a block". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListActiveCalls​

ListActiveCalls(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the active calls". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListAgents​

ListAgents(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListBlocks​

ListBlocks(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListCalls​

ListCalls(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListConferenceSessions​

ListConferenceSessions(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListConferences​

ListConferences(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListExtensions​

ListExtensions(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListFraudAlerts​

ListFraudAlerts(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListIvrFlows​

ListIvrFlows(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListIvrVersions​

ListIvrVersions(ctx context.Context, flowID string, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
flowIDstringyesIdentifier (UUID) of the IVR flow.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListNumbers​

ListNumbers(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListPoolVersions​

ListPoolVersions(ctx context.Context, poolID string, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListPools​

ListPools(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListPrompts​

ListPrompts(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListQueueMembers​

ListQueueMembers(ctx context.Context, queueID string, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
queueIDstringyesIdentifier (UUID) of the queue.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListQueues​

ListQueues(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListRecordings​

ListRecordings(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListRoutingRules​

ListRoutingRules(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListTrunks​

ListTrunks(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListVoiceAgents​

ListVoiceAgents(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListVoicemail​

ListVoicemail(ctx context.Context, opts ...CallOption) (*Page, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ListenVoicemail​

ListenVoicemail(ctx context.Context, messageID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
messageIDstringyesIdentifier (UUID) of the voicemail message.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Listen to a voicemail message". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.MarkVoicemailRead​

MarkVoicemailRead(ctx context.Context, messageID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
messageIDstringyesIdentifier (UUID) of the voicemail message.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Mark a voicemail message read". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.Preview​

Preview(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Preview the configuration of the tenant". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.PreviewPool​

PreviewPool(ctx context.Context, poolID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Preview the configuration of a pool". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.PublishIvrVersion​

PublishIvrVersion(ctx context.Context, flowID string, version string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
flowIDstringyesIdentifier (UUID) of the IVR flow.
versionstringyesVersion number (1, 2, ...).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Publish a version of an IVR flow". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.PublishPool​

PublishPool(ctx context.Context, poolID string, reason string, opts ...CallOption) (*TelephonyOperation, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
reasonstringyesReason, kept with the version and in the audit.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*TelephonyOperation, error). A TelephonyOperation: TelephonyOperation is the 202 answer of a publication or a rollback: the new configuration version and the long operation that delivers it (follow it with Operations.Get). The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.PutQuotas​

PutQuotas(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe complete quotas; omitted fields take their default.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Set the telephony quotas". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.PutRuntimeSettings​

PutRuntimeSettings(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe complete runtime settings; omitted fields take their default.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Set the runtime settings". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.PutSettings​

PutSettings(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe complete settings; omitted fields take their default.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Set the telephony settings". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.Quotas​

Quotas(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the telephony quotas". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.ReconcilePool​

ReconcilePool(ctx context.Context, poolID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Reconcile the routing of a pool". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.RemoveQueueMember​

RemoveQueueMember(ctx context.Context, queueID string, memberID string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
queueIDstringyesIdentifier (UUID) of the queue.
memberIDstringyesIdentifier (UUID) of the queue member.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Remove a member from a queue". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.RollbackPool​

RollbackPool(ctx context.Context, poolID string, version int, reason string, opts ...CallOption) (*TelephonyOperation, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
versionintyesNumber of the version to publish again.
reasonstringyesReason, kept with the version and in the audit.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*TelephonyOperation, error). A TelephonyOperation: TelephonyOperation is the 202 answer of a publication or a rollback: the new configuration version and the long operation that delivers it (follow it with Operations.Get). The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.RuntimeSettings​

RuntimeSettings(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the runtime settings". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.SetLegalHold​

SetLegalHold(ctx context.Context, recordingID string, legalHold bool, reason string, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
recordingIDstringyesIdentifier (UUID) of the recording, in the caller's tenant (another tenant's recording answers 404).
legalHoldboolyestrue: hold the recording; false: release it.
reasonstringyesReason kept in the audit trail (300 characters at most).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Set the legal hold of a recording". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.Settings​

Settings(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the telephony settings". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.Stats​

Stats(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the live statistics". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.Transfer​

Transfer(ctx context.Context, linkedID string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
linkedIDstringyesAsterisk linkedid of the active call (linkedid of GET /v1/telephony/active-calls).
bodyanyyesThe target and, optionally, the channel to move.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Transfer an active call". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateAgent​

UpdateAgent(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change a human agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateConference​

UpdateConference(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change a conference room". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateExtension​

UpdateExtension(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change an extension". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateIvrFlow​

UpdateIvrFlow(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change an IVR flow". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateNumber​

UpdateNumber(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change a phone number". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdatePool​

UpdatePool(ctx context.Context, poolID string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
poolIDstringyesIdentifier (UUID) of the PBX pool.
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change a PBX pool". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateQueue​

UpdateQueue(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change a call queue". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateQueueMember​

UpdateQueueMember(ctx context.Context, queueID string, memberID string, penalty int, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
queueIDstringyesIdentifier (UUID) of the queue.
memberIDstringyesIdentifier (UUID) of the queue member.
penaltyintyesNew penalty, 0 to 100.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change the penalty of a queue member". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateRoutingRule​

UpdateRoutingRule(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change a routing rule". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateTrunk​

UpdateTrunk(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change a SIP trunk". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UpdateVoiceAgent​

UpdateVoiceAgent(ctx context.Context, id string, body any, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
idstringyesIdentifier (UUID) of the object, in the caller's tenant (another tenant's object answers 404).
bodyanyyesThe fields to change.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change an AI voice agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.UploadPrompt​

UploadPrompt(ctx context.Context, name string, wav []byte, opts ...CallOption) (json.RawMessage, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
namestringyesName of the prompt, unique in the tenant (lowercase letters, digits, -).
wav[]byteyesRaw bytes of the WAV file, sent as is with Content-Type: audio/wav.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Upload an IVR prompt". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

TelephonyService.WebRTCCredentials​

WebRTCCredentials(ctx context.Context, extensionID string, ttlSeconds int, opts ...CallOption) (*TelephonyWebRTCCredentials, error)

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
ctxcontext.ContextyesContext of the call: cancellation and deadline.
extensionIDstringyesWebRTC extension of the tenant.
ttlSecondsintyesLifetime of the credentials, 60 to 3600 seconds (default 3600).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*TelephonyWebRTCCredentials, error). A TelephonyWebRTCCredentials: TelephonyWebRTCCredentials are the ephemeral SIP credentials of a WebRTC extension (one hour at most). The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

Presigned GET returned for a recording or an IVR prompt, valid for ExpiresSeconds.

Fields:

NameTypeRequiredDescription
URL (url)stringyesPresigned URL to read the audio with a plain GET, without credentials.
Method (method)stringyesHTTP method to use on the URL, always GET.
ExpiresSeconds (expires_seconds)intyesLifetime of the URL in seconds (300).
ExpiresAt (expires_at)stringyesExpiry time of the URL, ISO 8601.
ContentType (content_type)stringyesMedia type of the audio, for example audio/wav.
SizeBytes (size_bytes)int64yesSize of the audio object in bytes.
SHA256 (sha256)stringyesSHA-256 of the stored audio, to check the downloaded bytes.

Model TelephonyWebRTCCredentials​

Ephemeral SIP credentials of a WebRTC extension (one hour at most), for the Kamailio auth_ephemeral module.

Fields:

NameTypeRequiredDescription
Username (username)stringyesSIP user name, expiry timestamp and endpoint joined by a colon.
Password (password)stringyesSIP password signed by the Control Plane for this user name.
ExpiresAt (expires_at)stringyesExpiry time of the credentials, ISO 8601.
TTLSeconds (ttl_seconds)intyesSeconds left before the credentials expire.
SIPURI (sip_uri)stringyesSIP URI to register, sip:<endpoint>@<domain>.
WSURL (ws_url)stringyesSecure WebSocket address of the SIP proxy for the softphone.
Realm (realm)stringyesSIP authentication realm, the SIP domain of the tenant.
Endpoint (endpoint)stringyesName of the extension endpoint on the PBX.
Number (number)stringyesNumber of the extension.

Model TelephonyOperation​

202 answer of a publication or a rollback: the new configuration version and the long operation that delivers it (follow it with Operations.Get).

Fields:

NameTypeRequiredDescription
OperationID (operation_id)stringyesId of the long operation that delivers the version.
VersionID (version_id)stringyesId of the configuration version created.

Model TelephonyCallFilter​

Filters of ListCalls; empty fields are not sent.

Fields:

NameTypeRequiredDescription
DirectionstringyesDirection of the call: inbound, outbound, internal or unknown.
BranchstringyesBranch that handled the call: pbx or ai.
ExtensionstringyesExtension number (2 to 8 digits).
QueuestringyesName of the call queue.
NumberstringyesCaller or called number.
DispositionstringyesOutcome of the call: ANSWERED, NO ANSWER, BUSY, FAILED or CONGESTION.
Sincetime.TimeyesCalls started at or after this time (sent in UTC, RFC 3339).
Untiltime.TimeyesCalls started before this time (sent in UTC, RFC 3339).
Answered*boolnoOnly answered calls (true) or unanswered ones (false); nil sends no filter.

Functions​

WithTelephonyCallFilter​

WithTelephonyCallFilter(f TelephonyCallFilter) CallOption

WithTelephonyCallFilter turns a TelephonyCallFilter into query parameters of ListCalls.

NameTypeDefaultRequiredDescription
fTelephonyCallFilteryesFilters to send; empty fields and a nil Answered are left out.

Returns: CallOption. A CallOption to pass to ListCalls, combined with WithLimit and WithCursor.