Index: channels/chan_zap.c =================================================================== --- channels/chan_zap.c (revision 121854) +++ channels/chan_zap.c (working copy) @@ -4631,9 +4631,10 @@ void *readbuf; struct ast_frame *f; + while (ast_mutex_trylock(&p->lock)) { + DEADLOCK_AVOIDANCE(&ast->lock); + } - ast_mutex_lock(&p->lock); - index = zt_get_index(ast, p, 0); /* Hang up if we don't really exist */