We have a portal where client sets maximum concurrent call forwarding on a number. First calls come to our IP, we then forward that calls to some numbers(set by client for it). We have to make sure, the forwarded calls are less than or equal to the set maximum limit of concurrent calls on a number. We are using asterisk as telephony software and phpagi as agi library.
How can I find count of concurrent calls already there on a number, before I forward a new call on it via my agi script.
Please suggest a proper way of doing this.
Is there any built-in way, which will automatically restrict further forward when a particular number of concurrent calls (already set for it) is already reached?