Index: main/pbx.c =================================================================== --- main/pbx.c (revision 60173) +++ main/pbx.c (working copy) @@ -1642,7 +1642,13 @@ parse_variable_name(vars, &offset, &offset2, &isfunction); if (isfunction) { /* Evaluate function */ - cp4 = ast_func_read(c, vars, workspace, VAR_BUF_SIZE) ? NULL : workspace; + if (c) + cp4 = ast_func_read(c, vars, workspace, VAR_BUF_SIZE) ? NULL : workspace; + else { + struct ast_channel c = { 0, }; + memcpy(&c.varshead, headp, sizeof(c.varshead)); + cp4 = ast_func_read(&c, vars, workspace, VAR_BUF_SIZE) ? NULL : workspace; + } if (option_debug) ast_log(LOG_DEBUG, "Function result is '%s'\n", cp4 ? cp4 : "(null)");