Synopsis:
Gets or sets the channel’s language.
Description:
LANGUAGE()
Gets or sets the channel language. This information is used for the syntax in generation of numbers, and to choose a natural language file when available. For example, if language is set to ‘fr’ and the file ‘demo-congrats’ is requested to be played, if the file ‘fr/demo-congrats’ exists, then it will play that file, and if not will play the normal ‘demo-congrats’. For some language codes, changing the language also changes the syntax of some Asterisk functions, like SayNumber.
Notes
- This function may be both read from and written to.
- This function is deprecated in Asterisk 1.2 and removed in Asterisk 1.4. Use CHANNEL(language) instead.
- In 1.2, LANGUAGE() has a maximum length of 20 characters, including the terminating NULL.
Return value
Returns the current language code.
Example
exten => s,1,Set(foo=${LANGUAGE()})
exten => s,1,Set(LANGUAGE()=fr)