[asterisk-users] Help needed with getting a maxed-out Asterisk to gracefully deny calls.
Chris Kairalla
cdkf92 at yahoo.com
Fri Aug 28 12:35:21 CDT 2009
Hello Asterisk List,
My company is running a bunch of Asterisk servers behind a Kamailio
(openSER) SIP proxy gateway. Calls come in from our PTSN to VOIP
service to Kamailio, which then randomly chooses an Asterisk server to
handle the call. All Asterisk servers are 1.6.0.9, but the issue I'm
about to describe exists in 1.6.1.5-rc1 as well.
Ultimately what I want to do is cap each Asterisk server at a maximum
number of simultaneous calls. If the maximum number is hit, I want
the call to get sent back to Kamailio which would then randomly send
the call to another Asterisk server.
The easiest way to accomplish this seems to be in the asterisk.conf
file. In asterisk.conf is this line:
maxcalls=100 ; Maximum amount of calls allowed
This is great, and asterisk will deny calls once it hits this max
number. OK, here's where I get stuck. Once that max is reached,
Asterisk will send a "480 Temporarily Unavailable", which is great,
and a "BYE" which is not great, as that gets passed along to the PTSN
and hangs up the call. Kamailio properly sends the call to another
Asterisk server, but the call no longer exists because of the BYE and
the call eventually times out on the new Asterisk server.
Is this BYE a bug in the way Asterisk handles SIP, or is this normal
SIP behavior and I should find another way to gracefully deny the call
back to Kamailio?
Thanks list,
Chris
More information about the asterisk-users
mailing list