Index: funcs/func_strings.c =================================================================== --- funcs/func_strings.c (revision 8072) +++ funcs/func_strings.c (working copy) @@ -50,8 +50,11 @@ if (delim) { varname = strsep(&delim, "|"); pbx_retrieve_variable(chan, varname, &varval, workspace, sizeof(workspace), NULL); - while (strsep(&varval, delim)) - fieldcount++; + if(delim) { + while (strsep(&varval, delim)) + fieldcount++; + } else if (varval) + fieldcount = 1; snprintf(buf, len, "%d", fieldcount); } else { ast_log(LOG_ERROR, "Out of memory\n");