[asterisk-dev] How to get to 10.000 open calls

Alex Balashov abalashov at evaristesys.com
Wed Apr 22 03:50:06 CDT 2009


It is not an easy thing to just explain.  It's a rather abstruse 
product.  Unless you want to spend a lot of time learning its ins and 
outs, I recommend hiring someone to deal with it.

Venefax wrote:

> Does anybody know a document that would explain Openser to an Asterisk
> specialist? How to configure a dialplan, how to call a database for
> information, etc?
> My Asterisk dialplan for a round-robin load balancer between 3 IP addresses
> goes below. How would you express the same simple idea in OpenSer? The
> technique sends each to a different IP, defined in the global vars GW0, GW1
> and GW2. It is not a true load balancer, but it works quite well.
> 
> [general]
> static=yes
> writeprotecit=no
> extenpatternmatchnew =yes
> clearglobalvars=yes
> [globals]
> GW0 = xx.zz.rr.tt
> GW1 = aa.bb.ede.yr
> GW2 = rr.tt.yy.ddd
> MX = 3
> MXC =0
> [default]
> exten =>_X.,1,NoOp(${CHANNEL(channeltype)} Active: ${GW})
> exten =>_X.,n,Set(CALLERPRES()=allowed) ; ONLY trunk
> exten =>_X.,n,Set(GROUP()=trunkgroup1)               ;Set Group
> exten =>_X.,n,Set(SIPIP=${SIPCHANINFO(recvip)})
> exten =>_X.,n(entrada),GotoIf($["${EXTEN:0:1}" = "1"]?dialout,${EXTEN},1)
> exten =>_X.,n,GotoIf($["${EXTEN:0:1}" = "0"]?dialout,${EXTEN},1)
> exten =>_X.,n,Goto(dialout,${EXTEN},1)
> exten =>_X.,100,Hangup(34)
> exten =>_X.,300,NoOp(${CHANNEL})
> exten =>_X.,301,Set(SIPIP=${CUT(CHANNEL,:,1):8})
> exten =>_X.,302,Goto(entrada)
> 
> 
> [dialout]
> exten =>_X.,1,Set(GLOBAL(MXC)=${MATH(${MXC}+1,int)})
> exten =>_X.,n,NoOp(MXC=${MXC}  ${MX})
> exten =>_X.,n,NoOp(${MATH(${MXC} % ${MX},int)})
> exten =>_X.,n,Goto(dialoutx,${EXTEN},1)
> [dialoutx]
> exten =>_#X.,1,Dial(SIP/${EXTEN:1}@${GW${MATH(${MXC} %
> ${MX},int)}},45,L(3600000))
> exten =>_#X.,n,Hangup()
> exten =>_X.,1,Set(Target=${GW${MATH(${MXC} % ${MX},int)}})
> exten =>_X.,n,Verbose(0,Dialing ${EXTEN} to ${Target})
> exten =>_X.,n,Dial(SIP/${EXTEN}@${Target},45)
> exten =>_X.,n,Hangup()
> 
> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com
> [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of
> alexander.harrowell at stlpartners.com
> Sent: Wednesday, April 22, 2009 4:24 AM
> To: Asterisk Developers Mailing List
> Subject: Re: [asterisk-dev] How to get to 10.000 open calls
> 
> IfByPhone, which provides a hosted platform for voice CRM apps, is using a
> big gaggle of Asterisken to handle calls. They face a scaling issue in
> terminating incoming calls from their SIP peers and routing them into the
> Asterisk cloud.
> 
> They are using OpenSER to talk to the peers and do the initial triaging of
> calls into Asterisk queues.
> 
> -original message-
> Subject: Re: [asterisk-dev] How to get to 10.000 open calls
> From: Alex Balashov <abalashov at evaristesys.com>
> Date: 22/04/2009 8:41 am
> 
> A proxy derived from the OpenSER stack could do it.
> 
> Venefax wrote:
> 
>> Yes, I have the box. And I will get the calls next week. I was thinking to
>> use the Asterisk feature where you can start different Asterisk using -C
>> \path_to\config\file, and start 15 instances. But to be able to load
> balance
>> it is a nightmare, since many clients do not accept or follow redirects
> (SIP
>> 302 Moved). I am out of tricks, unless I setup another technology for load
>> balancing but then why not use the same (x) technology for everything?
> What
>> technology would that be that can handle 10.000 sip connections, not
>> touching the media? My Cisco 7301 would not scale so far out.
>>
>> -----Original Message-----
>> From: asterisk-dev-bounces at lists.digium.com
>> [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Tzafrir Cohen
>> Sent: Wednesday, April 22, 2009 3:19 AM
>> To: asterisk-dev at lists.digium.com
>> Subject: Re: [asterisk-dev] How to get to 10.000 open calls
>>
>> On Wed, Apr 22, 2009 at 02:48:11AM -0400, Venefax wrote:
>>> I am using 1.6.2 and directrtp=yes. I need to scale to 10.000 open calls
>> on
>>> a box with 1288 GB or RAM and 16 Cores. Is there any modification to the
>>> source code that would be obvious, any bottlenecks? I will never to
>>> transcoding and the media should, theoretically, flow outside. I have 15
>> IP
>>> addresses already configured in the same box, on two different nics, to
>>> spread the interrupts. Is this a dream or will this work with some
>> tweaking?
>>
>> Do you have the system now?
>>
>> While it's most likely be a dream, identifying the current bottlenecks
>> might  be useful :-)
>>
>> Just a few uneducated guesses of my own:
>>
>> * More than one IP per NIC won't help and only cause some administrative
>>   issues
>> * I'm not sure how much the extra memory can help. I suspect htat if you
>>   boot the system with mem=<whatever_needed_for_16GB> the results won't
>>   differ greatly
>> * It would also be interesting to see how the results scale with various
>>   values numbers of cores. This is again something you can set at boot
>>   (numcpus=N). I wonder just how far from linear it will be.
>>
> 
> 


-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775



More information about the asterisk-dev mailing list