[asterisk-users] Compatibilty between agi for asterisk 13.8.0 and php5.6
A J Stiles
asterisk_list at earthshod.co.uk
Wed May 4 08:13:01 CDT 2016
On Wednesday 04 May 2016, Mamadou NGOM wrote:
> Hello everybody,
> When I call my extension the agi script don't work well. when I look at
> the cli, that is what I have:
> [stuff deleted]
> <SIP/myprovider-00000007>AGI Tx >> agi_arg_1: 56
> <SIP/myprovider-00000007>AGI Tx >>
> <SIP/myprovider-00000007>AGI Rx << SET VARIABLE ****** 2
> <SIP/myprovider-00000007>AGI Tx >> 510 Invalid or unknown command
> -- <SIP/myprovider-00000007>AGI Script *******.php completed, returning 0
> I looked on the Internet but I saw a clear answer
> it is sure that it is for the compatibility between php5.6 and agi. if
> somebody can help me.
It looks as though something might be going wrong in the AGI script itself.
Did you use a "proper" AGI library, or a quick-and-dirty homebrew solution?
(There is little virtue in walking all the way to the tool shed to fetch a
chisel, if you know the screwdriver you already have in your drawer can be
used for the job. On the other hand, breaking your screwdriver by
inappropriately using it as a chisel does not look too good either. Knowing
the difference is one of the qualities of a great programmer.)
SET VARIABLE is a legitimate enough command, but ****** probably is not a
valid variable name. Maybe there was a forbidden character in there before
you redacted it?
I would try to isolate the problem, by writing an AGI script that *just* sets
a variable to some fixed value and exits; and having a corresponding extension
that *just* calls the AGI script, displays the variable's value in the CLI
with a NoOp() statement and then hangs up. When you know you can do that, and
successfully read back the value from within your dialplan, *then* you can
make it decide what value to put in that variable.
--
AJS
Note: Originating address only accepts e-mail from list! If replying off-
list, change address to asterisk1list at earthshod dot co dot uk .
More information about the asterisk-users
mailing list