--- pbx_dundi.c.orig 2008-12-12 09:40:31.000000000 -0500 +++ pbx_dundi.c 2009-06-12 17:51:26.000000000 -0400 @@ -2371,7 +2371,7 @@ return -1; if (resa->weight > resb->weight) return 1; - return 0; + return ast_random() % 2 == 0 ? 1 : -1; /*shuffle res of same rank */ } static void sort_results(struct dundi_result *results, int count)