Skip to content

applications/crossbar: register cb_lists in default modules - #64

Merged
ruhnet merged 1 commit into
4.4from
crossbar-register-lists-module
Sep 21, 2026
Merged

ruhnet merged 1 commit into
4.4from
crossbar-register-lists-module

Conversation

@noahmehl

Copy link
Copy Markdown
Contributor

Problem

GET /v2/accounts/{id}/lists returns 404 on a default deployment.

The Match List module (cb_lists_v1 / cb_lists_v2) ships with crossbar and backs the lists endpoint. Live callflow modules cf_dynamic_cid and cf_lookupcidname depend on this data for caller-ID matching. But 'cb_lists' was never listed in ?DEFAULT_MODULES (applications/crossbar/src/crossbar.hrl), so nothing loads the module and the route is silently dead.

git log -S shows cb_lists has never been in ?DEFAULT_MODULES across the entire history of the file — including the pre-fork 2600Hz history. This is a longstanding upstream bug, not a fork regression. (Same class of silently-dead-route bug as the recent acdc module-registration fix, but a simpler fix since cb_lists is native to crossbar.)

Fix

Add the base atom 'cb_lists' to ?DEFAULT_MODULES.

?DEFAULT_MODULES holds base names. At startup start_mod('cb_lists') fails to find a plain cb_lists module and falls back to maybe_start_mod_versions/2 (crossbar_init.erl), so the single entry loads both cb_lists_v1 and cb_lists_v2 — no per-version entry needed.

Notes / scope

  • Existing deployments: a deployment that already persisted an autoload_modules value to its DB won't pick up the new default until that config is flushed/reset. Documented in the commit; no migration code added (kept surgical).
  • Data migration out of scope: cb_lists_v2:maybe_migrate/1 is a separate, per-account maintenance concern invoked from crossbar_maintenance:migrate/1; it is neither triggered nor required by loading the module.
  • Added a Match list glossary entry to CONTEXT.md disambiguating it from contact lists (cb_contact_list) and blacklists (cb_blacklists).

Testing

  • Verified alphabetical placement between cb_limits and cb_media.
  • Verified via crossbar_init that base-name loading covers both _v1 and _v2.

The Match List module (cb_lists_v1/cb_lists_v2) ships with crossbar and
backs the /v2/accounts/{id}/lists endpoint, which cf_dynamic_cid and
cf_lookupcidname depend on for caller-ID matching. But 'cb_lists' was
never added to ?DEFAULT_MODULES, so on a default deployment nothing
loads it and the endpoint is a silently dead route.

This has been absent for the entire history of the file (including the
pre-fork 2600Hz history) -- a longstanding upstream bug, not a fork
regression.

?DEFAULT_MODULES holds base names: start_mod('cb_lists') fails to find a
plain cb_lists module and falls back to maybe_start_mod_versions/2, so
the single 'cb_lists' entry loads both cb_lists_v1 and cb_lists_v2. This
is the correct home for the fix -- unlike the acdc modules, cb_lists is
native to crossbar and needs no application-integration hook.

Note: deployments that already persisted an autoload_modules config to
their DB won't pick up the new default until that config is flushed/reset.

Also add a "Match list" glossary entry to CONTEXT.md disambiguating it
from contact lists (cb_contact_list) and blacklists (cb_blacklists).
@noahmehl
noahmehl requested review from rdnn and ruhnet September 21, 2026 00:37

@ruhnet ruhnet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good!

@ruhnet
ruhnet added this pull request to the merge queue Sep 21, 2026
Merged via the queue into 4.4 with commit e48e1e2 Sep 21, 2026
1 check passed
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.

3 participants