Enable Billing for External Calls

Status
Not open for further replies.

samak2030

Silver Partner
Joined
May 12, 2024
Messages
3
Reaction score
0
We have a requirement from our customer to enable a billing system where each user has a monthly quota of $20. Once a user exceeds this quota, they should not be able to make external calls. We have already set up a CDR server externally to keep track of these records and check the user's billing status.

Now, we need to make a decision based on this billing status to allow or deny external calls. We are considering using a Call Flow Designer (CFD) for this, but we face an issue: how do we bind the outbound rules or SIP trunk so that the CFD is triggered to check the billing system whenever a user makes an external call?

For example, if a user dials an external mobile number (e.g., 0590964890) from extension 1001, the CFD should be triggered (CFD extension is 5699). However, there is no option available to route the call directly from an extension to an external number through the CFD.

Please guide us on how we can fulfill the customer's requirement in this scenario.
 
Wouldn't it be more logical to disable outbound calls directly in the extension through the "disable external calls" setting?

Use the XAPI to enable or disable external calls in extension settings.
https://www.3cx.com/docs/configuration-rest-api/
 
  • Like
Reactions: Evolute IT
The CFD can only be triggered if it is dialled directly.

Your best course of action would be to use the configuration API to change the user parameter once the billing system detects the quota has been exceeded.

Do note however that the PBX is not really designed for this type of scenario, but should be doable with the API.
 
Thanks, But we are using single teeneant setup where i can find the API token in the system to access the API. As per the documentation it is part of Multi-Company. Kindly explain
 
Thanks, But we are using single teeneant setup where i can find the API token in the system to access the API. As per the documentation it is part of Multi-Company. Kindly explain

Forget MultiCompany mode if it doesn't apply to you.

Focus on the second authentication method:
“User” tokens - can manage himself and entities within his scope.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Forum statistics

Threads
111,953
Messages
589,913
Members
164,847
Latest member
mike.carter.991