Asterisk tips answer-before-playback
John Todd, of loligo.com advises:
Wasim adds:
Instead of a wait(2), we generally background an innocous music or a prompt for say 2 seconds, thus, people aren't waiting in dead-air, get some audio-feedback, and if the prompt is truncated, it doesn't matter since it was just a feeder in the first place. Wait will also not take any DTMF input during that time, so repeat users are stuck for that time.
Ofcourse if you notice a significant % of your VoIP sessions take time to settle, then best do a Wait(2), no point in send garble-jumble down the line. JT, as usual has very valuable suggestions.
C F, shmaltz at gmail dot com:
I was having problems that zap (FXO) channels were answered when I assumed that they will not be answered because the context didn't have any answer cmd in it. However I found out (the hard way), that you DONT have to do answer before using playback, and even without answer the ZAP line gets answered when using playback.
You can find it all here:
http://lists.digium.com/pipermail/asterisk-users/2005-January/082966.html
I know that under Note and update someone already posted it, but since I wasn't the only one in the list that didn't notice this note and update I decided to add this.
Back to Asterisk tips and tricks
- Before running any application that has sound playback (Playback, Background, VoiceMailMain2, etc.) it would be wise to execute an Answer first, then a Wait(2) to allow for VoIP channels to fully establish and settle.
Wasim adds:
Instead of a wait(2), we generally background an innocous music or a prompt for say 2 seconds, thus, people aren't waiting in dead-air, get some audio-feedback, and if the prompt is truncated, it doesn't matter since it was just a feeder in the first place. Wait will also not take any DTMF input during that time, so repeat users are stuck for that time.
Ofcourse if you notice a significant % of your VoIP sessions take time to settle, then best do a Wait(2), no point in send garble-jumble down the line. JT, as usual has very valuable suggestions.
Note and update
New versions of Asterisk have added "Answer" capabilities to several functions like Playback(), which means that those functions will answer themselves if necessary.C F, shmaltz at gmail dot com:
I was having problems that zap (FXO) channels were answered when I assumed that they will not be answered because the context didn't have any answer cmd in it. However I found out (the hard way), that you DONT have to do answer before using playback, and even without answer the ZAP line gets answered when using playback.
You can find it all here:
http://lists.digium.com/pipermail/asterisk-users/2005-January/082966.html
I know that under Note and update someone already posted it, but since I wasn't the only one in the list that didn't notice this note and update I decided to add this.
Back to Asterisk tips and tricks

Comments
333Re: SPA-941 DND and wait...
exten => you,1,Dial(SIP/you|20)
exten => you,2,Voicemail(uyou)
exten => you,3,Hangup()
exten => you,102,Wait(2)
exten => you,103,Voicemail(byou)
exten => you,104,Hangup()
333SPA-941 DND and wait...