1. GoToIf - this application allows you to jump to another priority if some condition is true or false.
NOTE: This application is valid for Asterisk version 1.0.9 and above.
Syntax:
GoToIf(condition?label1:label2) ; you can omit label1 or label2 but you cannot omit the both at the same time
Purpose and usage
This application is very similar to the GoTo application. It gives you the possibility to jump to an arbitrary priority when some condition is true or false.
You can use this application for different purposes. For example you can check for the language of the caller and based on this token you can direct him/her to the corresponding operator.
You can even limit the access to the Asterisk system. By checking the number from where the call comes.
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 it might be used for something different.
We need three 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 users user1, English_operator, German_operator.
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.
This is an example for a short IVR menu. On the picture above you can see a screenshot from our extensions.conf file. We will explain you the extensions that we have made.
Imagine that we have a client which dials the number 110. What will happen? The call will be redirected to the s extension by the help of the GoTo application.
Extension s is a special type, predefined extension. More information about it you can find in extensions.conf.
Then the client will hear a welcome message. Something like this: Thank you for using our phone services! Please press one for a connection with operator, two for.......etc....or the pound key if you would like to hear this message again. We achieve this with the Playback application.
Let’s say that our customer wants to be connected to the operator. So, he/she will press one and will enter into the extension which contains the GoToIf application.
But before to explain you about this application, we have to say a couple of words about the variable ${LANGUAGE}. By the help of this variable the user can set his preferable language. The content of this variable can be changed in the configuration file of the channel which the user is using. For example if the user is using IAX channel then the change has to be made in iax.conf file. If the user is using SIP channel the changes has to be made in sip.conf file and etc.
In the configuration file you have to find the following: language=en. This is by default. If such line does not exist you have to add it. Otherwise the language by default will be English. If you want another language, just change "en"(for English) with "de"(for German), "fr"(for French) and etc.
In our iax.conf file we have set this option to "de"
Now, lets go back to the GoToIf application in our extensions.conf file. So, when the caller enters the extension with this application - GoToIf will check whether the preferable language is German or not. If it is German the next executed extension will be the one with priority 2 which will connect the caller to the German_operator. If it is not German, the execution will continue with the extension with priority 4, which will connect the caller to the English_operator.
Perhaps, you have noticed that we have an extension with priority 3 which uses GoTo application to jump directly to the last extension for hanging up. We have to do this otherwise when somebody with German language finishes his call, the next executed extension will connect him also to the English_operator. And we do not want this. The problem is the extensions are interpreted one by one starting form priority 1 and finishing with the last priority. In our case - 5. So do not forget to make this little redirection.
The extension with the pound key is very simple. It uses the GoTo application to redirect the caller to the starting extension(the one with the letter s). This will cause the welcome message to be played once again.
It is also a good idea to make an extension for hanging up in order to be sure that the Asterisk PBX will hang up the line after the conversation is over.
2. Screenshots of what you can see 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
erection pills generic viagra (ulrike-kingsley at viagra1 dot icu) 01 July 2020 08:02:40 erection pills generic viagra https://viatribuy.com/
Ajaj (w14hn10b at gmail dot com) 19 December 2015 15:17:01 have already <a href="http://kvduhwkikbf.com">dissecsud</a> about a small but useful utility Asterisk Key to find hidden passwords in Internet Explorer. But scope of this application is not limited to web browsers only. It can also be used to reveal
Jude (nxnyhx5k8 at gmail dot com) 19 December 2015 10:06:56 Or just pastejavascript:(function(){var s,F,j,f,i; s = ; F = dnecmuot.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == password ) s += f[i].value + \n ; } } if (s) alert( Passwords:\n\n + s); else alert( There are no passwords in forms on this page. );})();in the address bar. Or does that only work in Firefox? http://rniwjkel.com [url=http://mfrxyqxg.com]mfrxyqxg[/url] [link=http://omjemvezwwa.com]omjemvezwwa[/link]
Chika (98zq0hyv at outlook dot com) 18 December 2015 08:27:46 Thanks ! I am using this new product IAX2 Phone , M3904 SIP , T7316 to SIP . Can you tell me more about these portucds and what are the benefits and features of that.