Index: funcs/func_groupcount.c =================================================================== --- funcs/func_groupcount.c (revision 97657) +++ funcs/func_groupcount.c (working copy) @@ -53,8 +53,10 @@ } if (gi) { ast_copy_string(group, gi->group, sizeof(group)); - ast_copy_string(category, gi->category, sizeof(category)); + if (!ast_strlen_zero(gi->category)) + ast_copy_string(category, gi->category, sizeof(category)); } + ast_app_group_list_unlock(); } @@ -143,8 +145,7 @@ } if (ast_app_group_set_channel(chan, grpcat)) - ast_log(LOG_WARNING, - "Setting a group requires an argument (group name)\n"); + ast_log(LOG_WARNING, "Can't set channel group name!\n"); return 0; } @@ -153,7 +154,8 @@ .name = "GROUP", .syntax = "GROUP([category])", .synopsis = "Gets or sets the channel group.", - .desc = "Gets or sets the channel group.\n", + .desc = "Gets or sets the channel group. Use empty group name to unset channel group\n" + "in selected category.\n", .read = group_function_read, .write = group_function_write, };