[Kamailio-Users] limits per subscriber and per gateway

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 20 13:12:15 CEST 2009


Hi Alex,

On 20.08.2009 13:51 Uhr, Alex Balashov wrote:
> Daniel,
>
> Daniel-Constantin Mierla wrote:
>
>> using dialog module is one way.
>>
>> Personally I am using the htable module for this purpose, preferring 
>> a lighter version. When a new call comes, I store the user id using 
>> the call id as key. Then using the user is as key I count the active 
>> calls. When bye goes through, a decrease the number of calls. The 
>> limits you can store in another htable or database. Auto-expire deals 
>> nicely with missing bye.
>
> I used to do it this way before the 'dialog' module came along.  :-)
>
> Do you run into any complications from doing this that arise from 
> potentially complicated dialog states, which the dialog module can 
> handle but not this implementation?  What about forking etc?

parallel forking is same case as for dialog. I am using it a lot for 
channel reservation, like: when invite comes, I reserve the channel, in 
failure route or when getting bye, I free the channel. The rare case 
when parallel forking happens upstream, config becomes a bit more 
complex, but had no situation like this so far. However, if I have to 
limit on destination basis, some branches might be dropped as no more 
channels are available.

This solution can be updated nicely in case of a farm of sip server, by 
replacing the htable with memcached module (new in devel).

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
* http://www.asipto.com/





More information about the sr-users mailing list