diff options
author | Olle Johansson <oej@edvina.net> | 2006-11-10 21:55:31 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-11-10 21:55:31 +0000 |
commit | 0c18d918176606ee293085ba679d6e056c0b93b4 (patch) | |
tree | f360c226202510c0d88ae52c89dc2bc5222c3dc7 /channels/chan_sip.c | |
parent | 2b6d3952e13d3683691439ccfdd27ef80590e105 (diff) |
Add some history and fix some debug output for autodestruct.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 8cc2cfb3e..2bcb62d75 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2012,9 +2012,6 @@ static int __sip_autodestruct(void *data) /* Reset schedule ID */ p->autokillid = -1; - if (option_debug) - ast_log(LOG_DEBUG, "Auto destroying SIP dialog '%s'\n", p->callid); - append_history(p, "AutoDestroy", "%s", p->callid); 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); @@ -2022,8 +2019,14 @@ static int __sip_autodestruct(void *data) 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); - } else - sip_destroy(p); + append_history(p, "ReferBYE", "Sending BYE on transferer call leg %s", p->callid); + sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); + } else { + append_history(p, "AutoDestroy", "%s", p->callid); + if (option_debug) + ast_log(LOG_DEBUG, "Auto destroying SIP dialog '%s'\n", p->callid); + sip_destroy(p); /* Go ahead and destroy dialog. All attempts to recover is done */ + } return 0; } |