(Original) Elastix extension internal call restriction, such as mutual calls are not allowed between different departments

1. How to assign an internal extension to each department with a number rule

2. Can communication be restricted between departments; or can communication be restricted between superiors and subordinates

 

For example: a company has two departments, department A and department B

Question 1: It's relatively simple. Create two batches of extensions with different prefixes and use them for different departments.

Create two batches of extension numbers, 8001 - 8009 (assigned to Department A)

                            9001 - 9009 (assigned to Division B)

                            9011 - 9019 (assigned to Division C)

                            8011 - 8019 (assigned to Division D)

Question 2: It's a bit complicated, the following focuses on the content of question 2

 

Problem 2 is complicated by

(1) On the configuration page of Elastix, you can talk to each other directly without configuring extension call routing. So this problem must be done in the configuration file

(2) Elastix's dial plan configuration files (files starting with extensions) are related to each other, and the content of some files is automatically generated, so you cannot modify the dial plan files indiscriminately to avoid other problems in the call center system.

 

Therefore, it is necessary to have a certain understanding of the configuration file structure of Elastix.

 

First, the analysis is where to modify the dial plan

Through the mutual dialing between extensions, you can see that the internal extensions call each other, and the context of ext-local in the extensions_additional.conf file will be preferentially entered. 

In theory, when we want to limit internal extension calls, we can configure it in this context. But be aware that the extensions_additional.conf configuration file content is automatically generated, even if this configuration file is modified, once the system restarts, all modified content will be reset. So the content of this file cannot be modified. We need to modify the dial plan configuration, mainly in

extensions_custom.conf , that is, this custom configuration file to modify the content.

 

First look at the configuration of this ext-local:

 

[ext-local]

include => ext-local-custom

exten => 8001,1,Macro(exten-vm,novm,8001)

exten => 8001,n,Goto(${IVR_CONTEXT},return,1)

exten => 8001,n,Goto(from-internal,8001,1)

exten => 8001,hint,SIP/8001

exten => 8002,1,Macro(exten-vm,novm,8002)

exten => 8002,n,Goto(${IVR_CONTEXT},return,1)

exten => 8002,n,Goto(from-internal,8002,1)

exten => 8002,hint,SIP/8002

exten => 8003,1,Macro(exten-vm,novm,8003)

exten => 8003,n,Goto(${IVR_CONTEXT},return,1)

exten => 8003,n,Goto(from-internal,8003,1)

exten => 8003,hint,SIP/8003

exten => 8004,1,Macro(exten-vm,novm,8004)

exten => 8004,n,Goto(${IVR_CONTEXT},return,1)

exten => 8004,n,Goto(from-internal,8004,1)

exten => 8004,hint,SIP/8004

exten => 9025,1,Macro(exten-vm,novm,9025)

exten => 9025,n,Goto(${IVR_CONTEXT},return,1)

exten => 9025,n,Goto(from-internal,9025,1)

exten => 9025,hint,SIP/9025

exten => 9105,1,Macro(exten-vm,novm,9105)

exten => 9105,n,Goto(${IVR_CONTEXT},return,1)

exten => 9105,n,Goto(from-internal,9105,1)

exten => 9105,hint,SIP/9105

exten => vmret,1,GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret)

exten => vmret,n,Hangup

exten => vmret,n(playret),Playback(exited-vm-will-be-transfered&silence/1)

exten => vmret,n,Goto(${IVR_CONTEXT},return,1)

exten => h,1,Macro(hangupcall,)

 

; end of [ext-local]

 

Through the above configuration, you can see that when dialing an extension, each extension is configured with an extension number to receive incoming calls from internal extensions.

If we want to implement the internal extension limit, we need to configure it in the previous context of this context.

 

You can see it through the configuration of extensions_additional.conf 

include => app-pickup

include => app-zapbarge

include => app-chanspy

include => ext-test

include => ext-local

include => outbound-allroutes

exten => h,1,Hangup

 

Before ext-local, it is ext-test. If we want to modify it, we need to modify it in this context.

[ext-test]

include => ext-test-custom

exten => 7777,1,Macro(user-callerid,)

exten => 7777,n,Goto(from-pstn,${EXTEN},1)

 

exten => h,1,Macro(hangupcall,)

 

 

;--== end of [ext-test] ==--;

 

In this context, you can see that the context ext-test-custom is included 

 

At the end of extensions_custom.conf, we add a context named ext-test-custom   

 

2. Configure the content of ext-test-custom

 

For example: in the above situation, the number of department A is 8001-8009, the number of department B is 9001-9009, and the number of department C is 9011-9019

, Department D, the number is 8011-8019 (the number of Department D, for reference only)

In order to solve more complex situations, so here I use the matching method to do it. For example, department A cannot call department C, except department B.

 

[ext-test-custom]

exten=>_90[0-1]X,1,Set(cidp2=${CALLERID(num):0:2}) ;Intercept the first two digits of the calling number, such as 8001, to get 80

exten=>_90[0-1]X,n,Set(cidp3=${CALLERID(num):2:1}) ;Intercept the third digit of the calling number, such as 8011, to get 1

exten=>_90[0-1]X,n,GOTOIF($[${cidp2}=80]?:20) ;If the first two digits match 80, continue the process

exten=>_90[0-1]X,n,GOTOIF($[${cidp3}=0]?10:20) ; if the third digit is a number between 0, in order to distinguish it from department D

 

exten=>_90[0-1]X,10,Noop(call limited) ;call limited

exten=>_90[0-1]X,n,hangup

 

exten=>_90[0-1]X,20,Noop(call will be continue............) ; When the call is allowed, go to ext-local for processing

exten=>_90[0-1]X,n,GOTO(ext-local,${EXTEN},1)

 

In this way, the calls between departments A and B and C are restricted.

 

What if, at the same time, departments A and D are not allowed to talk to B and C?

Here, we just need to replace the above 

exten=>_90[0-1]X,n,GOTOIF($[${cidp3}=0]?10:20) ; if the third digit is a number between 0, in order to distinguish it from department D

 

change into:

exten=>_90[0-1]X,n,GOTOIF($[${cidp3}>=0&& ${cidp3}<=1 ]?10:20) ;The judgement here can also use && to express and It means that if the third digit is greater than or equal to 0, but less than or equal to 1, they are not allowed to talk to each other.

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326941627&siteId=291194637