[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  Alfred Stainer <alfred.stainer@g...>
 Subject :  Limit number of channels
 Date :  Tue, 20 Apr 2010 20:45:47 +0200
Hi,
I want to limit the number of channels for outgoing calls, with a different
limit for each provider.
I have write my routing module in C++ but when I have to choose a provider
were send a new call, it's necessary to know how many call are
already active with this provider.

I first tried to use the callcounters module but unsuccessfull because in
route.call reception I'm capable to set the "context" parameter but not to
get the context count value to use in routing decision.

So, my idea (reading the callcounters module) was to handle, in my routing
module, also call.cdr message and increment/decrement counter based on cdrs.

The problem that I have is when there is an high call rate because the
call.cdr messages are enqueued and consumed asynchronously respect to
call.route messages and so, when I'm consuming a call.route message there
are some call.cdr messages enqueued (for example with
operation='initialize') so the counter that I'm using is not correctly
updated.

Please, can anyone help me?
Thanks,

Alfred Stainer



Hi,
I want to limit the number of channels for outgoing calls, with a different limit for each provider.
I have write my routing module in C++ but when I have to choose a provider were send a new call, it's necessary to know how many call are already active with this provider.
 
I first tried to use the callcounters module but unsuccessfull because in route.call reception I'm capable to set the "context" parameter but not to get the context count value to use in routing decision.
 
So, my idea (reading the callcounters module) was to handle, in my routing module, also call.cdr message and increment/decrement counter based on cdrs.
 
The problem that I have is when there is an high call rate because the call.cdr messages are enqueued and consumed asynchronously respect to call.route messages and so, when I'm consuming a call.route message there are some call.cdr messages enqueued (for example with operation='initialize') so the counter that I'm using is not correctly updated.
 
Please, can anyone help me?
Thanks,
 
Alfred Stainer