Limiting Asterisk calls Asterisk counting CallsFrom Cyber-cottage.co.uk The idea here is to count the incoming and outgoing calls The reason to do this would be if you have limited channels or bandwith and want to step cleanly on at a defined call volume To do this we will use GROUP and GROUP_COUNT
[edit]
Outgoing Macro
exten => s,1, Set(GROUP()=OUTBOUND_GROUP)
exten => s,2, Noop(${GROUP_COUNT(OUTBOUND_GROUP)})
exten => s,3, GotoIf($[${GROUP_COUNT(OUTBOUND_GROUP)} > 8]?103)
exten => s,4, ;THE REST OF YOUR INCOMING DIALPLAN
[edit]
Incoming Macro
exten => s,1, Set(GROUP()=OUTBOUND_GROUP)
exten => s,2, Noop(${GROUP_COUNT(OUTBOUND_GROUP)})
exten => s,3, ;THE REST OF YOUR INCOMING DIALPLAN
[edit]
How it works.Lines 1 and 2 are the same for both incoming and outgoing, line1 sets the GROUP name to OUTBOUND_GROUP and line 2 displays the value on the CLI for testing and debug Line 3 of the incoming then checks the value of the GROUP and if its greater than the alue you set it will jump to prioriy 103 in this case, if it is less we just carry on through the dialplan. You can use the limit on incoming calls to limit the number of calls to a queue for example and send them to a message first. Asterisk counting CallsFrom Cyber-cottage.co.uk The idea here is to count the incoming and outgoing calls The reason to do this would be if you have limited channels or bandwith and want to step cleanly on at a defined call volume To do this we will use GROUP and GROUP_COUNT
[edit]
Outgoing Macro
exten => s,1, Set(GROUP()=OUTBOUND_GROUP)
exten => s,2, Noop(${GROUP_COUNT(OUTBOUND_GROUP)})
exten => s,3, GotoIf($[${GROUP_COUNT(OUTBOUND_GROUP)} > 8]?103)
exten => s,4, ;THE REST OF YOUR INCOMING DIALPLAN
[edit]
Incoming Macro
exten => s,1, Set(GROUP()=OUTBOUND_GROUP)
exten => s,2, Noop(${GROUP_COUNT(OUTBOUND_GROUP)})
exten => s,3, ;THE REST OF YOUR INCOMING DIALPLAN
[edit]
How it works.Lines 1 and 2 are the same for both incoming and outgoing, line1 sets the GROUP name to OUTBOUND_GROUP and line 2 displays the value on the CLI for testing and debug Line 3 of the incoming then checks the value of the GROUP and if its greater than the alue you set it will jump to prioriy 103 in this case, if it is less we just carry on through the dialplan. You can use the limit on incoming calls to limit the number of calls to a queue for example and send them to a message first.
Reference:http://www.cyber-cottage.co.uk/wiki/index.php?title=Asterisk_counting_Calls Comments Leave your comment(s) below: | To start Your own Blog Other Blogs » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » » |

