How to execute custom AGI script from IVR

Hi
I have installed latest FreePBX-Distro-Net-64bit-1.811.210.57. And I have some problems with custom AGI script. I need to have destination in my IVR that executes the AGI script (for example check balance by inputting ID …). I have tried to install “dialplan injection module” and write some custom dialplan, but this module installation fails in this version of freepbx. Is there any other solution for my case?

Any help will be appreciated.
Thanks in advance.

Use extensions_custom.conf for your required dialplan and register the destination in the custom destinations registry and then assign that to your desired IVR selection.

Thank you for your replay, I have done this, and everything is working fine.

Hi know this post for a long time ago
but I have a same problem, how can I add destination for IVR to execute AGIPHP script?

Any help will be appreciated.
thanks a lot

Go to your extensions_custom.conf. Edit that file, and write your dialplan that executes your PHPAGI script, then create custom destination from FREEPBX menu, then point your IVR to that destination.

Your custom dialplan can be something like this

exten=> 111,1,Wait(1)
exten=> 111,n,AGI(your_script_name.php, ${CallerID}) ; you can use more arguments or you can use this line without any arguments. For example
; exten=> 111,n,AGI(your_script_name.php)
exten=> 111,n,Hangup()

and replace 111 with anything you need.

thanks a lot
I did it
but it dose not work
I don’t know whats wrong whit it

my custom dial :
[CardRegister]
exten => _X. ,1,Answer
exten => _X. ,n,Playback(welcome)
exten => _X. ,n,Wait(0.5)
exten => _X. ,n,AGI(CardRegister.php)
exten => _X. ,n,NoOP(Oskoool bazi dar nayaaar!!!)
exten => _X. ,n,Hangup

and I add the custom destination in freePBX and in the IVR I set number 2 to running that script
but it does not work

I don’t know what happened but it works :smiley:
I’m so excited : )
It took 2 weeks for me and made me mad, but now it trying to be a good code.

Thank you for taking the time

You’re welcome.

Is there another setting for this?
I changed my asterisk and now it stops working again
all settings are the same as they ware

I really confused!!
could you please assist meeeee!!!