Active Calls Dashboard

markjcrane

Active Member
Staff member
Jul 22, 2018
645
238
43
50
The original thread for Active Calls Dashboard has been closed for editing. I don't know why the thread times out, but since it did and the topic is still something to talk about, I've opened a new thread on the same topic. Here is the original Active Calls Dashboard thread.
- https://www.pbxforums.com/threads/n...ard-widget-—-feedback-wanted.8454/#post-34218

FusionPBX Master branch soon to be released 5.4 release includes an efficient Active Calls Dashboard using web sockets.

After you upgrade and update permissions, then run App Defaults, and then go to the Dashboard and press the SETTINGS button. Find the Active Calls dashboard widget and then assign the following groups.
  • superadmin
  • admin
  • user
A user would see their calls. The admin and superadmin groups see all calls for their domain.

Credit to the original thread for bringing up this idea. We appreciate your initiative and your work on the dashboard. We worked on a new version in order to make a more efficient version that uses real-time web sockets
 
Hey @markjcrane Just upgraded to master to test this. Executed app defaults, menu defaults and permissions. I can see the dashboard widget for 'Active Calls', but no active calls show up in the list. Also, installed/enabled and started websockets and active_calls systemd services (I think this was required to get started with anything websocket and active calls). Both are running fine as far as I can tell. Any pointers?

Code:
fusionrw@fusionpbx:~# systemctl status websockets.service
● websockets.service - Websocket Router Service
     Loaded: loaded (/etc/systemd/system/websockets.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-07-11 15:41:11 EDT; 21min ago
   Main PID: 18700 (php)
      Tasks: 1 (limit: 2307)
     Memory: 11.9M
        CPU: 259ms
     CGroup: /system.slice/websockets.service
             └─18700 /usr/bin/php /var/www/fusionpbx/core/websockets/resources/service/websockets.php --no-fork

Jul 11 16:02:40 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Processing Broadcast
Jul 11 16:02:40 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] No subscribers to broadcast message to
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] Received message from 18ee246fd8c5de1d4c0fbbb6df345ed1
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] Message is from service
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] Processing Broadcast
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] No subscribers to broadcast message to
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Received message from 18ee246fd8c5de1d4c0fbbb6df345ed1
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Message is from service
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Processing Broadcast
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] No subscribers to broadcast message to
fusionrw@fusionpbx:~#
fusionrw@fusionpbx:~# systemctl status active_calls.service
● active_calls.service - Active Calls Websocket Service
     Loaded: loaded (/etc/systemd/system/active_calls.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-07-11 15:44:13 EDT; 19min ago
   Main PID: 19188 (php)
      Tasks: 1 (limit: 2307)
     Memory: 11.8M
        CPU: 886ms
     CGroup: /system.slice/active_calls.service
             └─19188 /usr/bin/php /var/www/fusionpbx/app/active_calls/resources/service/active_calls.php --no-fork

Jul 11 16:03:00 fusionpbx php[19188]: [2025-07-11 16:03:00] [DEBUG] EVENT: 'HEARTBEAT'
Jul 11 16:03:00 fusionpbx php[19188]: [2025-07-11 16:03:00] [DEBUG] Sending Event: 'HEARTBEAT'
Jul 11 16:03:00 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] EVENT: 'HEARTBEAT'
Jul 11 16:03:00 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] Sending Event: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx php[19188]: [2025-07-11 16:03:20] [DEBUG] Received event
Jul 11 16:03:20 fusionpbx php[19188]: [2025-07-11 16:03:20] [DEBUG] EVENT: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx php[19188]: [2025-07-11 16:03:20] [DEBUG] Sending Event: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] Received event
Jul 11 16:03:20 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] EVENT: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] Sending Event: 'HEARTBEAT'
 
Love the widget—would it be possible to add a real-time duration column? like the image attached?
 

Attachments

  • active-calls.png
    active-calls.png
    40.4 KB · Views: 21
Hey @markjcrane Just upgraded to master to test this. Executed app defaults, menu defaults and permissions. I can see the dashboard widget for 'Active Calls', but no active calls show up in the list. Also, installed/enabled and started websockets and active_calls systemd services (I think this was required to get started with anything websocket and active calls). Both are running fine as far as I can tell. Any pointers?

Code:
fusionrw@fusionpbx:~# systemctl status websockets.service
● websockets.service - Websocket Router Service
     Loaded: loaded (/etc/systemd/system/websockets.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-07-11 15:41:11 EDT; 21min ago
   Main PID: 18700 (php)
      Tasks: 1 (limit: 2307)
     Memory: 11.9M
        CPU: 259ms
     CGroup: /system.slice/websockets.service
             └─18700 /usr/bin/php /var/www/fusionpbx/core/websockets/resources/service/websockets.php --no-fork

Jul 11 16:02:40 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Processing Broadcast
Jul 11 16:02:40 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] No subscribers to broadcast message to
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] Received message from 18ee246fd8c5de1d4c0fbbb6df345ed1
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] Message is from service
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] Processing Broadcast
Jul 11 16:03:00 fusionpbx php[18700]: [2025-07-11 16:03:00] [DEBUG] No subscribers to broadcast message to
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Received message from 18ee246fd8c5de1d4c0fbbb6df345ed1
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Message is from service
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] Processing Broadcast
Jul 11 16:03:00 fusionpbx [php][service][18700]: fusionpbx[18700]: [websocket_service] No subscribers to broadcast message to
fusionrw@fusionpbx:~#
fusionrw@fusionpbx:~# systemctl status active_calls.service
● active_calls.service - Active Calls Websocket Service
     Loaded: loaded (/etc/systemd/system/active_calls.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-07-11 15:44:13 EDT; 19min ago
   Main PID: 19188 (php)
      Tasks: 1 (limit: 2307)
     Memory: 11.8M
        CPU: 886ms
     CGroup: /system.slice/active_calls.service
             └─19188 /usr/bin/php /var/www/fusionpbx/app/active_calls/resources/service/active_calls.php --no-fork

Jul 11 16:03:00 fusionpbx php[19188]: [2025-07-11 16:03:00] [DEBUG] EVENT: 'HEARTBEAT'
Jul 11 16:03:00 fusionpbx php[19188]: [2025-07-11 16:03:00] [DEBUG] Sending Event: 'HEARTBEAT'
Jul 11 16:03:00 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] EVENT: 'HEARTBEAT'
Jul 11 16:03:00 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] Sending Event: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx php[19188]: [2025-07-11 16:03:20] [DEBUG] Received event
Jul 11 16:03:20 fusionpbx php[19188]: [2025-07-11 16:03:20] [DEBUG] EVENT: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx php[19188]: [2025-07-11 16:03:20] [DEBUG] Sending Event: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] Received event
Jul 11 16:03:20 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] EVENT: 'HEARTBEAT'
Jul 11 16:03:20 fusionpbx [php][service][19188]: fusionpbx[19188]: [active_calls_service] Sending Event: 'HEARTBEAT'
sudo sed -i '/ssl_session_tickets\s*off;/a \
#redirect websockets to port 8080\
location /websockets/ {\
proxy_pass http://127.0.0.1:8080;\
proxy_http_version 1.1;\
proxy_set_header Upgrade $http_upgrade;\
proxy_set_header Connection "upgrade";\
proxy_set_header Host $host;\
}' /etc/nginx/sites-available/fusionpbx && sudo nginx -t && sudo systemctl reload nginx



Just run this one-liner in your shell to append the block right after ssl_session_tickets off; and then test & reload Nginx
 
Last edited:
  • Like
Reactions: voipBull
I noticed that each call currently appears multiple times under certain conditions. For example, when a call is routed through an application to an extension:
* While ringing, the widget lists every extension that is ringing.
* Once answered, it adds a second entry for the answered extension.
This behavior makes it hard to track a call at a glance. To streamline the display:
1. Display only one entry per call.
2. While ringing, show the application’s number as the source.
3. When an extension answers, update the existing entry to replace the application number with the extension number in the destination field, rather than adding a new entry.
I also noticed that users with the default “User” permission cannot see call durations unless they have “xml_cdr_all” permission. To fix this:
* Allow users with the default “User” permission to view the duration column in the Active Calls widget.
These changes would reduce clutter, make it easier to follow individual calls, and ensure all users can see call durations without extra permissions.
 
The Active Calls features shows each leg of the call. So in a PBX where the call was bridged there would be two channels (2 legs). When the call is in voicemail or an IVR Menu (auto attendant) then it shows one channel.