Call php file on incoming call (asterisk)

Different use case, but @billsimon’s solution will work for you as well. Essentially make a custom context that calls the AGI and use that for your inbound route.