[asterisk-users] Limiting Simultaneous calls

Robert Lister robl at linx.net
Tue Sep 18 16:02:28 CDT 2007


On Wed, Sep 19, 2007 at 01:56:42AM +0530, Jim Boykin wrote:
> Is there a way to limit simultaneous calls. I like to limit
> simultaneous outgoing calls as more than few simulataneous calls are
> charged by my voip providers. However, I do not want to have any such
> restriction for internal calls.

I think you can do this sort of thing with the Set(GROUP) and GROUPCOUNT to 
monitor number of calls placed in a call 'group' which in this context does 
not mean a pickup group or a caller group, it means 'a group of calls set up 
in group $foo' (where $foo is some variable)

Take a look at:-

http://www.voip-info.org/wiki/view/Asterisk+cmd+SetGroup

and:-

http://www.voip-info.org/wiki/index.php?page=Superdial%20macro

To see how it is used to limit the number of outgoing calls to a PSTN 
carrier.

'group' could be a global setting you give it, or the extension number of 
the user (to limit globally or per extension)


Specifically:-

${ARG6} - Max. group number (maximum number of concurrent calls you want to 
allow for that group)

exten => s,1,Set(GROUP()=${ARG5})
exten => s,2,Set(GROUPCOUNT=${GROUP_COUNT(${ARG5})})
exten => s,3,GotoIf($[${GROUPCOUNT} > ${ARG6}]?104)

exten => s,104,Goto(s-CHANUNAVAIL,1)

etc.


Rob



-- 
Robert Lister     - London Internet Exchange - http://www.linx.net/
sip:robl at linx.net - inoc-dba:5459*710        - tel: +44 (0)20 7645 3510



More information about the asterisk-users mailing list