4

I want to limit simultaneous calls per extensions in Asterisk for security reasons. For example when a user is on the call no body else would be able to make a call by that extension.

How can I achieve this?

1 Answer 1

3

There isn't an easy answer to this, but a number of people have suggested solutions. Basically you need to count the outbound channels yourself, as suggested here:

http://www.remiphilippe.fr/2010/05/29/simultaneous-call-limitation-on-asterisk/

The script looks like this, after groups have been enabled as a macro:

[globals]
MAXCALLS=2

[macro-voipcall]
; Limit the number of outgoing calls
; Set Group
exten => s,1,Set(GROUP()=OUTBOUND_GROUP)
; Are we exceeding the limit?
exten => s,2,GotoIf($[${GROUP_COUNT()} > ${MAXCALLS}]?999)
; No? Then dial
exten => s,3,Dial(${ARG1})
; Yes? Then deny
exten => s,999,Set(DIALSTATUS=CHANUNAVAIL)
  • This is taken from the site above; I can't take credit for it, and haven't tested the script, but it seems sound!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .