Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.179 diff -u -4 -p -r1.179 chan_sip.c --- channels/chan_sip.c 17 Sep 2003 20:51:53 -0000 1.179 +++ channels/chan_sip.c 19 Sep 2003 11:30:40 -0000 @@ -1030,8 +1030,13 @@ static int sip_hangup(struct ast_channel } p->owner = NULL; ast->pvt->pvt = NULL; + ast_mutex_lock(&usecnt_lock); + usecnt--; + ast_mutex_unlock(&usecnt_lock); + ast_update_use_count(); + needdestroy = 1; /* Start the process if it's not already started */ if (!p->alreadygone && strlen(p->initreq.data)) { if (needcancel) {