Call Data
Call Data
SIPHON can automatically capture and persist call artifacts during a call:
- Recordings (audio)
- Call metadata (direction, phone numbers, trunks, timing, status, etc.)
- Call transcriptions (conversation history)
These features run inside the agent worker process, so they work for both inbound and outbound calls.
Enable / disable
Call data features are controlled by environment variables read by the agent worker.
CALL_RECORDING(defaultfalse)- When
true, SIPHON starts recording (egress) and saves it to S3 compatible storage.
- When
SAVE_METADATA(defaultfalse)- When
true, SIPHON saves a per-call metadata JSON payload using the configured storage backend.
- When
SAVE_TRANSCRIPTION(defaultfalse)- When
true, SIPHON collects conversation items and saves a transcription JSON payload using the configured storage backend.
- When
HANGUP_CALL(defaulttrue)- When
false, the hangup tool becomes a no-op. Recording/metadata saving still happens on normal call exit.
- When
Timezone
SIPHON uses the TIMEZONE environment variable to format timestamps for call artifacts.
- If
TIMEZONEis set to a valid IANA timezone name (for exampleAsia/Kolkata,UTC,America/New_York), SIPHON uses it when writing:- metadata
start_time/end_time - transcription message timestamps
- folder/file timestamps used for local/S3 paths
- metadata
- If
TIMEZONEis not set (or invalid), SIPHON falls back to local time.
Recordings
When CALL_RECORDING=true, SIPHON starts a room composite recording shortly after the agent joins the room.
- Output format:
.ogg(audio-only) - Layout:
speaker - Storage: S3-compatible object storage (AWS S3 or MinIO)
Required S3 / MinIO configuration
Set these environment variables in the environment where the agent worker runs:
AWS_S3_BUCKETorMINIO_BUCKETAWS_S3_ACCESS_KEY_IDorMINIO_ACCESS_KEYAWS_S3_SECRET_ACCESS_KEYorMINIO_SECRET_KEY
Optional:
AWS_S3_ENDPOINT- Useful for MinIO (example:
http://localhost:9000)
- Useful for MinIO (example:
AWS_S3_REGION(defaultus-east-1)AWS_S3_FORCE_PATH_STYLE(defaultfalse)
Where recordings are written
SIPHON generates a per-call key using the room name and a timestamp:
- Folder:
<room_name>/<timestamp>/ - File:
call_<room_name>_<timestamp>.ogg
The recording is written to:
s3://<bucket>/<folder>/<file>
Metadata
When SAVE_METADATA=true, SIPHON writes a metadata payload for each call. This includes:
room_namecall_direction(inboundoroutbound)inbound_trunk_id/outbound_trunk_id(if available)agent_numberuser_number- Timing:
start_timeend_timedurationtimezone
- Status:
answered(true/false)status(for example:completed,failed,aborted,limit_reached, or unanswered reasons)
recording_filename(when a recording exists)
Configure metadata storage
Metadata storage is configured via:
METADATA_LOCATION(defaultCall_Metadata)
Supported values:
s3- Saves metadata JSON to the configured S3/MinIO bucket.
- A database URL
- MongoDB:
mongodb://...ormongodb+srv://... - Redis:
redis://...orrediss://... - Postgres:
postgres://...orpostgresql://... - MySQL:
mysql://...ormysql+pymysql://...
- MongoDB:
- Any other string
- Treated as a local folder path.
Where metadata is written
- Local:
<METADATA_LOCATION>/<room_name>/<timestamp>/call_metadata_<room_name>_<timestamp>.json - S3:
s3://<bucket>/<room_name>/<timestamp>/call_metadata_<room_name>_<timestamp>.json
If a recording exists, SIPHON will try to keep metadata alongside the recording in the same S3 “folder”.
Transcription
When SAVE_TRANSCRIPTION=true, SIPHON collects the conversation history during the call and saves it as JSON.
The payload shape is:
{"conversation": [{"role": "user" | "assistant", "content": "...", "interrupted": false, "timestamp": "..."}, ...]}
Configure transcription storage
Transcription storage is configured via:
TRANSCRIPTION_LOCATION(defaultTranscriptions)
Supported values match metadata storage:
s3- Database URLs (
mongodb://...,redis://...,postgres://...,mysql://...) - Any local folder path
Where transcriptions are written
- Local:
<TRANSCRIPTION_LOCATION>/<room_name>/<timestamp>/call_transcription_<room_name>_<timestamp>.json - S3:
s3://<bucket>/<room_name>/<timestamp>/call_transcription_<room_name>_<timestamp>.json
Unanswered calls
SIPHON treats calls that were never actually answered differently:
- Any in-progress recording is stopped and discarded (deleted from S3/MinIO)
- Metadata is still saved, but marked as unanswered (
answered=false) and without a recording filename - Normal “on exit” persistence is skipped to avoid saving a second, conflicting record
Example worker .env
# Enable features
CALL_RECORDING=true
SAVE_METADATA=true
SAVE_TRANSCRIPTION=true
# Timestamp formatting
TIMEZONE=Asia/Kolkata
# Where to store call data
METADATA_LOCATION=Call_Metadata
TRANSCRIPTION_LOCATION=Transcriptions
# S3 / MinIO (for recordings, and for metadata/transcriptions when location is "s3")
AWS_S3_ENDPOINT=http://localhost:9000
AWS_S3_BUCKET=siphon
AWS_S3_ACCESS_KEY_ID=minioadmin
AWS_S3_SECRET_ACCESS_KEY=minioadmin
AWS_S3_REGION=us-east-1
AWS_S3_FORCE_PATH_STYLE=true