Index: chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.665 diff -u -r1.665 chan_sip.c --- chan_sip.c 24 Feb 2005 13:57:45 -0000 1.665 +++ chan_sip.c 24 Feb 2005 19:30:35 -0000 @@ -8380,6 +8380,17 @@ p->expiry = max_expiry; } transmit_response(p, "200 OK", req); + + /*Don't hang on to RTP ports */ + if (p->rtp) { + ast_log(LOG_DEBUG,"SUBSCRIBE releasing RTP port\n"); + ast_rtp_destroy(p->rtp); + } + if (p->vrtp) { + ast_log(LOG_DEBUG,"SUBSCRIBE releasing VRTP port\n"); + ast_rtp_destroy(p->vrtp); + } + sip_scheddestroy(p, (p->expiry+10)*1000); transmit_state_notify(p, ast_extension_state(NULL, p->context, p->exten),1); }