diff --git a/doc/README.variables b/doc/README.variables index e924a8c2ee21f1c37d5b067ce968e72e3741daff..f33e7836f6df928a0939f701bd2cc017686c6b69 100755 --- a/doc/README.variables +++ b/doc/README.variables @@ -46,7 +46,7 @@ ${DNID} Dialed Number Identifier ${RDNIS} Redirected Dial Number ID Service ${HANGUPCAUSE} Asterisk hangup cause ${ACCOUNTCODE} Account code (if specified) - +${LANGUAGE} Current language ${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate) There are two reference modes - reference by value and reference by name. diff --git a/pbx.c b/pbx.c index 27a9b1fe2468d3e16a6d8f20abc82961c98c0c48..7e35f003260fa4d0709b7a73b6ba6a2ecf21a989 100755 --- a/pbx.c +++ b/pbx.c @@ -881,6 +881,9 @@ static void pbx_substitute_variables_temp(struct ast_channel *c,const char *var, } else if (c && !strcmp(var, "ACCOUNTCODE")) { strncpy(workspace, c->accountcode, workspacelen - 1); *ret = workspace; + } else if (c && !strcmp(var, "LANGUAGE")) { + strncpy(workspace, c->language, workspacelen - 1); + *ret = workspace; } else { if (c) { AST_LIST_TRAVERSE(headp,variables,entries) {