Answer, Hangup, Busy, & Congestion

Synopsis
A small number of external applications and PBX built-in commands control how calls are answered and completed.  These allow you to answer lines, hang them up, or send any kind of call progress tones to the calling party.

'Answer' Application
When executed, the incoming call is answered by placing the incoming line, trunk, or other technology into an offhook state. The 'Answer' application is normally used in the “s” priority of a context in extensions.conf.

Example:
	
	[default]
	Exten => s,1,Answer
	Exten => s,2,MP3Player,southside.mp3

This will answer the incoming call in the default context and being playing the file “southside.mp3” to the calling party.

'Hangup' Application
This, as its name implies, hangs up the call.  There is no prompting, the call is simply disconnected at that point.

Example:

	[default]
	Exten => s,1,Answer
	Exten => s,2,MP3Player,southside.mp3
	Exten => s,3,Hangup

Building on the previous example, this will hangup the call and disconnect the user once the MP3Player application finishes playing the file.

'Ringing' Application
This command is used to indicate a “ringing” to the calling party.  When the command is executed, the calling party will hear the ringing tone while Asterisk proceeds to the next priority in the extension list.

Example:

	[default]
	Exten => s,1,Answer
	Exten => s,2,Ringing
	Exten => s,3,Wait,30
	Exten => s,4,Hangup

In this example, the incoming call is answered and a Ringing signal is sent back to the calling party.  Asterisk then continues to priority 3, which tells it to wait for 30 seconds.  During this 30 seconds, the caller still hears the ringing tone.  After the 30 seconds, the call is hung up.

'Congestion' Application
The 'Congestion' application generates and sends a congestion signal (often known as a “Fast Busy”) to the calling party.  The application does not proceed further down the extension list and just waits for the caller to hang up.

	[default]
	Exten => s,1,Answer
	Exten => s,2,Congestion

'Busy' Application
When executed, the 'Busy' application sends a standard busy signal back to the calling party and waits for the caller to hang up.

	[default]	
	Exten => s,1,Answer
	Exten => s,2,Busy

This answers the line and immediately gives the caller a busy signal and waits for them to hangup.