How to Use AGI in Asterisk

Hi everyone!

I want to add some custom functionality using asterisk and php . I want to implement it using AGI. But want to how to call agi file and call it in conf file (extensions.conf)

And I also want to know to call custom conf files in asterisk.I want to USE test_extensions.conf file with extension.conf.

Thank you in advance.
With regards, Sophia.

Thank you so much David. I have implemented the AGI using above two links.