From 5143f6f85c7b446b284c1f28a34a1e5b67a5cea9 Mon Sep 17 00:00:00 2001 From: Kevin Harwell Date: Tue, 19 Feb 2013 19:16:44 +0000 Subject: [PATCH] Write the correct callid to the data1 field in queue_log for transfer events. The incorrect callid was being written to the "data1" field in queue_log table for transfer events. The callid of the queue was being written instead of the transfer target's callid. This now gets the correct "transfer to" number and places that in the "data1" field of the queue_log table when a transfer event is triggered. (closes issue ASTERISK-19960) Reported by: vladimir shmagin git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@381770 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/features.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main/features.c b/main/features.c index 2820f421f7..203d95486f 100644 --- a/main/features.c +++ b/main/features.c @@ -2851,7 +2851,13 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st ast_party_connected_line_free(&connected_line); return -1; } - ast_explicit_goto(xferchan, transferee->context, transferee->exten, transferee->priority); + + dash = strrchr(xferto, '@'); + if (dash) { + /* Trim off the context. */ + *dash = '\0'; + } + ast_explicit_goto(xferchan, transferer_real_context, xferto, 1); xferchan->_state = AST_STATE_UP; ast_clear_flag(xferchan, AST_FLAGS_ALL);