aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-12 20:34:36 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-12 20:34:36 +0000
commit6f085ebc0200b74f0d5dd28477f2f9666f00352d (patch)
treeb5edaff3bc8735db5d2fc6572997610c095f349e /res
parent4e856bab6545794cb1d645351906cd9554bb8687 (diff)
Fix ParkedCall event information for From field in the case of a blind transfer
If the parker information can not be obtained from the peer, try and see if the BLINDTRANSFER channel variable has been set. Previously, a blind transfer to the ParkAndAnnounce app would return nothing for the From. Closes AST-189 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@175294 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_features.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 317b99b5f..7fadaa61a 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -421,7 +421,8 @@ static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, in
{
struct ast_context *con;
int parkingnum_copy;
-
+ const char *event_from;
+
/* Get a valid space if not already done */
if (pu == NULL)
pu = park_space_reserve(chan);
@@ -487,6 +488,12 @@ static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, in
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Parked %s on %d@%s. Will timeout back to extension [%s] %s, %d in %d seconds\n", pu->chan->name, pu->parkingnum, parking_con, pu->context, pu->exten, pu->priority, (pu->parkingtime/1000));
+ if (peer) {
+ event_from = peer->name;
+ } else {
+ event_from = pbx_builtin_getvar_helper(chan, "BLINDTRANSFER");
+ }
+
manager_event(EVENT_FLAG_CALL, "ParkedCall",
"Exten: %s\r\n"
"Channel: %s\r\n"
@@ -494,7 +501,7 @@ static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, in
"Timeout: %ld\r\n"
"CallerID: %s\r\n"
"CallerIDName: %s\r\n",
- pu->parkingexten, pu->chan->name, peer ? peer->name : "",
+ pu->parkingexten, pu->chan->name, event_from ? event_from : "",
(long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL),
S_OR(pu->chan->cid.cid_num, "<unknown>"),
S_OR(pu->chan->cid.cid_name, "<unknown>")