Repository navigation
applications/crossbar: register cb_lists in default modules - #64
Merged
Merged
Conversation
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).
rdnn
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GET /v2/accounts/{id}/listsreturns 404 on a default deployment.The Match List module (
cb_lists_v1/cb_lists_v2) ships with crossbar and backs thelistsendpoint. Live callflow modulescf_dynamic_cidandcf_lookupcidnamedepend 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 -Sshowscb_listshas never been in?DEFAULT_MODULESacross 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 sincecb_listsis native to crossbar.)Fix
Add the base atom
'cb_lists'to?DEFAULT_MODULES.?DEFAULT_MODULESholds base names. At startupstart_mod('cb_lists')fails to find a plaincb_listsmodule and falls back tomaybe_start_mod_versions/2(crossbar_init.erl), so the single entry loads bothcb_lists_v1andcb_lists_v2— no per-version entry needed.Notes / scope
autoload_modulesvalue 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).cb_lists_v2:maybe_migrate/1is a separate, per-account maintenance concern invoked fromcrossbar_maintenance:migrate/1; it is neither triggered nor required by loading the module.CONTEXT.mddisambiguating it from contact lists (cb_contact_list) and blacklists (cb_blacklists).Testing
cb_limitsandcb_media.crossbar_initthat base-name loading covers both_v1and_v2.