[asterisk-dev] varget_helper and function

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sat Aug 23 08:09:37 CDT 2008


On Saturday 23 August 2008 04:30:05 Kaloyan Kovachev wrote:
>  i have a custom app (with SVN-branch-1.4-r135597) which needs to read some
> channel variables and function results. The problem is that getvar_helper
> does not return any value, but always null.
>  Is this a bug or i should use different builtin function for the function
> results like CDR(), CALLERID() and MUSICCLASS()? What about setting such
> values?

pbx_builtin_getvar_helper only functions for actual variables, not functions.
If you want results from functions, use ast_func_read directly.
Alternatively, if you want to use one function for both, surround the variable
or function names with "${" and "}" and use pbx_substitute_variables_helper.

-- 
Tilghman



More information about the asterisk-dev mailing list