Skip to content

Commit

Permalink
Create extensions_custom.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
miclast committed Jan 21, 2021
1 parent 4e1601f commit bd3bba4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions extensions_custom.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[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
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,ChanSpy(PJSIP/${EXTEN:4},${type})
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)
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()

0 comments on commit bd3bba4

Please sign in to comment.