FruitNotes beta
Your All-in-One Online Notebook
FruitNotes Blogs | Home  
Limiting Asterisk calls
Last updated at (Mon Apr 07 2008 16:53:38)
Posted by: Nitin Gupta
0%




Asterisk counting Calls

From 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 Calls

From 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 


Rate this blog

   Report Abuse


Comments


From james hopes at Fri Jan 21 2005 04:26:30 GMT 0500 (Pakistan Standard Time)

Man's technological ascent began in earnest hookah in what is known as the Neolithic period ("New stone age"). The invention of polished stone axes was a major advance because it allowed forest clearance on a large scale to create farms. The discovery of agriculture allowed for the feeding of web host larger populations, and the transition to a sedentist lifestyle increased the number of children that could be simultaneously raised, as young children no longer needed to be wireless broadband carried, as was the case with the nomadic lifestyle. Additionally, children could contribute labor to the raising of crops more readily than they could to the dedicated hosting hunter-gatherer lifestyle.[29][30]

-----------

Leave your comment(s) below:
To start Your own Blog




Other Blogs
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
» 
2007 FruitNotes.com - All Rights Reserved.