Want to be able to limit simultaneous calls coming in and give busy signal.
Currently are using extensions_custom.conf and have it working to limit incoming calls via this bit of code:
[destination-limits]
exten => s,1,NoOp(Define max channels and destination here)
exten => s,n,ExecIf($["${CALLERID(dnid)}" = “+15555556397”]?Set(MAXCHANS=1))
exten => s,n,ExecIf($["${CALLERID(dnid)}" = “+15555556397”]?Set(LINEGROUP=6397))
exten => s,n,ExecIf($["${CALLERID(dnid)}" = “+15555554090”]?Set(MAXCHANS=2))
exten => s,n,ExecIf($["${CALLERID(dnid)}" = “+15555554090”]?Set(LINEGROUP=4090))
exten => s,n,Set(GROUP(line)=${LINEGROUP})
exten => s,n,Macro(call-limiter-routing,${MAXCHANS},${LINEGROUP})
[macro-call-limiter-routing]
exten => s,1,NoOp(Checking limits and routing to destinations)
exten => s,n,NoOp(Incoming DID is ${CALLERID(dnid)} for Line(${ARG2}))
exten => s,n,Set(MAXCHANNELS=${ARG1})
exten => s,n,Set(ACTUALCHANNELS=${GROUP_COUNT(${ARG2}@line)});
exten => s,n,GotoIf($["${MAXCHANNELS}" = “”]?proceed)
exten => s,n,GotoIf($["${MAXCHANNELS}" >= “${ACTUALCHANNELS}”]?proceed)
exten => s,n,GotoIf($["${ACTUALCHANNELS}" > “${MAXCHANNELS}”]?hangup)
exten => s,n,Answer
exten => s,n,Playtones(busy)
exten => s,n,Wait(8)
exten => s,n,Hangup
exten => s,n(proceed),Goto(from-did-direct,${ARG2},1)
exten => s,n,Hangup()
exten => s,n(hangup),Answer
exten => s,n,Playtones(busy)
exten => s,n,Wait(8)
exten => s,n,Hangup
The above takes incoming DIDs and if they match, it will limit it to a number you set and give a busy signal if it goes over the max number.
We want to be able to add totals for extensions dialing out to the total number of calls in a DID group so it will be busy if too many agents are on outgoing lines.
I’ve tried the code below, but it will not continue dial out for the extension. Also we need to be able to dial extension to extension and with this code in place that will not work either.
Is there something like the below NON WORKING code that can be put in place that will add extensions calling out to the group totals?
[from-internal-custom]
exten => _X.,1,NoOp(########## LIMIT CALLS STUFF ############)
same => n,ExecIf($["${CALLERID(number)}" = “10”]?Set(LINEGROUP=4090))
same => n,ExecIf($["${CALLERID(number)}" = “11”]?Set(LINEGROUP=4090))
same => n,ExecIf($["${CALLERID(number)}" = “100”]?Set(LINEGROUP=4090))
same => n,ExecIf($["${CALLERID(number)}" = “101”]?Set(LINEGROUP=4090))
same => n,ExecIf($["${CALLERID(number)}" = “102”]?Set(LINEGROUP=4090))
same => n,ExecIf($["${CALLERID(number)}" = “103”]?Set(LINEGROUP=4090))
same => n,ExecIf($["${CALLERID(number)}" = “104”]?Set(LINEGROUP=4090))
same => n,ExecIf($["${CALLERID(number)}" = “105”]?Set(LINEGROUP=6397))
same => n,NoOp(Linegroup ${LINEGROUP}.)
same => n,Set(GROUP(line)=${LINEGROUP})
same => n,Set(COUNT=${GROUP_COUNT(${LINEGROUP}@line)})
same => n,NoOp(There is ${COUNT} concurent call(s) for Line(${LINEGROUP}).)
same => n,Macro(dial)
Also tried it with the below versions of executing a dial.
#same => n,Macro(user-callerid)
#same => n,Dial(SIP/${EXTEN})
#exten => _X.,n,Macro(user-callerid)
#exten => _X.,n,Dial(${ARG1},20)
Any ideas?
Thanks for any help!