--- app_queue.c.orig 2006-01-11 15:22:28.000000000 +0200 +++ app_queue.c 2006-01-11 15:24:45.000000000 +0200 @@ -2042,7 +2042,10 @@ /* Hold the lock while we setup the outgoing calls */ if (use_weight) ast_mutex_lock(&qlock); - ast_mutex_lock(&qe->parent->lock); + + /* !!! Locking the channel causes dead lock with queue mutex !!! + * ast_mutex_lock(&qe->parent->lock); + */ if (option_debug) ast_log(LOG_DEBUG, "%s is trying to call a queue member.\n", qe->chan->name); @@ -2056,7 +2059,9 @@ while(cur) { tmp = malloc(sizeof(*tmp)); if (!tmp) { - ast_mutex_unlock(&qe->parent->lock); + /* !!! Locking the channel causes dead lock with queue mutex !!! + * ast_mutex_unlock(&qe->parent->lock); + */ if (use_weight) ast_mutex_unlock(&qlock); ast_log(LOG_WARNING, "Out of memory\n"); @@ -2102,7 +2107,9 @@ else to = -1; ring_one(qe, outgoing, &numbusies); - ast_mutex_unlock(&qe->parent->lock); + /* !!! Locking the channel causes dead lock with queue mutex !!! + * ast_mutex_unlock(&qe->parent->lock); + */ if (use_weight) ast_mutex_unlock(&qlock); lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT));