### Docker Testbed Startup Output
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
This is an example of the expected output when the Docker testbed successfully starts. It shows the creation of various services.
```bash
$ docker-compose -f test/docker-compose-testbed.yaml up -d
Creating network "test_fs" with driver "bridge"
Creating test_webhook-transcribe_1 ... done
Creating test_webhook-decline_1 ... done
Creating test_mysql_1 ... done
Creating test_docker-host_1 ... done
Creating test_webhook-gather_1 ... done
Creating test_webhook-say_1 ... done
Creating test_freeswitch_1 ... done
Creating test_influxdb_1 ... done
Creating test_redis_1 ... done
Creating test_drachtio_1 ... done
```
--------------------------------
### Start Docker Testbed
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
Use this command to start the Docker-based test environment. It may take several minutes to complete due to database seeding.
```bash
docker-compose -f test/docker-compose-testbed.yaml up -d
```
--------------------------------
### List Running Docker Containers
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
After starting the testbed, use `docker ps` to verify that all required containers are running.
```bash
docker ps
```
--------------------------------
### Docker Containers Running Output
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
This is an example of the output from `docker ps` showing the running containers for the Jambonz testbed.
```bash
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
abbc3594f390 drachtio/drachtio-server:latest "/entrypoint.sh drac…" About a minute ago Up About a minute 0.0.0.0:9060->9022/tcp test_drachtio_1
1f384a274f87 redis:5-alpine "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 0.0.0.0:16379->6379/tcp test_redis_1
78d0bb6ec9b1 influxdb:1.8 "/entrypoint.sh infl…" 2 minutes ago Up 2 minutes 0.0.0.0:8086->8086/tcp test_influxdb_1
9616ff790709 jambonz/webhook-test-scaffold:latest "/entrypoint.sh" 2 minutes ago Up 2 minutes 0.0.0.0:3102->3000/tcp test_webhook-gather_1
7323ab273ff4 drachtio/drachtio-freeswitch-mrf:v1.10.1-full "/entrypoint.sh free…" 2 minutes ago Up 2 minutes (healthy) 0.0.0.0:8022->8021/tcp test_freeswitch_1
e45e7d28dbc7 mysql:5.7 "docker-entrypoint.s…" 2 minutes ago Up 2 minutes (healthy) 33060/tcp, 0.0.0.0:3360->3306/tcp test_mysql_1
b626e5f3067e qoomon/docker-host "/entrypoint.sh" 2 minutes ago Up 2 minutes test_docker-host_1
b0a94b5e8941 jambonz/webhook-test-scaffold:latest "/entrypoint.sh" 2 minutes ago Up 2 minutes 0.0.0.0:3101->3000/tcp test_webhook-say_1
f80adda48eb5 jambonz/webhook-test-scaffold:latest "/entrypoint.sh" 2 minutes ago Up 2 minutes 0.0.0.0:3103->3000/tcp test_webhook-transcribe_1
223db4a9c670 jambonz/webhook-test-scaffold:latest "/entrypoint.sh" 2 minutes ago Up 2 minutes 0.0.0.0:3100->3000/tcp test_webhook-decline_1
```
--------------------------------
### Start Audio Track with Say Verb
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Use the 'dub' verb to overlay audio on a call leg, such as playing a recorded message. This example starts a track named 'whisper' and uses the 'say' verb to play a message.
```json
{
"dub": {
"action": "startTrack",
"track": "whisper",
"say": {
"text": "This call may be recorded for quality purposes.",
"synthesizer": { "vendor": "google", "language": "en-US" }
}
}
}
```
--------------------------------
### pm2 Ecosystem Configuration for jambonz-feature-server
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/README.md
This is an example ecosystem.config.js file for running the jambonz-feature-server application using pm2. It includes common environment variables and settings for production deployment.
```javascript
module.exports = {
apps : [
{
name: 'jambonz-feature-server',
cwd: '/home/admin/apps/jambonz-feature-server',
script: 'app.js',
instance_var: 'INSTANCE_ID',
out_file: '/home/admin/.pm2/logs/jambonz-feature-server.log',
err_file: '/home/admin/.pm2/logs/jambonz-feature-server.log',
exec_mode: 'fork',
instances: 1,
autorestart: true,
watch: false,
max_memory_restart: '1G',
env: {
NODE_ENV: 'production',
GOOGLE_APPLICATION_CREDENTIALS: '/home/admin/credentials/gcp.json',
AWS_ACCESS_KEY_ID: 'XXXXXXXXXXXX',
AWS_SECRET_ACCESS_KEY: 'YYYYYYYYYYYYYYYYYYYYY',
AWS_REGION: 'us-west-1',
ENABLE_METRICS: 1,
STATS_HOST: '127.0.0.1',
STATS_PORT: 8125,
STATS_PROTOCOL: 'tcp',
STATS_TELEGRAF: 1,
AWS_SNS_TOPIC_ARN: 'arn:aws:sns:us-west-1:xxxxxxxxxxx:terraform-20201107200347128600000002',
JAMBONES_NETWORK_CIDR: '172.31.0.0/16',
JAMBONES_MYSQL_HOST: 'aurora-cluster-jambonz.cluster-yyyyyyyyyyy.us-west-1.rds.amazonaws.com',
JAMBONES_MYSQL_USER: 'admin',
JAMBONES_MYSQL_PASSWORD: 'foobarbz',
JAMBONES_MYSQL_DATABASE: 'jambones',
JAMBONES_MYSQL_CONNECTION_LIMIT: 10,
JAMBONES_REDIS_HOST: 'jambonz.zzzzzzz.0001.usw1.cache.amazonaws.com',
JAMBONES_REDIS_PORT: 6379,
JAMBONES_LOGLEVEL: 'debug',
HTTP_PORT: 3000,
DRACHTIO_HOST: '127.0.0.1',
DRACHTIO_PORT: 9022,
DRACHTIO_SECRET: 'sharedsecret',
JAMBONES_SBCS: '172.31.32.10',
JAMBONES_FREESWITCH: '127.0.0.1:8021:sharedsecret'
}
}]
};
```
--------------------------------
### Play - Audio file from URL with loop
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Fetches and plays an audio file from a URL, supporting looping indefinitely. Set `earlyMedia` to `false` to prevent playback before call setup is complete.
```json
{
"play": {
"url": "https://cdn.example.com/hold-music.mp3",
"loop": "forever",
"earlyMedia": false
}
}
```
--------------------------------
### Run Regression Test Suite
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
Execute the regression tests. This script will start the Docker network if it's not already running.
```bash
./run-tests.sh
```
--------------------------------
### Conference Room Configuration
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Adds a caller to a named conference room with options for beep on entry, starting the conference when the first participant joins, and disabling end-on-exit. It also configures wait music, status events, and recording.
```json
{
"conference": {
"name": "support-room-42",
"beep": true,
"startConferenceOnEnter": true,
"endConferenceOnExit": false,
"joinMuted": false,
"maxParticipants": 10,
"waitHook": "/conference-hold-music",
"statusHook": "/conference-events",
"statusEvents": ["join", "leave", "start-talking", "stop-talking"],
"record": {
"action": "record",
"recordingStatusHook": "/recording-done"
}
}
}
```
--------------------------------
### Configure Test Environment and Run Tests
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
Set up the necessary environment variables for speech credentials (GCP and AWS) and a JWT secret, then execute the test suite. The run-tests.sh script is not committed to version control to protect credentials.
```bash
#!/bin/bash
GCP_JSON_KEY='{"type":"service_account","project_id":"...etc"}' \
AWS_ACCESS_KEY_ID='your-aws-access-key-id' \
AWS_SECRET_ACCESS_KEY='your-aws-secret-access-key' \
AWS_REGION='us-east-1' \
JWT_SECRET='foobar' \
npm test
```
--------------------------------
### Configure Jambonz Feature Server Environment Variables
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Set environment variables to configure the jambonz-feature-server. This includes essential connection details for Drachtio, FreeSWITCH, MySQL, and Redis, as well as optional settings for speech credentials, observability, and tuning.
```bash
# Minimum required configuration
export DRACHTIO_HOST=127.0.0.1
export DRACHTIO_PORT=9022
export DRACHTIO_SECRET=sharedsecret
export JAMBONES_FREESWITCH=127.0.0.1:8021:JambonzR0ck$
export JAMBONES_MYSQL_HOST=127.0.0.1
export JAMBONES_MYSQL_USER=admin
export JAMBONES_MYSQL_PASSWORD=secret
export JAMBONES_MYSQL_DATABASE=jambones
export JAMBONES_REDIS_HOST=127.0.0.1
export JAMBONES_REDIS_PORT=6379
export JAMBONES_NETWORK_CIDR=172.31.0.0/16
export JAMBONES_SBCS=172.31.32.10
export HTTP_PORT=3000
export ENCRYPTION_SECRET=my-encryption-secret
# Optional — Speech credentials
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/gcp.json
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_REGION=us-east-1
export DEEPGRAM_API_KEY=dg_...
export MICROSOFT_REGION=eastus
export MICROSOFT_API_KEY=abc123
# Optional — Observability
export JAMBONES_LOGLEVEL=debug
export JAMBONES_OTEL_ENABLED=1
export JAMBONES_OTEL_SERVICE_NAME=jambonz-feature-server
export OTEL_EXPORTER_JAEGER_ENDPOINT=http://jaeger:14268/api/traces
# Optional — WebSocket tuning
export JAMBONES_WS_HANDSHAKE_TIMEOUT_MS=1500
export JAMBONES_WS_MAX_PAYLOAD=24576
export JAMBONES_WS_PING_INTERVAL_MS=30000
# Optional — HTTP client
export JAMBONES_HTTP_TIMEOUT=10000
export JAMBONES_HTTP_PROXY_IP=10.0.0.1
export JAMBONES_HTTP_PROXY_PORT=3128
export HTTP_POOL=1
export HTTP_POOLSIZE=10
# Optional — Recordings
export JAMBONZ_RECORD_WS_BASE_URL=wss://recorder.example.com
export JAMBONZ_RECORD_WS_USERNAME=user
export JAMBONZ_RECORD_WS_PASSWORD=pass
```
--------------------------------
### LLM - Ultravox with MCP Tool Server
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Connects the call to a real-time speech-to-speech LLM using Ultravox and integrates with MCP tool servers for extended functionality. Requires API key and specifies system prompt.
```json
// With MCP tool server
{
"llm": {
"vendor": "ultravox",
"model": "fixie-ai/ultravox",
"auth": { "apiKey": "uv-..." },
"connectOptions": { "systemPrompt": "You help users track orders." },
"mcpServers": [
{ "url": "https://tools.example.com/mcp", "name": "order-lookup" }
],
"eventHook": "/llm-events"
}
}
```
--------------------------------
### POST /conference/:callSid
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Signals a call session that is paused within a `conference` verb to resume or to act on a conference event, such as the conference starting. This endpoint returns an HTTP 202 Accepted status.
```APIDOC
## POST /conference/:callSid — Notify a conference-waiting session
### Description
Signals a call session that is paused inside a `conference` verb to resume or act on a conference event (e.g., the conference is now starting). Returns HTTP 202.
### Method
POST
### Endpoint
/conference/:callSid
### Parameters
#### Path Parameters
- **callSid** (string) - Required - The unique identifier of the call session.
#### Request Body
- **event** (string) - Required - The event to signal (e.g., "start").
- **confName** (string) - Required - The name of the conference.
### Request Example
```bash
curl -X POST http://127.0.0.1:3000/conference/550e8400-e29b-41d4-a716-446655440000 \
-H 'Content-Type: application/json' \
-d
"{
"event": "start",
"confName": "support-room-1"
}"
# HTTP 202
```
### Response
#### Success Response (202)
Indicates that the request was accepted for processing.
#### Response Example
(No specific response body is detailed in the source, but HTTP 202 is returned.)
```
--------------------------------
### Notify Conference Session
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Use the POST /conference/:callSid endpoint to signal a call session paused in a conference verb. This can be used to resume the session or act on conference events, such as the conference starting. Returns HTTP 202.
```bash
curl -X POST http://127.0.0.1:3000/conference/550e8400-e29b-41d4-a716-446655440000 \
-H 'Content-Type: application/json' \
-d '{
"event": "start",
"confName": "support-room-1"
}'
# HTTP 202
```
--------------------------------
### sip:refer
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Initiates a SIP REFER to transfer the call to another party.
```APIDOC
## sip:refer
### Description
Initiates a SIP REFER to transfer the call to another party. Supports blind and attended transfer patterns.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **sip:refer** (object) - Required - Configuration for the SIP REFER transfer.
- **referTo** (string) - Required - The SIP URI to transfer the call to.
- **referredBy** (string) - Optional - The SIP URI of the party initiating the refer.
- **actionHook** (string) - Optional - URL to send notifications about the refer result.
### Request Example
```json
{
"sip:refer": {
"referTo": "sip:supervisor@pbx.example.com",
"referredBy": "sip:agent@pbx.example.com",
"actionHook": "/after-refer"
}
}
```
```
--------------------------------
### config
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Sets session-level defaults for TTS synthesis, STT recognition, barge-in behavior, background transcription, audio recording, filler noise, and action-hook delay.
```APIDOC
## config
### Description
Sets session-wide defaults for TTS synthesis, STT recognition, barge-in behavior, background transcription, audio recording, filler noise, and action-hook delay. Applied immediately; subsequent verbs inherit these settings unless overridden.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **config** (object) - Required - Configuration settings for the session.
- **synthesizer** (object) - Optional - Default Text-to-Speech (TTS) synthesizer settings.
- **vendor** (string) - Required - The TTS vendor (e.g., 'elevenlabs').
- **voice** (string) - Required - The voice to use for synthesis.
- **language** (string) - Required - The language for synthesis (e.g., 'en-US').
- **recognizer** (object) - Optional - Default Speech-to-Text (STT) recognition settings.
- **vendor** (string) - Required - The STT vendor (e.g., 'deepgram').
- **language** (string) - Required - The language for recognition (e.g., 'en-US').
- **bargeIn** (object) - Optional - Barge-in settings.
- **enable** (boolean) - Required - Whether barge-in is enabled.
- **input** (array) - Optional - Input types that trigger barge-in (e.g., ['speech']).
- **minBargeinWordCount** (integer) - Optional - Minimum word count to trigger barge-in.
- **actionHook** (string) - Optional - URL to send barge-in events to.
- **fillerNoise** (object) - Optional - Filler noise settings.
- **enabled** (boolean) - Required - Whether filler noise detection is enabled.
- **url** (string) - Required - URL of the filler noise audio file.
- **startDelaySecs** (number) - Optional - Delay in seconds before filler noise detection starts.
- **notifyEvents** (boolean) - Optional - Whether to notify on events.
### Request Example
```json
{
"config": {
"synthesizer": {
"vendor": "elevenlabs",
"voice": "Rachel",
"language": "en-US"
},
"recognizer": {
"vendor": "deepgram",
"language": "en-US"
},
"bargeIn": {
"enable": true,
"input": ["speech"],
"minBargeinWordCount": 1,
"actionHook": "/barge-in-handler"
},
"fillerNoise": {
"enabled": true,
"url": "https://cdn.example.com/thinking.mp3",
"startDelaySecs": 1.5
},
"notifyEvents": true
}
}
```
```
--------------------------------
### LLM - OpenAI Realtime Voice Agent
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Connects the call to a real-time speech-to-speech LLM using OpenAI. Requires API key and specifies system message, voice, and temperature.
```json
// OpenAI Realtime voice agent
{
"llm": {
"vendor": "openai",
"model": "gpt-4o-realtime-preview",
"auth": { "apiKey": "sk-..." },
"connectOptions": {
"system_message": "You are a helpful customer service agent for Acme Corp.",
"voice": "alloy",
"temperature": 0.7
},
"eventHook": "/llm-events",
"toolHook": "/llm-tools"
}
}
```
--------------------------------
### play
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Fetches and plays an audio file from a URL. Supports looping, seek offset, timeout, and early media.
```APIDOC
## play
### Description
Fetches and plays an audio file (MP3, WAV). Supports looping, seek offset, timeout, and early media.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **play** (object) - Required - Configuration for playing audio.
- **url** (string) - Required - The URL of the audio file to play.
- **loop** (string) - Optional - How many times to loop the audio. 'forever' for infinite loop.
- **earlyMedia** (boolean) - Optional - Whether to play audio before the call is fully established. Defaults to false.
- **timeoutSecs** (integer) - Optional - Timeout in seconds for playing the audio.
### Request Example
```json
{
"play": {
"url": "https://cdn.example.com/hold-music.mp3",
"loop": "forever",
"earlyMedia": false
}
}
// Single play with timeout
{
"play": {
"url": "https://cdn.example.com/beep.wav",
"timeoutSecs": 5
}
}
```
```
--------------------------------
### Initiate Outbound Call
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Use the POST /createCall endpoint to initiate an outbound call. Supports 'phone', 'user', and 'sip' target types. The response includes the new callSid and SIP Call-ID.
```bash
curl -s -X POST http://127.0.0.1:3000/createCall \
-H 'Content-Type: application/json' \
-d '{
"account_sid": "abc123",
"application_sid": "app456",
"from": "+15551234567",
"to": {
"type": "phone",
"number": "+15559876543"
},
"call_hook": {
"url": "https://my-app.example.com/call-handler",
"method": "POST"
},
"call_status_hook": {
"url": "https://my-app.example.com/call-status"
},
"tag": { "campaignId": "spring-promo" }
}'
# Success response (HTTP 201)
# { "sid": "550e8400-e29b-41d4-a716-446655440000", "callId": "abc@127.0.0.1" }
```
```bash
curl -X POST http://127.0.0.1:3000/createCall \
-H 'Content-Type: application/json' \
-d '{
"account_sid": "abc123",
"from": "sales",
"to": { "type": "user", "name": "alice" },
"call_hook": { "url": "https://my-app.example.com/voicemail" }
}'
```
```bash
curl -X POST http://127.0.0.1:3000/createCall \
-H 'Content-Type: application/json' \
-d '{
"account_sid": "abc123",
"from": "+15551234567",
"to": { "type": "sip", "sipUri": "sip:bob@pbx.example.com" },
"call_hook": { "url": "wss://my-app.example.com/ws" }
}'
```
--------------------------------
### POST /createCall
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Initiates a new outbound SIP call. This endpoint supports various target types including phone numbers, registered SIP users, and raw SIP URIs. It returns the call SID and Call-ID once the INVITE is sent, with the call proceeding asynchronously.
```APIDOC
## POST /createCall — Initiate an outbound call
### Description
Creates and launches a new outbound SIP call from a REST payload. Supports `phone`, `user` (SIP registrant), and `sip` target types. Returns the new `callSid` and SIP `Call-ID` as soon as the INVITE is sent (HTTP 201); the call proceeds asynchronously.
### Method
POST
### Endpoint
/createCall
### Parameters
#### Request Body
- **account_sid** (string) - Required - The account SID.
- **application_sid** (string) - Required - The application SID.
- **from** (string) - Required - The caller ID.
- **to** (object) - Required - The recipient of the call.
- **type** (string) - Required - Type of the recipient ('phone', 'user', or 'sip').
- **number** (string) - Required if type is 'phone' - The phone number.
- **name** (string) - Required if type is 'user' - The user name.
- **sipUri** (string) - Required if type is 'sip' - The SIP URI.
- **call_hook** (object) - Optional - Webhook for call events.
- **url** (string) - Required - The URL for the webhook.
- **method** (string) - Optional - The HTTP method for the webhook (default: POST).
- **call_status_hook** (object) - Optional - Webhook for call status updates.
- **url** (string) - Required - The URL for the status webhook.
- **tag** (object) - Optional - Custom tags for the call.
### Request Example
```bash
curl -s -X POST http://127.0.0.1:3000/createCall \
-H 'Content-Type: application/json' \
-d
"{
"account_sid": "abc123",
"application_sid": "app456",
"from": "+15551234567",
"to": {
"type": "phone",
"number": "+15559876543"
},
"call_hook": {
"url": "https://my-app.example.com/call-handler",
"method": "POST"
},
"call_status_hook": {
"url": "https://my-app.example.com/call-status"
},
"tag": { "campaignId": "spring-promo" }
}"
```
### Response
#### Success Response (201)
- **sid** (string) - The unique identifier for the call.
- **callId** (string) - The SIP Call-ID of the call.
#### Response Example
```json
{
"sid": "550e8400-e29b-41d4-a716-446655440000",
"callId": "abc@127.0.0.1"
}
```
```
--------------------------------
### Run Lint Check
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
Execute the linting process to ensure code adheres to project conventions. This command checks for style and potential errors.
```bash
#!/bin/bash
npm run jslint
```
--------------------------------
### say
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Synthesizes and plays TTS audio using any configured vendor. Supports plain text, SSML, looping, streaming TTS, and per-verb synthesizer overrides.
```APIDOC
## say — Text-to-speech playback
### Description
Synthesizes and plays TTS audio using any configured vendor. Supports plain text, SSML, looping, streaming TTS (for WebSocket apps), per-verb synthesizer overrides, and a fallback vendor if the primary fails. Long texts are automatically chunked.
### Usage
#### Standard TTS
```json
{
"say": {
"text": "Welcome to Acme Corp. Your call is important to us.",
"synthesizer": {
"vendor": "google",
"language": "en-US",
"voice": "en-US-Wavenet-F"
},
"loop": 1
}
}
```
#### With SSML and fallback vendor
```json
{
"say": {
"text": "Your order total is $12.50.",
"synthesizer": {
"vendor": "aws",
"language": "en-US",
"voice": "Joanna",
"engine": "neural",
"fallbackVendor": "google",
"fallbackLanguage": "en-US",
"fallbackVoice": "en-US-Standard-C"
}
}
}
```
#### Streaming TTS (WebSocket apps only — sends tokens progressively)
```json
{
"say": {
"stream": true,
"synthesizer": { "vendor": "elevenlabs", "voice": "Rachel" }
}
}
```
```
--------------------------------
### POST /createMessage/:sid
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Launches an outbound message session via the `message` verb for SMS sent from the REST API. Returns HTTP 200.
```APIDOC
## POST /createMessage/:sid — Send an outbound SMS
### Description
Launches an outbound message session via the `message` verb for SMS sent from the REST API. Returns HTTP 200 (task executes asynchronously).
### Method
POST
### Endpoint
/createMessage/:sid
### Parameters
#### Path Parameters
- **sid** (string) - Required - The unique identifier for the message.
#### Request Body
- **message_sid** (string) - Required - The message SID.
- **account_sid** (string) - Required - The account SID.
- **from** (string) - Required - The sender's phone number.
- **to** (string) - Required - The recipient's phone number.
- **text** (string) - Required - The content of the message.
### Request Example
```json
{
"message_sid": "msg-sid-001",
"account_sid": "abc123",
"from": "+15551234567",
"to": "+15559876543",
"text": "Your verification code is 4821"
}
```
### Response
#### Success Response (200)
OK. The task to send the message has been initiated.
```
--------------------------------
### Play - Audio file with timeout
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Fetches and plays a short audio file (e.g., a beep) with a specified timeout. If the audio does not complete within the timeout, playback stops.
```json
// Single play with timeout
{
"play": {
"url": "https://cdn.example.com/beep.wav",
"timeoutSecs": 5
}
}
```
--------------------------------
### Config - Set session defaults
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Sets session-wide defaults for TTS, STT, barge-in, transcription, recording, filler noise, and action-hook delay. These settings are applied immediately and inherited by subsequent verbs unless overridden.
```json
{
"config": {
"synthesizer": {
"vendor": "elevenlabs",
"voice": "Rachel",
"language": "en-US"
},
"recognizer": {
"vendor": "deepgram",
"language": "en-US"
},
"bargeIn": {
"enable": true,
"input": ["speech"],
"minBargeinWordCount": 1,
"actionHook": "/barge-in-handler"
},
"fillerNoise": {
"enabled": true,
"url": "https://cdn.example.com/thinking.mp3",
"startDelaySecs": 1.5
},
"notifyEvents": true
}
}
```
--------------------------------
### Write System Alert
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
The 'alert' verb writes an operational alert to the jambonz database. These alerts are visible in the management dashboard.
```json
{
"alert": {
"message": "Webhook response time exceeded threshold"
}
}
```
--------------------------------
### listen
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Opens a WebSocket connection to stream raw audio (RTP/PCM) from the call to an external service. Supports bidirectional audio, DTMF pass-through, metadata, and nested transcription.
```APIDOC
## listen
### Description
Opens a WebSocket connection and streams raw audio (RTP/PCM) from the call to an external service. Supports bidirectional audio (receiving audio back to play into the call), DTMF pass-through, metadata, and nested transcription.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **listen** (object) - Required - Configuration for the listen action.
- **url** (string) - Required - The WebSocket URL to connect to.
- **mixType** (string) - Optional - 'stereo' or 'mono'. Defaults to 'mono'.
- **sampleRate** (integer) - Optional - The sample rate of the audio stream. Defaults to 16000.
- **timeout** (integer) - Optional - Timeout in seconds for the WebSocket connection. 0 means no timeout.
- **bidirectionalAudio** (object) - Optional - Enables bidirectional audio streaming.
- **enabled** (boolean) - Required - Whether bidirectional audio is enabled.
- **streaming** (boolean) - Required - Whether to stream audio back to the call.
- **metadata** (object) - Optional - Custom metadata to send with the audio stream.
- **transcribe** (object) - Optional - Configuration for transcription.
- **transcriptionHook** (string) - Required - URL to send transcription results to.
- **recognizer** (object) - Required - Configuration for the speech recognition engine.
- **vendor** (string) - Required - The transcription vendor (e.g., 'aws').
- **language** (string) - Required - The language for transcription (e.g., 'en-US').
### Request Example
```json
{
"listen": {
"url": "wss://media-processor.example.com/audio",
"mixType": "stereo",
"sampleRate": 16000,
"timeout": 0,
"bidirectionalAudio": {
"enabled": true,
"streaming": true
},
"metadata": { "callType": "support", "agentId": "agent-007" },
"transcribe": {
"transcriptionHook": "/transcription",
"recognizer": { "vendor": "aws", "language": "en-US" }
}
}
}
```
```
--------------------------------
### Gather Speech Input with Barge-in
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Enables speech recognition with barge-in support, allowing users to interrupt. It captures partial results via a hook and final results to another hook, with a specified STT vendor and language.
```json
{
"gather": {
"input": ["speech"],
"timeout": 8,
"bargein": true,
"minBargeinWordCount": 1,
"partialResultHook": "/partial-transcript",
"actionHook": "/speech-result",
"recognizer": {
"vendor": "deepgram",
"language": "en-US",
"hints": ["support", "billing", "cancel"],
"hintsBoost": 5
},
"say": { "text": "How can I help you today?" }
}
}
```
--------------------------------
### Listen - Stream audio to WebSocket
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Opens a WebSocket connection to stream raw audio (RTP/PCM) from the call to an external service. Supports bidirectional audio, DTMF pass-through, metadata, and nested transcription.
```json
{
"listen": {
"url": "wss://media-processor.example.com/audio",
"mixType": "stereo",
"sampleRate": 16000,
"timeout": 0,
"bidirectionalAudio": {
"enabled": true,
"streaming": true
},
"metadata": { "callType": "support", "agentId": "agent-007" },
"transcribe": {
"transcriptionHook": "/transcription",
"recognizer": { "vendor": "aws", "language": "en-US" }
}
}
}
```
--------------------------------
### sip:request
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Sends an arbitrary in-dialog SIP request (INFO, NOTIFY, etc.) to the remote party.
```APIDOC
## sip:request
### Description
Sends an arbitrary in-dialog SIP request (INFO, NOTIFY, etc.) to the remote party.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **sip:request** (object) - Required - Configuration for sending a SIP request.
- **method** (string) - Required - The SIP method to use (e.g., 'INFO', 'NOTIFY').
- **headers** (object) - Optional - Headers to include in the SIP request.
- **body** (string) - Optional - The body of the SIP request.
- **actionHook** (string) - Optional - URL to send the SIP response to.
### Request Example
```json
{
"sip:request": {
"method": "INFO",
"headers": { "Content-Type": "application/json" },
"body": "{ \"event\": \"hold\" }",
"actionHook": "/sip-response"
}
}
```
```
--------------------------------
### redirect
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Transfers call-flow execution to a new URL (HTTP or WebSocket) without ending the call.
```APIDOC
## redirect
### Description
Transfers call-flow execution to a new URL (HTTP or WebSocket) without ending the call. Handles both relative and absolute URL redirects.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **redirect** (object) - Required - Configuration for redirecting the call.
- **actionHook** (string) - Required - The URL to redirect the call flow to.
### Request Example
```json
{
"redirect": {
"actionHook": "https://other-app.example.com/call-handler"
}
}
```
```
--------------------------------
### Say verb for Text-to-Speech playback
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Synthesizes and plays TTS audio. Supports plain text, SSML, looping, streaming TTS, per-verb synthesizer overrides, and fallback vendors. Long texts are automatically chunked.
```json
// Standard TTS
{
"say": {
"text": "Welcome to Acme Corp. Your call is important to us.",
"synthesizer": {
"vendor": "google",
"language": "en-US",
"voice": "en-US-Wavenet-F"
},
"loop": 1
}
}
```
```json
// With SSML and fallback vendor
{
"say": {
"text": "Your order total is $12.50.",
"synthesizer": {
"vendor": "aws",
"language": "en-US",
"voice": "Joanna",
"engine": "neural",
"fallbackVendor": "google",
"fallbackLanguage": "en-US",
"fallbackVoice": "en-US-Standard-C"
}
}
}
```
```json
// Streaming TTS (WebSocket apps only — sends tokens progressively)
{
"say": {
"stream": true,
"synthesizer": { "vendor": "elevenlabs", "voice": "Rachel" }
}
}
```
--------------------------------
### tag
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Stores arbitrary key-value metadata on the call's `customerData` object.
```APIDOC
## tag
### Description
Stores arbitrary key-value metadata on the call's `customerData` object, which is included in all subsequent status callbacks.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **tag** (object) - Required - Data to tag the call with.
- **data** (object) - Required - Key-value pairs to store as custom data.
### Request Example
```json
{
"tag": {
"data": {
"ticketId": "TKT-8821",
"sentiment": "frustrated",
"department": "billing"
}
}
}
```
```
--------------------------------
### SIP Refer - Transfer call
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Initiates a SIP REFER to transfer the call to another party. Supports blind and attended transfer patterns by specifying the target URI and optional referred-by and action hooks.
```json
{
"sip:refer": {
"referTo": "sip:supervisor@pbx.example.com",
"referredBy": "sip:agent@pbx.example.com",
"actionHook": "/after-refer"
}
}
```
--------------------------------
### Dial with Confirmation Prompt
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Initiates a call to a target phone number and requires confirmation via a separate webhook before bridging the call. It specifies the confirmation hook and method, and an action hook for post-dial events.
```json
{
"dial": {
"target": [{ "type": "phone", "number": "+15559876543" }],
"confirmHook": "/confirm",
"confirmMethod": "POST",
"actionHook": "/after-dial"
}
}
```
--------------------------------
### Send an outbound SMS via REST API
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Launches an outbound message session via the `message` verb for SMS sent from the REST API. Returns HTTP 200.
```bash
curl -X POST http://127.0.0.1:3000/createMessage/msg-sid-001 \
-H 'Content-Type: application/json' \
-d '{
"message_sid": "msg-sid-001",
"account_sid": "abc123",
"from": "+15551234567",
"to": "+15559876543",
"text": "Your verification code is 4821"
}'
# HTTP 200 (task executes asynchronously)
```
--------------------------------
### Test Suite Completion Output
Source: https://github.com/jambonz/jambonz-feature-server/blob/main/docs/contributing.md
This indicates a successful run of the regression test suite, showing the number of tests run and passed.
```bash
1..28
# tests 28
# pass 28
# ok
```
--------------------------------
### Instantiate Jambonz Call-Flow Verbs
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Factory function to validate and create Task instances from verb JSON objects. Requires a logger and the verb object.
```javascript
const makeTask = require('./lib/tasks/make_task');
// A minimal application webhook response (array of verb objects):
const appResponse = [
{
say: {
text: 'Hello, please leave a message after the tone.',
synthesizer: { vendor: 'google', language: 'en-US', voice: 'en-US-Wavenet-C' }
}
},
{
gather: {
input: ['speech', 'digits'],
timeout: 10,
numDigits: 1,
say: { text: 'Press 1 for sales, 2 for support.' },
actionHook: '/gather-result'
}
},
{ hangup: {} }
];
// Inside the feature server the session calls:
const tasks = appResponse.map((verb) => makeTask(logger, verb));
// Each task is then executed: task.exec(callSession, { ep, dlg })
```
--------------------------------
### Notify a dequeue session with connect event
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Sends a dequeue event to a call session executing the `dequeue` verb. Returns HTTP 202.
```bash
curl -X POST http://127.0.0.1:3000/dequeue/agent-call-sid-here \
-H 'Content-Type: application/json' \
-d '{
"event": "connect",
"callerCallSid": "550e8400-e29b-41d4-a716-446655440000"
}'
# HTTP 202
```
--------------------------------
### makeTask
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Factory function that validates a verb against `@jambonz/verb-specifications` and returns the appropriate `Task` subclass instance.
```APIDOC
## makeTask — Instantiate a verb from JSON
### Description
Factory function that validates a verb against `@jambonz/verb-specifications` and returns the appropriate `Task` subclass instance.
### Usage
```javascript
const makeTask = require('./lib/tasks/make_task');
// A minimal application webhook response (array of verb objects):
const appResponse = [
{
say: {
text: 'Hello, please leave a message after the tone.',
synthesizer: { vendor: 'google', language: 'en-US', voice: 'en-US-Wavenet-C' }
}
},
{
gather: {
input: ['speech', 'digits'],
timeout: 10,
numDigits: 1,
say: { text: 'Press 1 for sales, 2 for support.' },
actionHook: '/gather-result'
}
},
{ hangup: {} }
];
// Inside the feature server the session calls:
const tasks = appResponse.map((verb) => makeTask(logger, verb));
// Each task is then executed: task.exec(callSession, { ep, dlg })
```
```
--------------------------------
### Enqueue Caller to Queue
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Places the caller into a named queue, optionally playing wait music via a webhook. The caller remains in the queue until the feature server receives a specific dequeue command.
```json
{
"enqueue": {
"name": "support",
"waitHook": "/queue-hold",
"actionHook": "/dequeued"
}
}
```
--------------------------------
### hangup
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Terminates the SIP dialog with an optional set of SIP headers.
```APIDOC
## hangup
### Description
Terminates the SIP dialog with an optional set of SIP headers.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **hangup** (object) - Required - Configuration for hanging up the call.
- **headers** (object) - Optional - SIP headers to include in the hangup request.
### Request Example
```json
{
"hangup": {
"headers": { "X-Reason": "no-speech-detected" }
}
}
```
```
--------------------------------
### sip:decline
Source: https://context7.com/jambonz/jambonz-feature-server/llms.txt
Rejects an inbound call with a SIP response.
```APIDOC
## sip:decline
### Description
Returns a non-2xx SIP response to the inbound INVITE, rejecting the call before it is answered.
### Method
Not applicable (configuration object)
### Endpoint
Not applicable (configuration object)
### Parameters
#### Request Body
- **sip:decline** (object) - Required - Configuration for declining the call.
- **status** (integer) - Required - The SIP status code (e.g., 486).
- **reason** (string) - Optional - The SIP reason phrase (e.g., 'Busy Here').
- **headers** (object) - Optional - SIP headers to include in the response.
### Request Example
```json
{
"sip:decline": {
"status": 486,
"reason": "Busy Here",
"headers": { "Retry-After": "60" }
}
}
```
```