--- channels/chan_sip.c 2007-11-30 13:49:01.000000000 +0200 +++ ../clean/asterisk-1.4.12/channels/chan_sip.c 2007-11-30 09:18:36.000000000 +0200 @@ -13396,8 +13384,7 @@ if (option_debug > 3) ast_log(LOG_DEBUG, "Invite/Replaces: preparing to masquerade %s into %s\n", c->name, replacecall->name); /* Unlock clone, but not original (replacecall) */ - if (! oneleggedreplace) - ast_channel_unlock(c); + ast_channel_unlock(c); /* Unlock PVT */ ast_mutex_unlock(&p->refer->refer_call->lock); @@ -13429,8 +13416,7 @@ ast_log(LOG_WARNING, "Invite/Replace: Could not read frame from RING channel \n"); } c->hangupcause = AST_CAUSE_SWITCH_CONGESTION; - if (! oneleggedreplace) - ast_channel_unlock(replacecall); + ast_channel_unlock(replacecall); } else { /* Bridged call, UP channel */ if ((f = ast_read(replacecall))) { /* Force the masq to happen */ /* Masq ok */ @@ -13465,8 +13451,7 @@ } ast_channel_unlock(p->owner); /* Unlock new owner */ - if (! oneleggedreplace) - ast_mutex_unlock(&p->lock); /* Unlock SIP structure */ + ast_mutex_unlock(&p->lock); /* Unlock SIP structure */ /* The call should be down with no ast_channel, so hang it up */ c->tech_pvt = NULL;