summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2008-01-22 20:35:10 +0000
committerOlle Johansson <oej@edvina.net>2008-01-22 20:35:10 +0000
commitb8aa3248ec9deecf45f535893a34c693b38e508c (patch)
treee31993095f4b8bfb76a913e5b7732d1fc79e16c8 /main/channel.c
parentd1ba37f1c97b5c8e722c947e553f221bd1ec65e7 (diff)
Add a generic function to set the bridged call PVT unique id string
as a channel variable BRIDGEPVTCALLID This is important for call tracing in log files and CDRs, so that the SIP callID can be traced along servers. The CHANNEL dialplan function won't work here, since the outbound channel is gone when we need the Call-ID. Other channel drivers may now implement the same function :-), but this patch only supports chan_sip.so. Inspired by (issue #11816) Reported by: ctooley Patch by oej git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/channel.c b/main/channel.c
index d9e018310..d4d878008 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4222,6 +4222,10 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
pbx_builtin_setvar_helper(c0, "BRIDGEPEER", c1->name);
if (!ast_strlen_zero(pbx_builtin_getvar_helper(c1, "BRIDGEPEER")))
pbx_builtin_setvar_helper(c1, "BRIDGEPEER", c0->name);
+ if (c0->tech->get_pvt_uniqueid)
+ pbx_builtin_setvar_helper(c1, "BRIDGEPVTCALLID", c0->tech->get_pvt_uniqueid(c0));
+ if (c1->tech->get_pvt_uniqueid)
+ pbx_builtin_setvar_helper(c0, "BRIDGEPVTCALLID", c1->tech->get_pvt_uniqueid(c1));
if (c0->tech->bridge &&
(config->timelimit == 0) &&