From 965394e4c2c81ecceffb0a0769160e4d12919a74 Mon Sep 17 00:00:00 2001
From: Olle Johansson <oej@edvina.net>
Date: Thu, 6 Apr 2006 21:33:39 +0000
Subject: [PATCH] Add "NewChan" event to history to track the birth of a new
 ast_chan from a SIP invite

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 23843a6a82..627770634a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2977,6 +2977,8 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
 	/* Set channel variables for this call from configuration */
 	for (v = i->chanvars ; v ; v = v->next)
 		pbx_builtin_setvar_helper(tmp,v->name,v->value);
+
+	append_history(i, "NewChan", "Channel %s - from %s", tmp->name, i->callid);
 				
 	return tmp;
 }
-- 
GitLab