--- chan_sip.c.br14.121495.original 2008-06-16 11:35:09.000000000 +0200 +++ chan_sip.c.br14.121495 2008-06-16 11:35:41.000000000 +0200 @@ -2105,7 +2105,7 @@ if (p->owner) { ast_log(LOG_WARNING, "Autodestruct on dialog '%s' with owner in place (Method: %s)\n", p->callid, sip_methods[p->method].text); ast_queue_hangup(p->owner); - } else if (p->refer) { + } else if (p->refer && !ast_test_flag(&p->flags[0], SIP_ALREADYGONE)) { if (option_debug > 2) ast_log(LOG_DEBUG, "Finally hanging up channel after transfer: %s\n", p->callid); transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);