Skip to content

[mod_callcenter] instance_id column hardcoded as 'single_box' — breaks multi-node deployments - #3092

Open
gaurang1102 wants to merge 1 commit into
signalwire:masterfrom
gaurang1102:fix/callcenter-instance-id-hardcode
Open

[mod_callcenter] instance_id column hardcoded as 'single_box' — breaks multi-node deployments#3092
gaurang1102 wants to merge 1 commit into
signalwire:masterfrom
gaurang1102:fix/callcenter-instance-id-hardcode

Conversation

@gaurang1102

@gaurang1102 gaurang1102 commented Aug 3, 2026

Copy link
Copy Markdown

Problem Description

The agents and members tables in mod_callcenter have an instance_id column specifically designed to differentiate agents registered on different FreeSWITCH nodes in a multi-node deployment. However, every SQL write in cc_agent_set_value() and the agent load functions hardcodes the string 'single_box' as the instance_id, making the column permanently non-functional.

This means that in any deployment with more than one FreeSWITCH node sharing a common database (a standard HA or geographic distribution scenario), all nodes write identical instance_id values, making it impossible to:

Query which node currently owns a given agent
Filter member queries to agents registered on the same node (serving_system is also hardcoded)
Perform proper node-scoped agent state cleanup on restart

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Code cleanup / refactor

Related Issues

#3091

Testing

  • Added/updated unit tests
  • Tested manually
  • Tested with live SignalWire credentials (if applicable)

Checklist

  • I have read the CONTRIBUTING guidelines
  • My code follows the project's style guidelines
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable)
  • All existing tests pass

Additional Notes

… multi-node use, but the implementation was never completed. All SQL writers hardcode the literal string 'single_box' instead of reading a configurable value from the module's global configuration.
@davesoft11

Copy link
Copy Markdown

Most of FS scales horizontally properly to multiple instances. But mod_callcenter is a notable exception, not supporting instance_id dynamically. The importance of affinity in ACD applications makes this particularly problematic. I'd love to see this upstreamed so our home-grown solutions can be ripped out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants