-
Notifications
You must be signed in to change notification settings - Fork 1
/
extensions_custom.conf
33 lines (28 loc) · 1.15 KB
/
extensions_custom.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[ext-local-custom]
; Intrusion. Custom dialplan for listen, whisper and barge in calls
exten => _*22[2-4]2XXX,1,NoOp(${CALLERID(number)}) ; Mask for your extensions where intrusion is allowed, 2XXX for example
same => n,GotoIf($[ "${CALLERID(number)}" =~ "^(2100|2101|2103)$"]?okay:exit) ; List of extensions from which intrusion is allowed
same => n(okay),Gosub(read-proc,s,1)
same => n,Gotoif($[${DROP} = 1]?exit:go)
same => n(go),Macro(user-callerid,)
same => n,Answer()
same => n,NoCDR()
same => n,Wait(1)
same => n,Gosub(type-proc,cell${EXTEN:1:3},1)
same => n,NoOp(type = ${type})
same => n,Playback(beep)
same => n,ChanSpy(PJSIP/${EXTEN:4},${type}) ; Set needed channel driver here like SIP, PJSIP, SCCP, OOH323, etc.
same => n(exit),Hangup()
[read-proc]
exten => s,1,Read(Secret,beep,4)
exten => s,n,NoOp(${Secret})
exten => s,n,Gotoif($[${Secret} = 7280]?ret:drop) ; Pin code for intrusion, you can use any 4 digits
exten => s,n(drop),Set(DROP=1)
exten => s,n(ret),Return()
[type-proc]
exten => cell222,1,Set(type=q) ;listen
same => n,Return()
exten => cell223,1,Set(type=qw) ;whisper
same => n,Return()
exten => cell224,1,Set(type=qB) ;barge
same => n,Return()