• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER SIP softphone
Back to Tutorials

6.1.2.103. Wait (dialplan application)

1. Wait - this application allows you to set a period of time to be waited, before something else to be executed

NOTE: This application is valid for Asterisk version 1.0.9 and above.

 


Syntax:

Wait(seconds) ; write as argument the period of time you want to be waited

 


Purpose and usage

You could use this application for different purposes but its usage is very simple and it does only one thing. It waits for a definite period of time before something else to be executed.

Below, we will give you an example.

 


Prerequisites

To use this application you need a working Asterisk PBX with registered users in iax.conf, sip.conf or mgcp.conf(It depends on which protocol you would like to use) and made extensions.

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 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 anatoliy, user1 and user2.

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.



On the picture above you can see a screenshot of our extensions.conf file.

We have two separate lines 111 and 112.

When somebody dials 111, the system will answer the call. The next step is the execution of the Wait application. The Asterisk PBX will wait 10 seconds(we have set 10 as argument in the brackets) before to go to the extension with the next priority. The purpose of this extension is to play a welcome message. We will use the application Playback. So, the caller will hear a welcome message.

You can do the same with the application Background. The difference between Playback and Background is that if you use the first one, you have to wait till the end of the message and then you can choose another option. If you use the second one then it’s not necessary to wait till the end of the message and you can choose the desired option while listening to the message.

When somebody dials 112, again the system will answer the call. The next step will be to wait for 10 seconds(this is the period of time we have set as argument in the brackets).
The next extension will send message to the display of the caller. this is going to happen with the help of SendText application. In our case this message is The line will be hanged up after 5 seconds. Then we have a new extension with the application Wait for a new period of time - 5 seconds.

Finally, as you may be noticed for each line the last extension is for hanging up. This is advisable 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


1) Screenshot for line 111

2) Screenshots for line 112



 


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

 


4. Uploaded files

extensions.conf
iax.conf

 

 
User Comments
Macc (macmzi at yahoo dot co dot uk)
20 October 2006 18:12:08
Good
 
Add Comment
Name:
Email:
Comment:
In order to prevent automatic posting on our website, we kindly request you to type in the number you see in the picture below.
Image Verification:
 

Latest Headlines:

  • T.38 faxing with Zoiper 2.15 is now easier than ever
    section: voip software
  • Asterisk 1.4.21 Released
    section: Asterisk
  • Asterisk 1.4.20 Released
    section: Asterisk
  • Asterisk 1.4.20-rc2 Released
    section: Asterisk
  • Asterisk 1.4.20-rc1 Now Available
    section: Asterisk
  • News Archives (older news)

Latest Tutorials:

  • Sending Fax from Zoiper to Zoiper using T.38
    added 08/Dec/2008 18:16
  • VMAuthenticate (dialplan application)
    added 01/Mar/2008 15:57
  • Siptronic ST-530
    added 06/Nov/2007 17:57
  • Siemens C455 IP hardphone
    added 05/Nov/2007 10:24
  • Zoiper
    added 22/Oct/2007 17:53

Latest Comments:

  • Supercertified is the leader in supply...
    tutorial: VMAuthenticate (dialplan application)
  • Supercertified is the leader in supply...
    tutorial: Sending Fax from Zoiper to Zoiper using T.38
  • <a href="http://www.supercertified.com/c...
    section: Asterisk
  • Supercertified is the leader in supplyin...
    section: Asterisk
  • <a href=http://www.allsneaker.com>Adidas...
    section: Asterisk
 
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™