IraVoice is a bidirectional media server that brings together Dialer, Recorder, and BotStream modules to enable seamless telephony services for both legacy CX systems and modern conversational AI applications.
Core Concepts
🌐 IraVoice Cluster: A cluster of media servers in one geographical region running IraVoice. Each cluster can be associated with one or more SIP trunks. Typically we recommend multi cluster setup for high availability.
📡 Trunk: A SIP trunk configured in IraVoice that connects to a telephony provider. SIP trunk can either be from a Tier 1 carrier or a VNO. Each trunk is associated with one cluster and can be used by one or more campaigns.
🎯 Campaign: A logical grouping of one or more trunks from potentially multiple clusters. You can allocate partial capacity and partial caller ID range of each trunk to different campaigns. When a make call request is made for a campaign, the system will pick a trunk and caller ID from that campaign based on the availibility and allotted capacity in real time.
call_params object in the request payload controls CPA behavior, media streaming, webhook delivery, inactivity handling, and recording.
Call Params
Example
Code
Call Progress Analysis (CPA)
Applicable only for outbound calls whencpa_config is included in the makecall request.
IraCPA analyzes the initial call audio to classify the answer type and detect machine-generated responses, tones, silence, and screening behavior.
The first CPA event is typically detected within the first 1.75 seconds of answered audio.
Primary CPA Events
| Code | Meaning |
|---|---|
LV | Live human |
AM | Answering machine |
FX | Fax machine |
SIT | Special Information Tones |
IBP | Immediate beep detected immediately after answer |
break_event behavior, analysis may continue after the initial classification to detect additional events.
Extended CPA Events
| Code | Meaning |
|---|---|
SL | Silence |
BP | Beep detected after initial answer classification |
EAM | Extended Answering Machine detection after ringtone progression |
CS | Call screening detected |
stream_on_cpa_eventsdrop_on_cpa_events
| Parameter | Type | Description |
|---|---|---|
stream_on_cpa_events | array<string> | Starts WebSocket media streaming when the detected CPA event matches any configured value. Default: ["LV"] |
drop_on_cpa_events | array<string> | Terminates the call when the detected CPA event matches any configured value. Default: ["FX", "AM"] |
WebSocket Streaming
Streams bidirectional audio between IraVoice and the configured WebSocket endpoint.- Audio from the call is streamed to the WebSocket server.
- Audio received from the WebSocket server is injected into the live call.
| Parameter | Type | Description |
|---|---|---|
websocket_host | string | Hostname of the WebSocket server. Requires websocket_port and websocket_app. |
websocket_port | integer | WebSocket server port. Used only when websocket_host is configured. |
websocket_app | string | Path component. |
streaming_useraudio | boolean | Controls upstream audio delivery mode.true → streams audio continuously.false → buffers audio till speech ends and sends it as a WAV file. |
stream_frame_size_ms | integer | Duration of each audio chunk in milliseconds. Default: 200Minimum: 20Chunking is time-based, not RTP packet-based. |
stt_sampling_rate | integer | Sampling rate (Hz) for audio streamed IraVoice → AI orchestration layer. Range: 8000-48000 |
tts_sampling_rate | integer | Sampling rate (Hz) for audio streamed AI orchestration layer → IraVoice. Range: 8000-48000 |
Example WebSocket endpoint construction
| Input | Result |
|---|---|
websocket_host = bot.example.comwebsocket_port = 8443websocket_app = voicebot | wss://bot.example.com:8443/voicebot |
Bot Inactivity Handling
Terminates the call if no audio is received from the WebSocket server for a continuous duration defined bybot_inactivity_limit.
Disabled when:
bot_inactivity_limitis omitted, orbot_inactivity_limit = 0
| Parameter | Type | Description |
|---|---|---|
bot_inactivity_limit | integer | Maximum allowed inactivity duration in seconds before the call is dropped. Default: 0 (disabled) |
Webhooks & Events
| Parameter | Type | Description |
|---|---|---|
event_url | string | HTTP webhook endpoint that receives call lifecycle events via POST. Events include started, ringing, answered, hangup, and related state transitions.If configured, events are always emitted. |
Recording
| Parameter | Type | Description |
|---|---|---|
disable_recording | boolean | Disables call recording when set to true.Default: false (recording enabled). |
Noise Suppression
| Parameter | Type | Description |
|---|---|---|
denoise | string | WebRTC NS - Lightweight, standard noise suppression optimized for high-volume scaling. Hush - Premium, AI-driven speaker isolation offering superior clarity at a higher compute cost. |
Critical Constraints
| Topic | Details |
|---|---|
Transport Security | Only wss:// endpoints are supported.ws:// connections are rejected.The WebSocket server must present a valid SSL certificate. |
WebSocket Protocol | Refer to the WebSocket Message Model section for the complete message schema. |
Webhook Payload | Refer to the Webhook Event URL Payload section for webhook request structure. |
Example usecase: Transfering / Bridging voicebot call to a human agent. When you trigger the first outbound call, the response JSON will have the cluster and call_uuid. Save the cluster value for later use.
If the voicebot requires to send call to human agent, call makecalldirect API with the cluster set to that of the original call.
The campaign_name will be the campaign exclusively created to send calls to human agents through suitable SIP trunk.
Checks if the call_uuid supplied is of a call initiated via the Distributor.
If yes, it looks up which cluster the call was placed in and sends the dropcall request to that cluster.
Checks if the call_uuid supplied is of a call initiated via the Distributor.
If yes, it looks up which cluster the call was placed in and sends the stop stream request to that cluster.
Example usecase: Stop the stream to voicebot before transfering or bridging the call with human agent.
Checks if the first_uuid and second_uuid supplied are of a calls initiated via the Distributor and if both calls are in the same cluster.
If yes, LD sends the new bridge request to that cluster.
If the deflect is set to true, then SIP REFER will be sent to the trunk through which the call was made.
If the deflect is set to false, then the call transfer is internal within IraSwitch, for example to an extension or to a queue.

