Is it possible to increment a call group (Max_Calls) from one server to the next server?

I'm trying to set a maximum call limit between two facilities (2 Asterisk servers) using Set Group. I want the limit to be set at 4. The problem with the code that I have in place, is it allows for 4 on each server, hence the possibility of maxium of 8 concurrent calls.

I need to be able to, when 1 call is placed, that each server sets it's Max_Calls to 1, and increases for each additional call. My code snippet below:

exten => _42XX,1,SetGroup(Max_Calls)
exten => _42XX,n,NoOP(Active Calls: ${GROUP_COUNT(Max_Calls)})
exten => _42XX,n,GotoIf($[ ${GROUP_COUNT(Max_Calls)} > 4 ]?103)
exten => _42XX,n,Dial(IAX2/bc.asterisk:[EMAIL PROTECTED]/${EXTEN},,t)
exten => _42XX,103,Congestion()

Is it possible to SetGroup(Max_Calls) on in bound?

Any suggestion?

Thanks!

Doug

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to