Limit the concurrent calls managed by the system

Editing the etc/asterisk/extensions_xcally_custom.conf file and setting the proper Dial Plan instructions, you can limit some type of calls on your system.

Please note that:

  • all the calls landed in the dial plan must be associated to a "group"
  • all the dial plans must have the same instruction as first.

For example, you can limit in/out international calls:


1. Modify the extensions_xcally_custom.conf file, adding the following lines

[globals](+)
CALLIMITNUM= 100
(100 is an example…)

[overrun]

(Is possible to define a different name of this context… remember that is used in the dial plan settings too!)


exten => _98989898,1,Verbose(1,***** Server2 dialing ${EXTEN} *******)

(the exten 98989898 is an example… remember that is used in the dial plan settings too!)


same => n,Set(DIALSTATUS=CHANUNAVAIL)

(Is possible to define different operations to do. In this example the system doesn’t take the call)

 

Please run the command “Dialplan reload” from Asterisk CLI

2. Modify the Dial Plan instructions

Add for each Dial Plan these applications as first:

 

Conclusions

Each call landed in a dial plan with this application, will be “checked” according to the condition.

It’s clear that is possible to “manage” the overflow defined forwarding the calls in a desired context (another DID wit another queue or a voicemail…).