Skip to main content

Configuration Reference

Environment Variables

Core Application

VariableDefaultDescription
APP_NAMEOpBXApplication name
APP_ENVproductionEnvironment: local, production
APP_KEY-Encryption key (generate with artisan)
APP_DEBUGfalseEnable debug mode
APP_URLhttp://localhostBase URL

Database

VariableDefaultDescription
DB_CONNECTIONmysqlDatabase driver
DB_HOSTmysqlDatabase host
DB_PORT3306Database port
DB_DATABASEopbxDatabase name
DB_USERNAMEopbxDatabase user
DB_PASSWORD-Database password

Redis

VariableDefaultDescription
REDIS_HOSTredisRedis host
REDIS_PORT6379Redis port
REDIS_PASSWORDnullRedis password
REDIS_DB0Default database
REDIS_CACHE_DB1Cache database
REDIS_QUEUE_DB2Queue database

Cloudonix Integration

VariableRequiredDescription
CLOUDONIX_API_TOKENYesBearer token for API
CLOUDONIX_API_BASE_URLhttps://api.cloudonix.ioAPI base URL
CLOUDONIX_WEBHOOK_SECRETYesWebhook signature secret
CLOUDONIX_DEFAULT_TRUNK-Default outbound trunk

Authentication

VariableDefaultDescription
SANCTUM_STATEFUL_DOMAINSlocalhostCookie auth domains
SESSION_DRIVERredisSession storage
SESSION_LIFETIME120Session lifetime (minutes)

Queue & Broadcasting

VariableDefaultDescription
QUEUE_CONNECTIONredisQueue driver
BROADCAST_DRIVERpusherBroadcasting driver
PUSHER_APP_ID-Soketi app ID
PUSHER_APP_KEY-Soketi app key
PUSHER_APP_SECRET-Soketi app secret
PUSHER_HOSTsoketiSoketi host
PUSHER_PORT6001Soketi port

Storage

VariableDefaultDescription
FILESYSTEM_DISKs3Default storage disk
AWS_ACCESS_KEY_ID-MinIO access key
AWS_SECRET_ACCESS_KEY-MinIO secret key
AWS_DEFAULT_REGIONus-east-1Region
AWS_BUCKETopbxBucket name
AWS_ENDPOINThttp://minio:9000MinIO endpoint
AWS_USE_PATH_STYLE_ENDPOINTtrueUse path-style URLs

Mail

VariableDefaultDescription
MAIL_MAILERsmtpMail driver
MAIL_HOSTmailpitSMTP host
MAIL_PORT1025SMTP port
MAIL_FROM_ADDRESSnoreply@opbx.localFrom address
MAIL_FROM_NAMEOpBXFrom name

Dialer Worker

VariableRequiredDescription
DIALER_WORKER_API_TOKENYesWorker auth token
DIALER_WORKER_URLhttp://dialer-worker:8080Worker base URL

Rate Limiting

VariableDefaultDescription
RATE_LIMIT_API_PER_MINUTE60API rate limit
RATE_LIMIT_LOGIN_PER_MINUTE5Login attempts limit
RATE_LIMIT_SENSITIVE_PER_MINUTE3Sensitive operations limit

Security

VariableDefaultDescription
HSTS_MAX_AGE31536000HSTS header max age
HSTS_INCLUDE_SUBDOMAINStrueInclude subdomains in HSTS
CSP_REPORT_URI-CSP violation report URL

Config Files

config/app.php

'name' => env('APP_NAME', 'OpBX'),
'env' => env('APP_ENV', 'production'),
'debug' => (bool) env('APP_DEBUG', false),
'url' => env('APP_URL', 'http://localhost'),
'timezone' => 'UTC',
'locale' => 'en',
'cipher' => 'AES-256-CBC',

config/services.php

'cloudonix' => [
'api_base_url' => env('CLOUDONIX_API_BASE_URL', 'https://api.cloudonix.io'),
'webhook_secret' => env('CLOUDONIX_WEBHOOK_SECRET'),
],

'dialer_worker' => [
'token' => env('DIALER_WORKER_API_TOKEN'),
'token_secondary' => env('DIALER_WORKER_API_TOKEN_SECONDARY'),
],

config/security.php

'hsts_max_age' => env('HSTS_MAX_AGE', 31536000),
'hsts_include_subdomains' => env('HSTS_INCLUDE_SUBDOMAINS', true),
'hsts_preload' => env('HSTS_PRELOAD', false),
'csp_report_uri' => env('CSP_REPORT_URI'),
'csp_connect_domains' => [],

config/auto-dialer.php

'max_cac' => 50,           // Maximum concurrent active calls
'max_cps' => 5, // Maximum calls per second
'max_caller_ids' => 100, // Maximum Caller IDs per pool
'max_destinations' => 100000, // Max destinations per campaign
'default_dial_timeout' => 60,
'default_max_attempts' => 3,

Feature Flags

Configuration values that enable/disable features:

Config PathEnvironmentDescription
features.auto_dialer.enabledFEATURE_AUTO_DIALEREnable Auto Dialer
features.ai_assistants.enabledFEATURE_AI_ASSISTANTSEnable AI integration
features.call_recording.enabledFEATURE_CALL_RECORDINGEnable recording
features.amd.enabledFEATURE_AMDEnable AMD detection

Database Configuration

Connection Pool

// config/database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],

Redis Databases

DBPurpose
0Default/Cache
1Session
2Queue
3Broadcasting
4Call State
5Rate Limiting

Cache Configuration

Stores

// config/cache.php
'stores' => [
'redis' => [
'driver' => 'redis',
'connection' => 'cache',
'lock_connection' => 'default',
],
],

TTLs

Cache KeyTTLDescription
voice_routing:{did}5 minVoice routing decisions
campaign:{id}:state1 hourCampaign transient state
rate_limit:{org}1 minRate limit counters
session:{token}24 hoursCall sessions

Queue Configuration

Connections

// config/queue.php
'connections' => [
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'default',
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],
],

Queues

QueuePurpose
defaultGeneral jobs
webhooksWebhook dispatch
notificationsEmail/SMS notifications
cdrCall detail record processing

Logging Configuration

Channels

// config/logging.php
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'stderr'],
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
'audit' => [
'driver' => 'daily',
'path' => storage_path('logs/audit.log'),
'level' => 'info',
],
],

Log Levels

LevelUsed For
emergencySystem down
alertImmediate action required
criticalCritical conditions
errorRuntime errors
warningWarnings
noticeNormal but significant
infoInformational
debugDebug-level messages

Health Check Endpoints

EndpointPurpose
/upLaravel health check
/healthFull system health
/api/healthAPI health (with auth)

Docker Environment

Services

ServiceContainerPort
Nginxnginx80, 443
PHP-FPMapp9000
MySQLmysql3306
Redisredis6379
MinIOminio9000, 9001
Soketisoketi6001
Go Workerdialer-worker8080
ngrokngrok4040

Networks

NetworkPurpose
opbxMain application network
opbx-bridgeExternal connectivity