From: Kevin Harwell Date: Tue, 19 Feb 2013 19:44:58 +0000 (+0000) Subject: Write the correct callid to the data1 field in queue_log for transfer events. X-Git-Tag: 11.4.0-rc1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf533947c77ee15f02491ccffc0efc977b7281b8;p=thirdparty%2Fasterisk.git 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 ........ Merged revisions 381770 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381791 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/features.c b/main/features.c index 5e043ce8f3..fef79e5849 100644 --- a/main/features.c +++ b/main/features.c @@ -3023,7 +3023,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, ast_channel_context(transferee), ast_channel_exten(transferee), ast_channel_priority(transferee)); + + dash = strrchr(xferto, '@'); + if (dash) { + /* Trim off the context. */ + *dash = '\0'; + } + ast_explicit_goto(xferchan, transferer_real_context, xferto, 1); ast_channel_state_set(xferchan, AST_STATE_UP); ast_clear_flag(ast_channel_flags(xferchan), AST_FLAGS_ALL);