static struct ast_custom_function fieldqty_function = {
.name = "FIELDQTY",
.synopsis = "Count the fields, with an arbitrary delimiter",
- .syntax = "FIELDQTY(<varname>,<delim>)",
+ .syntax = "FIELDQTY(<varname>|<delim>)",
.read = function_fieldqty,
};
);
char *outbuf = buf;
- AST_NONSTANDARD_APP_ARGS(args, parse, ',');
+ AST_STANDARD_APP_ARGS(args, parse);
if (!args.string) {
- ast_log(LOG_ERROR, "Usage: FILTER(<allowed-chars>,<string>)\n");
+ ast_log(LOG_ERROR, "Usage: FILTER(<allowed-chars>|<string>)\n");
return -1;
}
static struct ast_custom_function filter_function = {
.name = "FILTER",
.synopsis = "Filter the string to include only the allowed characters",
- .syntax = "FILTER(<allowed-chars>,<string>)",
+ .syntax = "FILTER(<allowed-chars>|<string>)",
.read = filter,
};
static struct ast_custom_function array_function = {
.name = "ARRAY",
.synopsis = "Allows setting multiple variables at once",
- .syntax = "ARRAY(var1[,var2[...][,varN]])",
+ .syntax = "ARRAY(var1[|var2[...][|varN]])",
.write = array,
.desc =
"The comma-separated list passed as a value to which the function is set will\n"
"be interpreted as a set of values to which the comma-separated list of\n"
"variable names in the argument should be set.\n"
- "Hence, Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2\n"
+ "Hence, Set(ARRAY(var1|var2)=1\\,2) will set var1 to 1 and var2 to 2\n"
"Note: remember to either backslash your commas in extensions.conf or quote the\n"
"entire argument, since Set can take multiple arguments itself.\n",
};
static struct ast_custom_function sprintf_function = {
.name = "SPRINTF",
.synopsis = "Format a variable according to a format string",
- .syntax = "SPRINTF(<format>,<arg1>[,...<argN>])",
+ .syntax = "SPRINTF(<format>|<arg1>[|...<argN>])",
.read = acf_sprintf,
.desc =
"Parses the format string specified and returns a string matching that format.\n"
static struct ast_custom_function strftime_function = {
.name = "STRFTIME",
.synopsis = "Returns the current date/time in a specified format.",
- .syntax = "STRFTIME([<epoch>][,[timezone][,format]])",
+ .syntax = "STRFTIME([<epoch>][|[timezone][|format]])",
.read = acf_strftime,
};