run a script when I call an extension

Status
Not open for further replies.

maisx

Free User
Joined
Jan 9, 2019
Messages
5
Reaction score
0
Hello everyone I'm playing with 3cx on debian I would like to create a fake extension where when I call it I run a linux script SH and then hang up.
I wanted to understand if someone did something like this can give me some advice
thanks 1000
Maisx
 
You could make a fake trunk that port knocks the local box and have a script run on that event.
 
thank you very much for your answer please give me some detailed information TKS Maisx
 
thank you very much for your answer please give me some detailed information TKS Maisx

to start with, you will need to learn about knockd.

so lets say you have setup knockd to listen for sequence = 2000,2001,2003 and then run your bash script.


trunk setup:
name:
fake trunk 1
Registrar/Server/Gateway Hostname or IP:
localhost
port:
2000

fake trunk 2
Registrar/Server/Gateway Hostname or IP:
localhost
port:
2001

fake trunk 3
Registrar/Server/Gateway Hostname or IP:
localhost
port:
2003


outbound rules:
Rule Name:
bashscript1

Calls to Numbers with a length of:
16

Route 1:fake trunk 1
Route 2:fake trunk 2
Route 3:fake trunk 3


fake extension to run bashscript:
555
Forwarding Rules tab:
if call not answered, forward to number: external number:0000000000000000
 
Status
Not open for further replies.

Forum statistics

Threads
111,910
Messages
589,690
Members
164,775
Latest member
Chester McTester