Manage multiple Twilio accounts with a single Yap server
config.php file.website·Indexed 34 days ago
https://yap.bmlt.appDocumentation for Yap, a PHP-based helpline and meeting search system. Covers installation via Docker, Laravel environment configuration, SMS gateway integration, call routing strategies, and admin REST API authentication using Laravel Sanctum. Includes guides for upgrading between versions (e.g., Yap 4.x to 5.x) and configuring meeting search parameters such as radius, sorting, and geocoding.
config.php file.Yap is designed to bridge BMLT root server results with telephone systems. Its primary capabilities include:
Yap 5.0 requires the following environment:
mod_rewrite enabledFacebook Messenger Bot: https://github.com/bmlt-enabled/yap-fbmessenger-bot Alexa Skill: https://github.com/bmlt-enabled/yap-alexaskill
Yap 5.0 enforces X-Twilio-Signature validation on all Twilio-facing routes. If validation fails, the server returns an HTTP 403, resulting in a total outage for calls and SMS.
Requirements:
twilio_auth_token in config.php to the token of the Twilio account owning the phone numbers.TRUSTED_PROXIES so Yap can correctly reconstruct the public URL for signature comparison.TRUSTED_PROXIES Configuration:
*.Caveats:
/yap), the proxy must send X-Forwarded-Prefix: /yap and TRUSTED_PROXIES must be configured.TWILIO_DISABLE_SIGNATURE_VALIDATION=true can be used for development but is ignored in production.To migrate data from a source Yap server to a target server while maintaining configuration integrity, follow these steps:
flags table. Use a self-contained file.sed command to replace numeric IDs with NULLs in the export file.override_service_body_id to change the service body for call routing, or override_service_body_config_id to select a specific configuration.# Step 1: Delete target config
# Run this SQL on the target server
DELETE FROM config where service_body_id in (x [,x]);
# Step 3: Sanitize the export file (replace IDs with NULL)
cat export.sql | sed -e "s/([0-9]*,/(NULL,/g" > export-mod.sql# Debian / Ubuntu (example for PHP 8.2)
sudo apt install php8.2-fpm php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl php8.2-fileinfo
sudo systemctl restart php8.2-fpm
# RHEL / Alma / Rocky
sudo dnf install php-mysqlnd php-mbstring php-xml php-curl php-fileinfo
sudo systemctl restart php-fpmTo install and run Yap, your server must meet the following minimum requirements:
fileinfo and pdo_mysql extensions.mod_rewrite enabled.config.php and database. It is recommended to test the upgrade on a staging copy first.To enable geolocation and time zone features, obtain a Google Maps API key and assign it to $google_maps_api_key in config.php.
Requirements:
$google_maps_api_key = 'your_google_maps_api_key';Groups do not dial automatically; they must be explicitly added to a service body's routing list. When a group card is enabled and active, Yap expands the group to include all members currently on shift at the time of the call. The selected call strategy (e.g., linear cycle or blasting) is then applied to this expanded list of members.
Steps to add a group: