Function results into variables

hi all…

how do i assign a function esult to a variable? i don;t have the res_php installed apparently…
this works fine:

exten => s,n,System(${path1}/scripts/test02.php ${phn})

but if like i have something like:

exten => s,n,Set(p=${System({path1}scripts/test03.php)})
; or SetVar(p=…)
exten => s,n,SayAlpha(${p})

i get this:
Oct 30 03:24:18 ERROR[9704]: pbx.c:1388 ast_func_read: Function System not registered

and the machine says ‘0’ (zero)…

how do i get a function result into a variable then?


System returns 0/1 as Failure / Success result.
You have to use SETkeyword in script.
for bash script it is:
echo "SET VARIABLE test 50"
one topic abou it