-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
150 lines (128 loc) · 4.15 KB
/
.env.example
File metadata and controls
150 lines (128 loc) · 4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# SIPSTACK Connector Configuration - v0.13.22
# Copy this file to .env and fill in your values
# ====================
# REQUIRED SETTINGS
# ====================
# SIPSTACK API Configuration
API_KEY=sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# API endpoint is auto-built from REGION (or override with API_URL)
# Options: ca1, us1, us2, dev
REGION=us1
# Optional: Override auto-built endpoint (use API_URL or API_ENDPOINT)
# API_URL=https://api-us1.sipstack.com/v1/mqs/connectors/asterisk/calls
# Database Connection (for CDR access - always required)
# NOTE: Requires --network host in Docker (see README)
# Options: mysql, postgresql
DB_TYPE=mysql
# Use localhost with --network host mode
DB_HOST=localhost
# 3306 for MySQL/MariaDB, 5432 for PostgreSQL
DB_PORT=3306
DB_NAME=asterisk
DB_USER=asterisk
DB_PASSWORD=your_db_password
# CDR table name (default: cdr)
DB_TABLE_CDR=cdr
# CEL Data Source (REQUIRED - choose based on your Asterisk modules)
# Options: db (cel_odbc.so), csv (cel_custom.so), ami (cel_manager.so)
CEL_MODE=db
# ====================
# CEL MODE CONFIGURATION
# ====================
# If CEL_MODE=db (requires cel_odbc.so module)
# CEL table name (default: cel)
DB_TABLE_CEL=cel
# Optional: Database table for recordings (leave empty if not using)
# e.g., recordings
DB_TABLE_RECORDINGS=
# If CEL_MODE=csv (requires cel_custom.so module)
# Ensure Docker has volume mount: -v /var/log/asterisk:/var/log/asterisk:ro
CEL_CSV_PATH=/var/log/asterisk/cel-custom/Master.csv
# Seconds between CSV file checks
CEL_CSV_POLL_INTERVAL=2
# If CEL_MODE=ami (requires cel_manager.so module)
# Minimal AMI connection just for CEL events
AMI_HOST=localhost
AMI_PORT=5038
AMI_USERNAME=manager-sipstack
AMI_PASSWORD=your_secure_password
# ====================
# CALL PROCESSING
# ====================
# Customer Configuration
# Your customer ID from SIPSTACK
CUSTOMER_ID=1
# Optional tenant identifier
TENANT=
# Optional: Identifies this Asterisk server (e.g., triton-ca1, pbx-east)
HOST_HOSTNAME=
# Processing Intervals
# Seconds between CDR/CEL polls
CDR_POLL_INTERVAL=5
# Max CDRs to process per poll
CDR_BATCH_SIZE=200
# How far back to look for new CDRs
CDR_LOOKBACK_MINUTES=5
# Call Shipping Strategy
# Mode: 'complete' (wait for call end) or 'progressive' (ship initial/update/complete)
# 'complete' mode reduces API traffic by ~70% (recommended)
CALL_SHIPPING_MODE=complete
# For long calls in 'complete' mode, send periodic updates (seconds)
# Set to 0 to disable periodic updates for long calls
LONG_CALL_UPDATE_INTERVAL=600
# ====================
# RECORDING DETECTION
# ====================
RECORDING_ENABLED=true
RECORDING_PATHS=/var/spool/asterisk/monitor,/var/spool/asterisk/recordings
# Seconds between stability checks
RECORDING_STABILITY_CHECK_INTERVAL=2
# Required stable checks before upload
RECORDING_STABILITY_CHECK_COUNT=3
# Recordings per upload batch
RECORDING_UPLOAD_BATCH_SIZE=5
# Max retry attempts for failed uploads
RECORDING_MAX_UPLOAD_RETRIES=3
# Delete local files after successful upload
DELETE_RECORDINGS_AFTER_UPLOAD=false
# ====================
# PERFORMANCE TUNING
# ====================
# Options: DEBUG, INFO, WARNING, ERROR
LOG_LEVEL=INFO
# Parallel processing workers
MAX_WORKERS=4
# Database connection pool size
CONNECTION_POOL_SIZE=10
# API request timeout in seconds
API_TIMEOUT=30
# API request retry attempts
API_RETRY_ATTEMPTS=3
# ====================
# MONITORING
# ====================
MONITORING_ENABLED=true
# Prometheus metrics port
MONITORING_PORT=8000
# Seconds between metrics reports
METRICS_INTERVAL=60
# ====================
# ADVANCED OPTIONS
# ====================
# Call Processing Features
# Track call threads (transfers, conferences)
ENABLE_CALL_THREADS=true
# Normalize to E.164 format
NORMALIZE_PHONE_NUMBERS=true
# Remove *67, *82, 9, etc.
STRIP_DIAL_PREFIXES=true
# Auto-detect call direction from context
DETECT_DIRECTION=true
# Tenant Detection (Optional)
# Comma-separated list of trunk names to filter out from tenant detection
# Example: KNOWN_TRUNKS=sbc-ca1,sbc-ca2,trunk1,pstn-gateway
KNOWN_TRUNKS=
# DID to tenant mappings (format: DID:tenant,DID:tenant)
DID_TENANT_MAP=
# AccountCode to tenant mappings (format: code:tenant,code:tenant)
ACCOUNTCODE_TENANT_MAP=