[Freeswitch-users] CDR generated on maximum sessions reach

Ken Rice krice at suspicious.org
Wed Dec 3 12:01:47 PST 2008


From: Michael Collins <msc at freeswitch.org>
Reply-To: <freeswitch-users at lists.freeswitch.org>
Date: Wed, 3 Dec 2008 11:41:04 -0800
To: <freeswitch-users at lists.freeswitch.org>
Subject: Re: [Freeswitch-users] CDR generated on maximum sessions reach



On Wed, Dec 3, 2008 at 10:27 AM, Lachezar Valchev
<lachezar.valchev at gmail.com> wrote:
> Hello everybody,
> 
> I am new to the list and I hope I can find some help here, regarding an issue
> I am experiencing with the CDRs written by Freeswitch.
> 
> The thing is, I am using the "max-sessions" and the "sessions-per-second"
> parameters in switch.conf.xml to limit the maximum number of simultaneous
> calls, I want to go through my Freeswitch server.
> 
> These options are working well, but I was expecting to have CDRs generated for
> the calls, that are dropped when the limit is reached.
> Unfortunately there is no such one.
> 
> My question is: Is there an option, which allows the generation of CDR, when a
> call is dropped, because the maximum sessions limit is reached?

This is not possible. A CDR cannot be generated without a session, and a
session will not be generated if the max sessions limit has already been
reached...
 
> 
> 
> If there is no such option, is there any way to achieve it? Probably by using
> the the mod_limit module? Can you, please tell me how to do it?

mod_limit is most definitely your best option at this point. If you haven't
read this yet please do:
http://wiki.freeswitch.org/wiki/Mod_limit

In the example on that page, you have a "limit_exceeded" extension which
would show up in your CDR, or you can set a specific channel variable which
will magically show up in an XML CDR. (You can modify CSV CDRs to have any
custom channel variables as well. See http://wiki.freeswitch.org/wiki/Cdr
which refers to the <templates> section of
conf/autoload_configs/cdr_csv.conf.xml)

Try adding the limit app in your dialplan and have the limit_exceeded
extension as well. You could set the limit really low for the sake of
testing before setting it to the value necessary for your production
deployment.

------SNIP-------

Michael¹s advise here is dead on... The whole point of the session limiter
(and SPS limiters) is to keep the box from melting down... Say in the event
of a DoS (or a telemarketer)... If you want to do a soft limit that¹s just
want mod_limit is for and will allow you to do 2 things when used in
conjunction with the max_sessions and sps limits... 1) Soft Limit and still
log the calls 2) still have a hard limit that keeps the box for falling over
dead... 

You can do this with a simple step at the top of your dialplan that
mod_limits everything together...

K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081203/56644763/attachment-0002.html 


More information about the FreeSWITCH-users mailing list