[OpenSIPS-Users] How to limit channel on bunch of called DIDs?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Jan 25 15:48:24 CET 2010


Hi Andrew,

It will be a bit tricky (depending on your approach) as 
set_dlg_profile() does not accept variables for the name of the profile 
-> so , you need to use a profile with values where the value is the 
name of the group.

Regards,
Bogdan

Andrew Pogrebennyk wrote:
> I'm facing the same task now - limit the number of concurrent calls per 
> group of accounts rather than a single number. I'm thinking of using the 
> group module to organize numbers into groups with group module, then 
> using get_user_group() to get group id and comparing the profile size 
> with concurrent calls limit set for this group in usr_preferences table. 
> I'd probably hack the get_user_group() function to return the group name 
> instead of id for convenience reason, though.
>
> Bogdan-Andrei Iancu wrote:
>   
>> Hi,
>>
>> you do not need any "loop" - just set as key for profiling the DID 
>> number and add to that profile the calls related to that DID.
>>
>> Regards,
>> Bogdan
>>
>> Johnson Pajayat wrote:
>>     
>>> Hi Bogdan,
>>>
>>> I was able to implement the channel limiting on one DID by using a 
>>> variable instead of AVP and replacing all instances of $tU to $rU. 
>>> Now, I want to limit the channels to a set of DIDs and I'm thinking of 
>>> implementing a "while loop" and "counter" in order to achieve it. Is 
>>> this an efficient way of doing the limiting on a set of DIDs? One 
>>> problem I can think with the "while loop" and "counter" will be how to 
>>> deduct those calls that were already hung up by the caller. Again, 
>>> inputs will be greatly appreciated.
>>>
>>> Thank you very much.
>>>
>>>       
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list