1. Park - this application allows you to park yourself.
NOTE: This application is valid for Asterisk version 1.0.9 and above.
Syntax:
Park()
Purpose and usage
The purpose of this application is to allow you to park your call. In order to use this application you have to include the parkedcalls extension. The application is very similar to the ParkedCall one.
You park yourself, the system tells you the number where you are parked and when somebody dials this number he/she will be connected to you immediately. By default the number where you are parked is 701.
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. Also, you need to include the parkedcalls extension. Below, we will show you how.
To see how the application works, we recommend you 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 one of the uses of this application. Of course you can use it and for other things.
iax.conf and sip.conf Configurations
We need one registered user in the iax.conf file and also another one in the sip.conf file. This is because we are going to use the IAX2 and the SIP channels. If you want to use other protocol such as MGCP, you have to do the configurations below respectively in mgcp.conf.
1) iax.conf
2)sip.conf
So, we have registered the user user1 in the iax.conf file and the user operator in the sip.conf file.
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 the sip.conf file you can see the following option: disallow=all. This means that the line will not support any codecs. However, below this option we have allow=ulaw, allow=alaw and allow=gsm. This means that the line will support these three codecs - ulaw, alaw and gsm. It is important to write the options exactly in this order. First you write the disallow=all option and then the allow options. Otherwise, if you write the disallow option after the allow options, no codecs will be supported by the line.
We have one extension with the number 114. It contains the Park application. When you dial this number the application will be executed. The Asterisk will tell you at which number you are parked. In our case this is the number 701. While you are parked, music on hold will be played in your phone.
As soon as somebody dials the number 701, he/she will be connected to your phone immediately, without any announce before that. The music on hold at your side will stop and you also will be connected to the caller immediately and you will be able to talk.
If nobody dials the number 701 within the specified, by the features.conf file, time, the Asterisk will, play a tone for a Busy condition and a message will appear on your CLI. In our case the message is: Got SIP response 486 "Busy Here"
NOTE: The features.conf file is the place where you can change the settings connected with the parking of calls. For example, there you can change the number for parking. By default it is in the range between 701 and 720.
NOTE: Do not forget, that in order to use this application, you have to include the parkedcalls extension in your context, in the extensions.conf file. You can to this, by writing the following statement, in the context, where you use the Park application: include => parkedcalls.
Finally, in order to be sure that the Asterisk PBX will hang up the line, after the conversation is over, it is a good idea to make an extension for hanging up the line.
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
Red Road Telecom (david at redroad dot com) 30 July 2008 09:47:40 The Park() application is not used to park yourself, and if a caller dials the parking extension they will not be connected to you. It is not at all similar to the ParkedCall application - it's the exact OPPOSITE of that application.
Park() parks the channel you're talking to, not you. You hear the parking extension - the caller you just parked hears music on hold.
When someone in your same context dials the parking extension, they are connected to the caller you parked, not to you.
ashwini (ashwini dot pict at gmail dot com) 30 January 2008 12:02:25 hello,
i have two asterisk servers on separate pc in one lan.I want to communicate between clients of these two asterisk servers. clients of single asterisk servers can communicate but clients of different asterisk servers r not able to communicate.please help me.
what should i do?
Johan (jc_ridley at hotmail dot com) 08 August 2006 14:08:09 The link to ParkAndAnnounce isn't working on the url: http://www.asteriskguru.com/tutorials/park.html