That gives you a remote AGI, but not a fast one! (There may be some speed advantage, even without this, as you won’t fork the whole of Asterisk before exec’ing the script, but I’d really expect a self contained server to get a real advantage.)
To really get speed advantages you need to have a loop on accept() in the script itself. What the article describes put that loop in xinetd, so it will PHP will get launched for every new invocation.
Things that could go wrong in your case are:
- having the wrong value for server;
- using relative file names that assume a different current directory from that in which xinetd is running (you really shouldn’t use any relative names);
- assuming the presence or contents of environment variables which differ from those available to xinetd.
As it is running a root, you shouldn’t have permission problems, as long as the script is marked executable for someone.