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 two 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 anatoliy and 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.
When somebody dials 112 the first extension to be executed is the one with the Ringing application. Here is the tricky moment. If you set only the Ringing application, you won’t hear a ringing signal. The reason for this is that on answered channel this application immediately makes a return and then goes to the extension with the next priority. The solution of the problem is to make the next extension with the Wait. In our example we have set the delay for Wait to 5 seconds.
Then we have made an extension for sending a text message. We can achieve this with the SendText application. The message in our example is Please contact us during the work time! From 08:00 to 20:00! Thank You.
At last, it is always a good idea to make an extension with the Hangup application 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 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