; Copy to ../config.ini (one level above the web root, same as the other responders). ; Section is selected by the APP_ENV environment variable (default: production). [production] ; PDO DSN. MySQL/MariaDB (see sql/mysql-setup.sql), or SQLite: ; DB_DSN = "sqlite:/var/lib/cid-router/router.sqlite" DB_DSN = "mysql:host=127.0.0.1;dbname=cid_router;charset=utf8mb4" DB_USER = "cid_router" DB_PASS = "change-me" ; Comma-separated CIDRs/IPs allowed to hit router.php. Empty = allow all (not recommended). ALLOWED_IPS = "203.0.113.0/24, 198.51.100.10" ; Which query parameter names carry the caller, dialed number, and call ID. ; NetSapiens sends its own parameter set; the first name found in each list wins. PARAM_FROM = "from, orig_from_user, OrigFrom, caller, from_user" PARAM_TO = "to, orig_to_user, OrigTo, called, to_user" PARAM_CALLID = "OrigCallID, callid, call_id" PARAM_DOMAIN = "domain, orig_domain, to_domain" ; Write a row to routing_log for every request. LOG_CALLS = 1 ; When 1, an unknown/disabled domain or a hard error returns HTTP 500 so the ; NetSapiens dial rule falls through to the next rule (your AA). Keep this on. FAIL_THROUGH = 1 ; How the target is built. Use "{destination}@{domain}" if your platform ; needs the fully qualified user instead of a bare extension. DIAL_TEMPLATE = "{destination}" ; --- Web admin (admin.php) --- ; Generate with: php routectl.php admin hash-password ADMIN_PASSWORD_HASH = "" ; Comma-separated IPs/CIDRs allowed to reach admin.php. Empty = allow all. ADMIN_ALLOWED_IPS = "" [development] DB_DSN = "sqlite:./router.dev.sqlite" DB_USER = "" DB_PASS = "" ALLOWED_IPS = "" PARAM_FROM = "from, orig_from_user, OrigFrom, caller, from_user" PARAM_TO = "to, orig_to_user, OrigTo, called, to_user" PARAM_CALLID = "OrigCallID, callid, call_id" PARAM_DOMAIN = "domain, orig_domain, to_domain" LOG_CALLS = 1 FAIL_THROUGH = 1 DIAL_TEMPLATE = "{destination}" ADMIN_PASSWORD_HASH = "" ADMIN_ALLOWED_IPS = ""