After hangup,how to redirect to php script?

[from-internal]
exten => _X.,1,Answer()
exten => _X,n,Dial(SIP/2000)
exten => _X,n,Hangup
exten => h,n,NoOp(“Hangup starting…”)
exten => h,n,AGI(/var/www/html/test.php)
exten => h,n,NoOp(“Cleanup code…”)

This is my code.

Please help me,if you can.

Start your h extension with the priority 1 like this exten => h,1,NoOp(“Hangup starting…”)

Add a hangup handler to your channel.

https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers

exten => _X.,1,Answer()
exten => _X.,n,Dial(SIP/8000)
exten => h,1,DeadAGI(/var/lib/asterisk/testhangup.php)
I would like to redirect my php script after hang up .
This dialplan is ok while I calling , answering ,hang up and AGI script is executing complete with no error.
But not redirect to open browser with “Helloworld”.
How can I do?
Please help me if you can.
I would like to speech recognition after hangup.
but my speech recognition page is not appear after hang up
That’s my main problem.

If h extensions is executed successfully, now you need to debug your PHP script, the issue described above is not related to Asterisk at all

I really don’t understand the requirement. The relation between a browsers and a web server is always that the browser is in control. A server can only contact a browser in the form of a response to a request from the browser.

Thanks all of your replies.