Limit number of simultaneous incoming IAX calls?

Would this work to limit the number of simultaneous incoming calls that my toll free IAX number can accet to 3? The provider sets no limit. Anyone have a better way?

exten => 8001234567,1,Set(GROUP()=exgn)
exten => 8001234567,2,GotoIf($[${GROUP_COUNT()} > 3]?103)
exten => 8001234567,3,Dial(Zap/5,25,tT)
exten => 8001234567,4,Voicemail,u110
exten => 8001234567,5,hangup
exten => 8001234567,103,Busy
exten => 8001234576,104,hangup

have you asked your provider if they are willing to set a limit for you? (maybe backing it up with their voicemail system if they provide that service so that you can play a more pleasant message than ‘all circuits busy’?


They can set a limit but I’d like to be able to change it at will on my end. I’d like to have callers hear a busy signal when the limit is in effect instead of “call could not be completed…” but so far have not been able to quite get that to work.

Setting the number of calls field to 2 in my asterisk@home, that apparently sets:


(2 is my exgn trunk)

give that a try?

Thanks - I’m not using A@H, but I did find a solution. I guess I was not actually answering the call and that caused the undesired message. But this does eactly what I want:

;exten => 1234567,1,Set(GROUP()=exgn)
;exten => 1234567,2,GotoIf($[${GROUP_COUNT()} > 3]?103)
;exten => 1234567,3,Dial(Zap/5&Zap/6,20,t)
;exten => 1234567,4,Voicemail,u110
;exten => 1234567,5,Hangup
;exten => 1234567,103,Answer
;exten => 1234567,104,Playtones(busy)
;exten => 1234567,105,Wait(5)
;exten => 1234567,106,Hangup

my only commnet, if you are doing this to throttle bandwidth, the answered call will take up bandwidth for the duration of the busy which will effect call quality of the other calls if your combined data consumption exceeds your bw.