[svn-commits] qwell: branch 1.4 r104598 - /branches/1.4/res/res_features.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 27 11:26:56 CST 2008


Author: qwell
Date: Wed Feb 27 11:26:55 2008
New Revision: 104598

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104598
Log:
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

Modified:
    branches/1.4/res/res_features.c

Modified: branches/1.4/res/res_features.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_features.c?view=diff&rev=104598&r1=104597&r2=104598
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Wed Feb 27 11:26:55 2008
@@ -219,7 +219,7 @@
 	}
 }
 
-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 @@
 	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 @@
 }
 
 /*! \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 @@
 	
 	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) {




More information about the svn-commits mailing list