1. SetLanguage - this application allows you to change the used language.
NOTE: This application is valid for Asterisk version 1.0.9 and above.
Syntax:
SetLanguage(language)
Purpose and usage
The purpose of this application is to give you the possibility to change the preferable language. This also could be done manually in the configuration file of the channel oyu use (iax.conf, sip.conf or mgcp.conf). However may be it is easier to do this by using the SetLanguage application.
With this application you can state your preferable language. The Asterisk PBX could use this to determine and play the sound files recorded in the desired language.
If your preferable language is set to de(German), then the system will try to play the sound files from the /var/lib/asterisk/sounds/de directory. The messages in these files are recorded in German. If your language is set to fr(French), the system will try to play the sound files from the /var/lib/asterisk/sounds/fr directory. The messages in these files are recorded in French. And so on.
If the language directory does not exist, the system will play the general sound files, which are placed in the /var/lib/asterisk/sounds.
Also, if there is no directory for your language, you can create one. Then you can record sound messages in your own language and to put them into the directory.
So, your services could become more personalized and user friendly.
When you set a language, you have to use the two letters abbreviation.
To see how the application works we recommend to use our IAX softphone Idefisk. You can download it from here. Please also read our tutorial to learn how to configure it to work with Asterisk PBX.
Asterisk PBX configurations
NOTE: This is only an example of what for you can use this application. Of course you can use it and for other things.
We need one registered users in iax.conf file. This is because we are going to use the IAX2 protocol. If you want to use other protocol such as SIP or MGCP, you have to do the configurations below respectively in sip.conf or mgcp.conf.
So, we have registered the user user1
Type=friend means that this user can make and receive calls. Host=dynamic means that the IP is not static but dynamic through a DHCP server. Allow=all means that the line which this user will use, could support all audio codecs. Context=test - this shows that this user is working with the extensions in this context of the configuration file extensions.conf.
In our example when somebody dials 1010, the call will be answered by the Answer application. The next executed extension will be the one which contains the SendText application. It will send us, a text message with the current language. In our example the message is The current language is: en. So the language is English. To check the current language, we use the variable ${LANGUAGE}. Then we have the Wait application. Just to give enough time to the user to see the message. We have set the time to 5 seconds.
The extension with priority 4 is the one with the SetLanguage application. We will set the language to German by its help.
Finally, we have again SendText application. It will help us to check whether the change is successful.
A new message will appear on the screen of the caller. In our case it is: The new language is: de. This means that the new language is German.
NOTE: The desired language has to be written with the two letters abbreviation.
In order to be sure, that the Asterisk PBX will hang up the line after the conversation is over, it is always a good idea to make an extension for hanging up.
2. Screenshots of what you can see on your Idefisk and on the CLI of the Asterisk PBX
3. Additional information
For more information about extensions.conf you can check here.
For more information about iax.conf you can check here.
This application is tested with our IAX softphone Idefisk. You can download it from here. For more information about this softphone please read our tutorial.
If you would like to test this application with the SIP channel you can read our tutorials about the SIP Softphones to learn how to configure them to work with Asterisk PBX
User Comments
GeorgeSip (tatyanamariyaklimenko1991978oaf at mail dot ru) 28 March 2019 20:25:04 distanza slot machine dalle scuole lombardia slot machine gratis il mago rodeo slot machine <a href="http://www.hlaastmu.com">slot online gratis senza registrazione</a> slot machine jackpots november 2017 slot machine faraone gratis best slot machine fire red
legge di stabilit 2015 slot machine slot machine da bar free giochi gratis slot machine 5 rulli gratis <a href=http://hlaastmu.com/>giochi online gratuiti</a>
http://hlaastmu.com
JasonAspix (1758zascpt0jm at mantilia48 dot fancycarnavalmasks dot com) 02 March 2019 15:25:39 generic cialis daily dose buyactress in cialis commercial Buy Cialis cheap <a href="http://xcialis20mg.com">xcialis20mg.com</a>
JyfrceLap (Plails at truckmetalworks dot com) 27 May 2018 06:40:59 <a href="http://ph2oc.com/#buy-cialis">cialis 20</a> acheter du cialis au qubec buy cheap cialis online now how to cialis online
cialis daily 5mg reviews cialis usa generic online how much cialis <a href="http://ph2oc.com/#buy-cialis-20-mg">cialis 20 mg cost</a>
generic cialis soft tab 50mg ap kgr 100 cialis order cialis us
pastiglie cialis costo global cialis cialis for sale <a href=http://ph2oc.com/#cialis-online>cheap cialis 20mg pills</a>
cialis or cialis better cialis order real best alternatives to cialis
cost per pill for cialis cialis order online in india ciallis
http://ph2oc.com/#20-mg
HearceLap (Plails at truckmetalworks dot com) 26 May 2018 12:15:41 <a href="http://expget.net/">buy 100mg viagra</a> quanto costa cialis what does cialis do cialis online australia buy
buy cialis tadalafil wholesale pharmacy cialis review cilias <a href="http://expget.net/#viagra">buy pfizer viagra 100mg</a>
acheter cialis site serieux cialis phone number try it scam cialis from candad
cialis on cnbc top generic cialis online cialis 5 <a href=http://expget.net/#100mg>buy pfizer viagra 100mg</a>
cialis generic order buy cialis amsterdam pfizer workshops cialis
generika online cialis cialis at a cheap price cialis side effects
http://expget.net/#buy-viagra
Skmdtraikul (l0i2ezoje2 at hotmail dot com) 09 October 2015 17:47:11 음성인식은 hidden mroakv modek을 가장 많이 사용하는 걸로 알고 있는데요 혹시 hmm에 대한 스터디는 끝내셨는지요? 안보셨다면 그것부터 먼저 보심이 어떨지요 더불어 DTW(Dynamic Time Warping) 도 함께요. n-gram도요 http://hvmgox.com [url=http://hwcupvlv.com]hwcupvlv[/url] [link=http://rfhqvj.com]rfhqvj[/link]
Chima (56qw8ppxo at gmail dot com) 09 October 2015 09:31:59 fahim jan salaamkhili delam vosat tang shode <a href="http://vmslgro.com">regfehyadish</a> bekhir ba ham mishestim sheraye chris de burgh ro gosh midadim va lrycs ro dar miovordim. ya on ketabe folato bego :))))))))))be omide didaret be zodimehrdad
Mkrtich (suhopgf8u at gmail dot com) 08 October 2015 21:17:38 salam fahimvaghean chera hame chi<a href="http://aidocbxl.com"> tlkahe</a> hawij<a href="http://aidocbxl.com"> tlkahe</a> , khargoosh<a href="http://aidocbxl.com"> tlkahe</a>, zeraat va keshawarzi<a href="http://aidocbxl.com"> tlkahe</a>, ab dadan be baghche<a href="http://aidocbxl.com"> tlkahe</a>. va az hame badtaaar shirin tarin khateraat<a href="http://aidocbxl.com"> tlkahe</a> , chera be naslemoon sha ..?chera?,فکر نمیکردم گذرت به اینجا بخوره:)
Arsla (l3fyiq1c at gmail dot com) 25 September 2015 12:13:02 A rolling stone is worth two in the bush, thanks to this aritcle.
bobbyz (pequenoos at hotmail dot com) 09 July 2009 19:20:55 o meu wow da esse erro quando eu vou atualizar para a versao 3.1.0
The file \\\"\\\\pc-hdfiles\\\\WowError.exe\\\" could not be opened. If this problem persists, you may be able to solve it by uninstalling and then reinstalling the game. If you are unable to correct this problem, please contact Blizzard Technical Support. (InstallerFile::Open)
Sara Ibn El Ahrache (s dot elahrache at aui dot ma) 31 May 2009 14:29:51 when the user hangs up and redials the same extension 1010 will the language be reset to english or will it remain german?
Arifin (wibisonoarifin at yahoo dot co dot id) 02 September 2008 14:50:59 download language