Add FCM push notifications, queue alerts, caller ID fixes, and auto-revert agent status
All checks were successful
Create Release / build (push) Successful in 6s
All checks were successful
Create Release / build (push) Successful in 6s
Server-side: - Add push credential auto-creation for FCM incoming call notifications - Add queue alert FCM notifications (data-only for background delivery) - Add queue alert cancellation on call accept/disconnect - Fix caller ID to show caller's number instead of Twilio number - Fix FCM token storage when refresh_token is null - Add pre_call_status tracking to revert agent status 30s after call ends - Add SSE fallback polling for mobile app connectivity Mobile app: - Add Android telecom permissions and phone account registration - Add VoiceFirebaseMessagingService for incoming call push handling - Add insistent queue alert notifications with custom sound - Fix caller number display on active call screen - Add caller ID selection dropdown on dashboard - Add phone numbers endpoint and provider support - Add unit tests for CallInfo, QueueState, and CallProvider - Remove local.properties from tracking, add .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
27
CLAUDE.md
27
CLAUDE.md
@@ -96,6 +96,33 @@ $api->update_call($customer_call_sid, ['twiml' => $twiml_xml]);
|
||||
- Options: roaming, ashburn, umatilla, dublin, frankfurt, singapore, sydney, tokyo, sao-paulo
|
||||
- Wrong edge causes immediate call failures (e.g., US calls with Sydney edge)
|
||||
|
||||
## Mobile App SSE (Server-Sent Events)
|
||||
The mobile app uses SSE for real-time updates (queue changes, agent status). If SSE doesn't work (green dot stays red), the app automatically falls back to 5-second polling.
|
||||
|
||||
### Apache + PHP-FPM Buffering Fix
|
||||
`mod_proxy_fcgi` buffers PHP output by default, which breaks SSE streaming. Fix by adding a config file on the server:
|
||||
|
||||
```bash
|
||||
echo 'ProxyPassMatch "^/wp-json/twilio-mobile/v1/stream/events$" "unix:/run/php-fpm/www.sock|fcgi://localhost/home/shadowdao/public_html/index.php" flushpackets=on' > /etc/httpd/conf.d/twp-sse.conf
|
||||
httpd -t && systemctl restart httpd
|
||||
```
|
||||
|
||||
- **`flushpackets=on`** is the key — tells Apache to flush PHP-FPM output immediately
|
||||
- This is a `ProxyPassMatch` directive — **cannot** go in `.htaccess`, must be server config
|
||||
- The PHP-FPM socket path (`/run/php-fpm/www.sock`) must match `/etc/httpd/conf.d/php.conf`
|
||||
- If the server uses nginx instead of Apache, add `X-Accel-Buffering: no` header (already in PHP code)
|
||||
- If behind HAProxy with HTTP/2, the issue is Apache→client buffering, not HTTP/2 framing
|
||||
|
||||
### Diagnosis
|
||||
```bash
|
||||
# Check PHP-FPM proxy config
|
||||
grep -r "fcgi\|php-fpm" /etc/httpd/conf.d/
|
||||
# Check if flushpackets is configured
|
||||
grep -r "flushpackets" /etc/httpd/conf.d/
|
||||
# Test SSE endpoint (should stream data, not hang)
|
||||
curl -N -H "Authorization: Bearer TOKEN" https://phone.cloud-hosting.io/wp-json/twilio-mobile/v1/stream/events
|
||||
```
|
||||
|
||||
## Changelog
|
||||
See `README.md` for detailed version history. Current version: v2.8.9.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user