login | register
Thu 04 of Dec, 2008 [02:29 UTC]

voip-info.org

Discuss [0] History

Asterisk func language

Created by: murf,Last modification on Fri 27 of Jun, 2008 [23:13 UTC] by JustRumours

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)

See also



Comments