Sign inSign up

phirumseng/plxy-callbot-api

By phirumseng

•Updated about 1 month ago

PLXY AI Call Center control plane — scenarios, campaigns, calls and auth on PostgreSQL 18

Image
API management
Machine learning & AI
0

93

phirumseng/plxy-callbot-api repository overview

⁠plxy-callbot-api

Control plane of the PLXY AI Call Center: the REST API behind the studio. It owns scenarios, campaigns, call records, users and tenants, and it is the only service that talks to the database.

Part of a five-image platform that answers calls from a SIP trunk, runs an AI conversation, and transfers to a 3CX agent when the flow says so.

šŸ“– Deployment guide⁠ Ā· Configuration reference⁠ Ā· API reference⁠

⁠Where it sits

 SIP trunk ──▶ plxy-voice-gateway-media ──▶ 3CX agents
                        ā–² ESL
                 plxy-voice-gateway
                        ā–² WebSocket
                 plxy-callbot-worker
                        ā–² REST (internal token)
   browser ──▶  plxy-callbot-api  ──▶ PostgreSQL 18
                        ā–²
                 plxy-callbot-ui

⁠Ports

PortPurpose
29092REST API — the studio (browser) and the voice gateway both call it

⁠Configuration

Everything is environment variables. Nothing has a usable default that would let it start insecurely: the four marked required stop the container rather than guess.

VariableRequiredWhat it is
APP_DB_URL / APP_DB_USERāœ…JDBC URL and least-privilege runtime login
OWNER_DB_URL / OWNER_DB_USERāœ…The role that runs schema migrations at startup
CORS_ALLOWED_ORIGINSāœ…The studio's public origin. Wrong value = login blocked by the browser
VGW_BASE_URLāœ…Voice gateway base URL, for placing outbound calls
APP_DIALER_ENABLEDCampaign dialer loop. Default true
REDIS_ENABLED / REDIS_URIRequired only above one replica — see below
RATE_LIMIT_*Token-bucket limits; sensible defaults for one replica
JAVA_OPTSDefault -XX:MaxRAMPercentage=75
⁠Secrets

Every credential is read from a file, never from the environment, so docker inspect stays clean. Each *_FILE variable points at a mounted file (a Docker/Swarm secret):

OWNER_DB_PASSWORD_FILE Ā· APP_DB_PASSWORD_FILE Ā· JWT_SECRET_FILE Ā· INTERNAL_API_TOKEN_FILE Ā· VGW_CONTROL_TOKEN_FILE Ā· APIEXT_SECRET_KEY_FILE

The container refuses to start with a blank JWT secret, an HS256 key shorter than 32 bytes, or a blank internal token — a blank token would disable service-to-service auth silently.

⁠Replicas

Run exactly one unless you also set REDIS_ENABLED=true. This service holds the migration lock and the campaign dialer loop, and its rate limiter and idempotency store are in-process; a second replica without Redis can place a duplicate outbound call.

⁠Run it

This image is one service of a stack — it needs PostgreSQL 18 and the other four images. Deploy the whole platform with the published Swarm stack files:

git clone https://github.com/SengPhirum/PLXY_AICC.git && cd PLXY_AICC
deploy/swarm/secrets-init.sh callbot prod
TAG=0.1.0 deploy/swarm/deploy.sh callbot prod

Full walkthrough — carrier trunk, 3CX, firewall rules, first sign-in: https://sengphirum.github.io/PLXY_AICC/setup-guide⁠

⁠Tags

latest tracks the newest release. Pin the version tag (0.1.0) in production, and use the same tag for all five images — they ship as one set.

⁠The other images

plxy-callbot-ui⁠ · plxy-callbot-worker⁠ · plxy-voice-gateway⁠ · plxy-voice-gateway-media⁠

Tag summary

Content type

Image

Digest

sha256:c58491be4…

Size

181.3 MB

Last updated

about 1 month ago

docker pull phirumseng/plxy-callbot-api