CallMineAI Docs
Home
  • Introduction
  • Architecture
  • Installation
  • Configuration
  • Deployment
  • Customer panel
  • Admin panel
  • Agents & Voices
  • Campaigns & Calls
  • Billing & Credits
  • Telephony (Twilio)
  • Voice & AI
  • SIP trunks
  • Messaging
  • REST API
Home
  • Introduction
  • Architecture
  • Installation
  • Configuration
  • Deployment
  • Customer panel
  • Admin panel
  • Agents & Voices
  • Campaigns & Calls
  • Billing & Credits
  • Telephony (Twilio)
  • Voice & AI
  • SIP trunks
  • Messaging
  • REST API
  • Getting started

    • Introduction
    • Architecture
    • Installation
    • Configuration
    • Deployment
  • Using CallMineAI

    • Customer Guide
    • Agents & Voices
    • Campaigns & Calls
    • Billing & Credits
  • Administration

    • Admin Guide
    • Roles & permissions
    • Localization
  • Integrations

    • Telephony (Twilio)
    • Voice & AI
    • SIP trunks
    • Messaging
    • REST API
  • Help

    • FAQ & troubleshooting

Configuration

All configuration lives in a single .env file at the repository root. Copy .env.example and fill it in. Next.js reads the environment at boot, so restart the server after editing .env.

Provider keys

Most integration secrets can be managed in the admin UI (ElevenLabs keys, SMTP, WhatsApp provider mode, payment gateways). The .env values are bootstrap defaults / fallbacks.

App & secrets

APP_NAME="CallMineAI"
APP_ENV=local            # production in prod
APP_DEBUG=false
APP_URL=http://localhost:3000
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_DEMO_MODE=false      # true = read-only demo (no create/update/delete)

# Exposed to the browser bundle — keep in sync with the two above
NEXT_PUBLIC_APP_NAME="CallMineAI"
NEXT_PUBLIC_APP_URL=http://localhost:3000

# Signs the session cookies (cm_session / cm_admin). 32+ random chars.
AUTH_SECRET=

# Authorizes the scheduled tasks at /api/cron/*. Falls back to AUTH_SECRET.
CRON_SECRET=
KeyPurpose
AUTH_SECRETSigning key for the JWT session cookies — rotating it signs everyone out
CRON_SECRETShared secret the worker / cron sends as X-Cron-Secret
APP_KEYOnly needed when the database already holds Laravel-encrypted values (SMTP passwords, gateway secrets, integration_settings). Copy it verbatim, base64: prefix included
APP_DEMO_MODEBlocks every create/update/delete in both panels

Seed accounts (used once by npm run db:seed — set before seeding to override):

ADMIN_SEED_EMAIL=admin@spagreen.net
ADMIN_SEED_PASSWORD=12345678
CLIENT_SEED_EMAIL=client@spagreen.net
CLIENT_SEED_PASSWORD=12345678
CLIENT_SEED_NAME="Customer User"

Database

One connection string, read by Prisma:

DATABASE_URL="mysql://user:password@127.0.0.1:3306/callmineai"

There is nothing else to configure — cache entries, rate limits and scheduler locks live in the cache table, and sessions are stateless JWT cookies.

The scheduled tasks are required

Calls dial from POST /api/cron/dispatch. Keep npm run worker (or an equivalent cron) running — see Deployment.

AI / LLM brain

Powers the agent conversation and call analysis (sentiment + lead scoring).

KeyPurposeDefault
AI_PROVIDERActive AI provideropenai
OPENAI_API_KEYOpenAI key—
OPENAI_MODELDefault modelgpt-4o-mini
OPENAI_MAX_TOKENSMax tokens per completion4096
AI_PROVIDER=openai
AI_OPENAI_ENABLED=true
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini

See Voice & AI for per-model credit costs.

Voice (ElevenLabs)

Keys are managed in Admin → ElevenLabs; these are a bootstrap fallback.

KeyPurposeDefault
ELEVENLABS_ENABLEDEnable the voice stacktrue
ELEVENLABS_API_KEYFallback key—
ELEVENLABS_MAX_CONCURRENCYConcurrency cap per key30
ELEVENLABS_DEFAULT_VOICE_IDDefault voice—
ELEVENLABS_TTS_MODELTTS modeleleven_flash_v2_5

Calling economics

Overridable in admin settings.

KeyPurposeDefault
CALL_CREDIT_PRICE_CENTSPrice of one credit10
CALL_VOICE_COST_CENTSVoice cost per minute10
CALL_NUMBER_COST_CREDITSMonthly cost per phone number50
CALL_DEFAULT_LLMDefault LLMgpt-4o-mini

See Billing & Credits.

Telephony (Twilio / Plivo)

Without credentials, number search/buy is disabled but manual (BYO) numbers still work. See Telephony.

TELEPHONY_PROVIDER=twilio        # twilio | plivo

TWILIO_ENABLED=true
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_DEFAULT_FROM=

PLIVO_ENABLED=true
PLIVO_AUTH_ID=
PLIVO_AUTH_TOKEN=
PLIVO_DEFAULT_FROM=

Callback URLs are derived from APP_URL at dial time (/webhooks/twilio/status, /webhooks/twilio/recording, and the Plivo equivalents). Override them only if the carrier must reach a different host:

TWILIO_STATUS_CALLBACK_URL=
TWILIO_RECORDING_CALLBACK_URL=
TWILIO_INBOUND_VOICE_URL=

Messaging add-on (Email + WhatsApp)

Live provider mode is set in Admin → Messaging. See Messaging.

MESSAGING_ENABLED=true
WHATSAPP_PROVIDER_MODE=disabled     # disabled | meta | whatsway | both
META_APP_ID=
META_APP_SECRET=
META_CONFIG_ID=
META_VERIFY_TOKEN=callmineai
META_GRAPH_VERSION=v21.0
WHATSWAY_BASE_URL=
WHATSWAY_API_KEY=

Billing gateways

Enable a gateway by setting its *_ENABLED=true and filling credentials. Success/cancel URLs point at the customer billing/pricing pages.

BILLING_STRIPE_ENABLED=false
STRIPE_SECRET=
STRIPE_WEBHOOK_SECRET=

BILLING_PAYPAL_ENABLED=false
PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
PAYPAL_SANDBOX=true

BILLING_PADDLE_ENABLED=false
PADDLE_API_KEY=
PADDLE_ENVIRONMENT=sandbox
PADDLE_WEBHOOK_SECRET=

SIP trunk add-on

See SIP trunks.

SIP_ENABLED=true
SIP_DEFAULT_ENGINE=elevenlabs        # elevenlabs | openai
OPENAI_REALTIME_MODEL=gpt-4o-realtime-preview

Mobile app links (optional)

Landing-page App Store / Google Play badges (omit until your apps are live):

APP_STORE_URL=
GOOGLE_PLAY_URL=
Last Updated: 8/15/26, 10:14 AM
Prev
Installation
Next
Deployment