Add complete billing module with prepaid, rate plans, and mod_nibblebill integration#1
Draft
Add complete billing module with prepaid, rate plans, and mod_nibblebill integration#1
Conversation
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
…lans Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
…ustment Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add dynamic prepaid and digit-based billing features
Implement prepaid billing module with multi-prefix rate plans and real-time call cutoff
Feb 3, 2026
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Copilot
AI
changed the title
Implement prepaid billing module with multi-prefix rate plans and real-time call cutoff
Fix TypeError in groups.php when database->select() returns false
Feb 3, 2026
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Copilot
AI
changed the title
Fix TypeError in groups.php when database->select() returns false
Add prepaid billing module with mod_nibblebill integration and fix groups.php TypeError
Feb 3, 2026
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Copilot
AI
changed the title
Add prepaid billing module with mod_nibblebill integration and fix groups.php TypeError
Add complete prepaid billing module with mod_nibblebill integration
Feb 3, 2026
…ucture Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Copilot
AI
changed the title
Add complete prepaid billing module with mod_nibblebill integration
Add prepaid billing module with mod_nibblebill integration and real-time balance enforcement
Feb 3, 2026
Co-authored-by: mostakinads-design <258886467+mostakinads-design@users.noreply.github.com>
Copilot
AI
changed the title
Add prepaid billing module with mod_nibblebill integration and real-time balance enforcement
Add complete billing module with prepaid, rate plans, and mod_nibblebill integration
Feb 3, 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.
Implements dynamic prepaid and digit-based billing system with multi-prefix rate plans, call center agent billing, CDR integration, and real-time balance monitoring via mod_nibblebill.
Core Implementation
Database Schema (6 tables)
v_billing_rates- Rate plans with destination prefixesv_billing_balances- User prepaid balancesv_billing_user_rates/v_billing_agent_rates- Many-to-many rate assignmentsv_billing_usage- Call usage records with costsv_billing_balance_history- Transaction audit trailRate Plan Management (
billing_rates.php,billing_rate_edit.php)Balance Management (
billing_balances.php,billing_balance_edit.php,billing_balance_adjust.php)Billing Engine (
resources/classes/billing.php)FreeSWITCH Integration
mod_nibblebill Configuration (
resources/install/nibblebill.conf.xml)Dialplan Integration (
resources/install/dialplan/888_billing_integration.xml)Lua Scripts (
resources/install/scripts/)API Endpoint (
api_nibblebill.php)CDR Integration
Post-Call Processing (
resources/service/cdr_billing_hook.php)UI Components
Dashboard (
billing.php)Usage Reports (
billing_usage.php)Bug Fix
groups.php line 462 - Fixed TypeError when
database->select()returnsfalseDocumentation
QUICKSTART.md- 5-minute setup guideINSTALL.md- Complete installation manual (13,000 words)CONFIGURATION.md- Config files referenceCONFIGURATION_REFERENCE.md- config.conf compatibility analysisFile Structure
Follows FusionPBX app conventions:
app_*.phpfiles (config, defaults, languages, menu)resources/classes/for core logicresources/dashboard/for dashboard widget integrationresources/install/for configuration templatesresources/service/for background processing hooksAll paths compatible with existing
/etc/fusionpbx/config.conf- no configuration changes required.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.