Index: channels/sip/dialplan_functions.c =================================================================== --- channels/sip/dialplan_functions.c (revision 396157) +++ channels/sip/dialplan_functions.c (working copy) @@ -397,9 +397,9 @@ ast_free(varstr); ast_free(buffer); - /* This unref will take care of destroying the channel, RTP instance, and SIP pvt */ + /* This unlink will take care of destroying the channel, RTP instance, and SIP pvt */ if (p) { - dialog_unref(p, "Destroy test object"); + dialog_unlink_all(p); } ast_rtp_engine_unregister(&test_engine); return res;