Asterisk zap pri,limit number of simultaneous calls

I have a setup like this
PRI(E1) <-> zap hardware <-> asterisk

i want to limit the number the simultaneous calls to a maximum of 5 calls. If i get a 6th call i want to give it congestion. My PRI operator will throw a call on any random channel so i have to accept calls on all 30 channels.

Thanks in advance

mnaffar

[from-zap]
exten => _00XXXXXXXX.,1,Set(GROUP(ALL)=OUTBOUND_GROUP)
exten => _00XXXXXXXX.,2,GotoIf($[${GROUP_COUNT()} > ] ? 5)
exten => _00XXXXXXXX.,3,Set(CDR(accountcode)=${GROUP_COUNT()})
exten => _00XXXXXXXX.,4,Dial(SIP/NSB_GSK/${EXTEN},40,L(3600000))
exten => _00XXXXXXXX.,5,Congestion()
exten => _00XXXXXXXX.,6,Hangup()