From 0178d0ccd601b7d7a47cc2e51f2257663e39a1c8 Mon Sep 17 00:00:00 2001
From: Mark Michelson <mmichelson@digium.com>
Date: Thu, 26 Jun 2008 23:35:29 +0000
Subject: [PATCH] Improve consistency between app_dial and app_queue with
 regards to how language is handled between two channels whose native language
 is different. Prior to this patch, app_dial would have the callee inherit the
 caller's language, and app_queue would not.

After this patch, app_dial no longer has the language inheritance
capability. This seems to make the most sense since it seems more
natural for a person to hear files played back in his/her native
language instead of the language of the person on the far end of
the call. See the CHANGES file for hints on how to keep the
previous behavior of app_dial if desired.

(closes issue #12489)
Reported by: bcnit



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 CHANGES         | 3 +++
 apps/app_dial.c | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/CHANGES b/CHANGES
index 178ad08226..875aae5a34 100644
--- a/CHANGES
+++ b/CHANGES
@@ -99,6 +99,9 @@ Application Changes
    original CDR; 'R' prevents the new CDR from being reset; 's(var=val)' adds/changes
    the 'var' variable on the original CDR; 'T' forces ast_cdr_end(), ast_cdr_answer(),
    obey the LOCKED flag on cdr's in the chain, and also the ast_cdr_setvar() func.
+ * The Dial() application no longer copies the language used by the caller to the callee's
+   channel. If you desire for the caller's channel's language to be used for file playback
+   to the callee, then the file specified may be prepended with "${CHANNEL(language)}/" .
 
 SIP Changes
 -----------
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 641edc5b3e..b7cafd0911 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1496,8 +1496,6 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 		S_REPLACE(tc->cid.cid_ani, ast_strdup(chan->cid.cid_ani));
 		S_REPLACE(tc->cid.cid_rdnis, ast_strdup(chan->cid.cid_rdnis));
 		
-		/* Copy language from incoming to outgoing */
-		ast_string_field_set(tc, language, chan->language);
 		ast_string_field_set(tc, accountcode, chan->accountcode);
 		tc->cdrflags = chan->cdrflags;
 		if (ast_strlen_zero(tc->musicclass))
-- 
GitLab