Arguments are also available as AGI environment variables in the form ‘agi_arg_x’ where x is the position in the argument list passed to agi().
Personally, I don’t like positional arguments. I prefer passing arguments as ‘long options’ and parsing argv using ‘getopt_long().’ For example, I would pass arguments like:
Thank you for your answers ! I will look that.
I only need one variable, that’s the “number” to call (it’s a simple push notification script). I follow @aabreu’s context but i have some trouble with it.
When a user connect on an endpoint with this extension [test], the script is executed in a loop WITHOUT calling someone. I tried to restart and more but i can’t find what is the problem. It’s a Dialplan, so i really don’t know what to do.
But my script do not have loop, i can execute it manually like this “php name.php arg”, and it stop and execute normally.
First, verify you have a value same=>n,Noop( *** ${CallerID} ***)
and I don’t know if that space matter, but you have an space, also you can use system or shell command to run your PHP script but using them you won’t have the AGI log