From 5eb94d7ebbc2c29d4de8201103bcb62ae8afcd31 Mon Sep 17 00:00:00 2001 From: Jonathan Rose Date: Tue, 26 Jun 2012 21:45:22 +0000 Subject: Unique Call ID logging Phases III and IV Adds call ID logging changes to specific channel drivers that weren't handled handled in phase II of Call ID Logging. Also covers logging for threads for threads created by systems that may be involved with many different calls. Extra special thanks to Richard for rigorous review of chan_dahdi and its various signalling modules. review: https://reviewboard.asterisk.org/r/1927/ review: https://reviewboard.asterisk.org/r/1950/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369414 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'main/features.c') diff --git a/main/features.c b/main/features.c index fbeaa7572..79d1036f2 100644 --- a/main/features.c +++ b/main/features.c @@ -5417,8 +5417,17 @@ static int parked_call_exec(struct ast_channel *chan, const char *data) } AST_LIST_TRAVERSE_SAFE_END; if (pu) { + struct ast_callid *callid = ast_read_threadstorage_callid(); + /* Found a parked call to pickup. */ peer = pu->chan; + + /* We need to map the call id we have from this thread to the channel we found. */ + if (callid) { + ast_channel_callid_set(peer, callid); + callid = ast_callid_unref(callid); + } + con = ast_context_find(parkinglot->cfg.parking_con); if (con) { if (ast_context_remove_extension2(con, pu->parkingexten, 1, NULL, 0)) { -- cgit v1.2.3