mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
Give Agent channel names priority when doing CDR merging. (issue #10011 reported by krtorio)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@73980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -620,7 +620,7 @@ void ast_cdr_merge(struct ast_cdr *to, struct ast_cdr *from)
|
||||
ast_copy_string(to->dstchannel, from->dstchannel, sizeof(to->dstchannel));
|
||||
from->dstchannel[0] = 0; /* theft */
|
||||
}
|
||||
if (ast_strlen_zero(to->channel) && !ast_strlen_zero(from->channel)) {
|
||||
if (!ast_strlen_zero(from->channel) && (ast_strlen_zero(to->channel) || !strncasecmp(from->channel, "Agent/", 6))) {
|
||||
ast_copy_string(to->channel, from->channel, sizeof(to->channel));
|
||||
from->channel[0] = 0; /* theft */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user