QUESTION Run PHP from dialplan on answer

papachumba

Member
Joined
Jun 20, 2013
Messages
86
Reaction score
5
Hi, hi do I change the dialplan to allow me for execution of a php script every time an extension answers an inbound call?

Ive searched high and low, and there is not one single example which shows this clearly.
I understand I have to add an AGI call inside a macro and then attach this macro on the main dialplan for answering, however most examples show how to set up similar things on an extension by extension basis.

I want to apply this to the dialplan so that each time a new extension is added, it will automatically call the php script on answer and pass some variables to it, without having to modify config files over and over again.
 

papachumba

Member
Joined
Jun 20, 2013
Messages
86
Reaction score
5
ie something along the lines of:

exten => ???,1,Answer
exten => ???,n,Wait(0.5)
exten => ???,n,AGI(helloworld.php)
exten => ???,n,Hangup()

also how would I add this to the main dialplan, in from-internal or from-internal-custom?
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top