How techmaniac89/pbxsense-agent works
PBXSense Agent is a local PBX-to-app bridge. Its main workflow selects a PBX connector, gathers and normalizes observations, builds a consistent snapshot for Home and live clients, and exposes authenticated pairing, diagnostics, and recording APIs. Separate history and insight processing enriches operational data; push and opt-in encrypted Internet Relay paths serve paired apps. The README documents several connector and feature capabilities whose implementation details were not sampled, so those relationships are shown only where documented or directly evidenced by the index.
Main entry points: main.py Agent API · connectors.py Connector selection · pulse.py Snapshot and presence · cucm.py Cisco CUCM
Components 22
PBX collection
- Connector selection
pbxsense_agent/connectors.py - Asterisk AMI
pbxsense_agent/ami.py - FreeSWITCH ESL
pbxsense_agent/freeswitch.py - Yeastar API
pbxsense_agent/yeastar.py - Grandstream UCM
pbxsense_agent/grandstream.py - Cisco CUCM
pbxsense_agent/cucm.py - JTAPI live bridge
pbxsense_agent/jtapi.py - Mock connector
pbxsense_agent/mock.py
State and insights
- Snapshot and presence
pbxsense_agent/pulse.py - Home insights
pbxsense_agent/engine.py
Local Agent API
- Agent API
pbxsense_agent/main.py - Agent settings
pbxsense_agent/settings.py - Live updates
pbxsense_agent/live.py - Connector diagnostics
pbxsense_agent/diagnostics.py
Push and Internet Relay
- Push relay client
pbxsense_agent/relay.py - Internet Relay path
pbxsense_agent/internet_relay.py
History and recordings
- Call history
pbxsense_agent/history.py - Presence persistence
pbxsense_agent/presence_history.py - Recording access
pbxsense_agent/recordings.py
Other components
- PBXSense app
- Phone system
- Push and secure relay
push_relay/app.py
Connections 34
- PBXSense app → Agent API: requests API
README.md - Phone system → Asterisk AMI: serves AMI state
README.md - Phone system → FreeSWITCH ESL: serves ESL state
README.md - Phone system → Yeastar API: serves OpenAPI state
README.md - Phone system → Grandstream UCM: serves UCM state
README.md - Phone system → Cisco CUCM: serves CUCM state
README.md - Phone system → Mock connector: provides mock state
README.md - Agent API → Agent settings: uses settings
pbxsense_agent/main.py - Agent API → Connector selection: selects connector
pbxsense_agent/main.py - Connector selection → Asterisk AMI: constructs client
pbxsense_agent/connectors.py - Connector selection → FreeSWITCH ESL: constructs client
pbxsense_agent/connectors.py - Connector selection → Yeastar API: constructs client
pbxsense_agent/connectors.py - Connector selection → Grandstream UCM: constructs client
pbxsense_agent/connectors.py - Connector selection → Cisco CUCM: constructs client
pbxsense_agent/connectors.py - Connector selection → Mock connector: selects mock
pbxsense_agent/connectors.py - Asterisk AMI → Snapshot and presence: returns snapshot data
pbxsense_agent/ami.py - FreeSWITCH ESL → Snapshot and presence: returns snapshot data
pbxsense_agent/freeswitch.py - Yeastar API → Snapshot and presence: returns snapshot data
pbxsense_agent/yeastar.py - Cisco CUCM → Snapshot and presence: returns snapshot data
pbxsense_agent/cucm.py - Cisco CUCM → JTAPI live bridge: reads live channels
pbxsense_agent/cucm.py - Mock connector → Snapshot and presence: returns mock snapshot
pbxsense_agent/connectors.py - Agent API → Snapshot and presence: builds Home state
pbxsense_agent/main.py - Snapshot and presence → Home insights: derives signals
pbxsense_agent/pulse.py - Agent API → Home insights: adds Home insights
README.md - Agent API → Live updates: streams state
README.md - Agent API → Connector diagnostics: serves diagnostics
pbxsense_agent/main.py - Agent API → Call history: uses call history
pbxsense_agent/main.py - Agent API → Presence persistence: persists device activity
pbxsense_agent/main.py - Agent API → Recording access: serves recordings
pbxsense_agent/main.py - Agent API → Push relay client: forwards device lifecycle
pbxsense_agent/main.py - Push relay client → Push and secure relay: sends relay requests
README.md - Agent API → Internet Relay path: runs relay polling
pbxsense_agent/main.py - Internet Relay path → Push and secure relay: sends encrypted snapshots
README.md - Push and secure relay → PBXSense app: delivers relay data
README.md