Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 11:13 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to limit DID channels and some requests
PostPosted: Tue Apr 06, 2010 12:51 am 
Offline

Joined: Tue Apr 06, 2010 12:29 am
Posts: 4
Hi, everyone.

I am new to this forum.

I have a SIP proxy that delivers calls to A2Billing servers based on Caller ID authenication. I charge my customers based on how many channels that they wish to have on each DID. For example, each DID is $5 per channel per month. I therefore require A2Billing server to limit concurrent calls of the DIDs based on what their subscription is. As I don't use SIP friend or IAX friend directly on A2Billing server, so something like "call-limit=" will not work.

Attached is my PHP script to run on a Cronjob every hour. It loads the DID data from DB "mya2billing", creates dianplan then issue dialplan reload. Its created dianplan firstly checks if A2Billing's server has exceeded the call load limits. If so, give a congestion signal so the SIP proxy will try next A2Billing server. After this, it checks the DIDs on cc_did table and limit the concurrent calls based on which DID group it has been assigned to. If concurrent calls are exceeded, it will give busy signal.

I really wish this can be done properly and officially on A2Billing when there is a newer release. My dummy PHP code may scare someone but the script does run and I hope it may help someone in the same situation as well.


Attachments:
File comment: A2Billing Dialplan PHP Script
a2billing_exten.php.zip [2.25 KiB]
Downloaded 671 times
Top
 Profile  
 
 Post subject: Re: How to limit DID channels and some requests
PostPosted: Tue Oct 04, 2011 7:03 pm 
Offline

Joined: Sun Dec 27, 2009 8:39 pm
Posts: 80
I was wondering if the OP is still around, as I was thinking of doing something similar, but having a few different parameters:

- Rather than have the DID group determine the number of channels, use the existing incominglimit field to set the channel limit. Since incoming limit is deprecated in asterisk 1.6+, and the value exists in the a2b db, may as well use it for something useful.

- Rather than limiting the channels per DID, I would limit the channels either per SIP registration (using the incoming limit), This would allow a bit more flexibility, when having sip trunk customers that may want 20 trunks. We may have a customer with 20 DID's but only want 8 channels.

Carlos.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group