summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 83f72b9ad..15a3b2584 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8143,7 +8143,9 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
if (!fmt) {
ast_log(LOG_WARNING, "No compatible formats could be found for %s\n", ast_channel_name(tmp));
ao2_ref(caps, -1);
- tmp = ast_channel_unref(tmp);
+ ast_channel_stage_snapshot_done(tmp);
+ ast_channel_unlock(tmp);
+ ast_hangup(tmp);
return NULL;
}
}