diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-27 17:26:55 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-02-27 17:26:55 +0000 |
commit | 3013a31fba26301bd8e4e39fbad29f5463f04d51 (patch) | |
tree | 3a4953c388df5aee9c0804d4425a3bd6db45522a /res | |
parent | 3d2d481221663988d1cddfc6b092c25d25e3602f (diff) |
Inherit language from the transfering channel on a blind transfer.
(closes issue #11682)
Reported by: caio1982
Patches:
local_atxfer_lang3-1.4.diff uploaded by caio1982 (license 22)
Tested by: caio1982, victoryure
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104598 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_features.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/res/res_features.c b/res/res_features.c index fda31a89c..f1261b29c 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -219,7 +219,7 @@ static void check_goto_on_transfer(struct ast_channel *chan) } } -static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *caller, const char *type, int format, void *data, int timeout, int *outstate, const char *cid_num, const char *cid_name); +static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *caller, const char *type, int format, void *data, int timeout, int *outstate, const char *cid_num, const char *cid_name, const char *language); static void *ast_bridge_call_thread(void *data) @@ -818,7 +818,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st l = strlen(xferto); snprintf(xferto + l, sizeof(xferto) - l, "@%s/n", transferer_real_context); /* append context */ newchan = ast_feature_request_and_dial(transferer, "Local", ast_best_codec(transferer->nativeformats), - xferto, atxfernoanswertimeout, &outstate, transferer->cid.cid_num, transferer->cid.cid_name); + xferto, atxfernoanswertimeout, &outstate, transferer->cid.cid_num, transferer->cid.cid_name, transferer->language); ast_indicate(transferer, -1); if (!newchan) { finishup(transferee); @@ -1169,7 +1169,7 @@ static void set_config_flags(struct ast_channel *chan, struct ast_channel *peer, } /*! \todo XXX Check - this is very similar to the code in channel.c */ -static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *caller, const char *type, int format, void *data, int timeout, int *outstate, const char *cid_num, const char *cid_name) +static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *caller, const char *type, int format, void *data, int timeout, int *outstate, const char *cid_num, const char *cid_name, const char *language) { int state = 0; int cause = 0; @@ -1181,6 +1181,7 @@ static struct ast_channel *ast_feature_request_and_dial(struct ast_channel *call if ((chan = ast_request(type, format, data, &cause))) { ast_set_callerid(chan, cid_num, cid_name, cid_num); + ast_string_field_set(chan, language, language); ast_channel_inherit_variables(caller, chan); pbx_builtin_setvar_helper(chan, "TRANSFERERNAME", caller->name); if (!chan->cdr) { |