Index: channels/chan_iax2.c =================================================================== --- channels/chan_iax2.c (revision 114558) +++ channels/chan_iax2.c (working copy) @@ -1353,7 +1353,8 @@ res = x; } } - ast_mutex_unlock(&iaxsl[x]); + if (res && !return_locked) + ast_mutex_unlock(&iaxsl[x]); } for (x=TRUNK_CALL_START;(res < 1) && (x= NEW_ALLOW)) {