<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Asterisk 1.6 WaitForSilence Problem</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">I've set up an outbound .call system for customer callbacks and the like. Calls are going out over analog lines and I'm trying to use the WaitForSilence routine to make sure the phone has stopped ringing before starting message playback. The problem is that if I set the first argument of WaitForSilence to anything other than 1, WaitForSilence never exits.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">Some general info on my setup:</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">more /proc/version</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">:</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B></B></SPAN><SPAN LANG="en-us"><B><FONT FACE="Arial">Linux version 2.6.16.60-0.34-smp (geeko@buildhost) (gcc version 4.1.2 20070115 (SUSE Linux)) #1 SMP Fri Jan 16 14:59:01 UTC 2009</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">Asterisk Version:</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B></B></SPAN><SPAN LANG="en-us"><B><FONT FACE="Arial">Connected to Asterisk 1.6.1.0 currently running on ivueivrtest (pid = 1639)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">dahdi version: </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B></B></SPAN><SPAN LANG="en-us"><B><FONT FACE="Arial">2.2.0-rc4</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">/etc/dahdi/system.conf</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B></B></SPAN><SPAN LANG="en-us"><B><FONT FACE="Arial"># Autogenerated by /usr/sbin/dahdi_genconf on Thu May 21 11:50:14 2009</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial"># If you edit this file and execute /usr/sbin/dahdi_genconf again,</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial"># your manual changes will be LOST.</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial"># Dahdi Configuration File</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">#</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial"># This file is parsed by the Dahdi Configurator, dahdi_cfg</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">#</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial"># Span 1: WCTDM/0 "Wildcard TDM2400P Board 1" (MASTER)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">fxsks=1</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">echocanceller=mg2,1</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">fxsks=2</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">echocanceller=mg2,2</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">fxsks=3</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">echocanceller=mg2,3</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">fxsks=4</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">echocanceller=mg2,4</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial"># Global data</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">loadzone = us</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">defaultzone = us</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">/etc/asterisk/dahdi-channels.conf</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B></B></SPAN><SPAN LANG="en-us"><B><FONT FACE="Arial">; Autogenerated by /usr/sbin/dahdi_genconf on Thu May 21 11:50:15 2009</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">; If you edit this file and execute /usr/sbin/dahdi_genconf again,</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">; your manual changes will be LOST.</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">; Dahdi Channels Configurations (chan_dahdi.conf)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">;</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">; to be #include-d by /etc/chan_dahdi.conf that will include the global settings</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">;</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">; Span 1: WCTDM/0 "Wildcard TDM2400P Board 1" (MASTER)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">;;; line="1 WCTDM/0/0"</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">threewaycalling=yes</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callwaiting=yes</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">transfer=yes</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callprogress=no</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">signalling=fxs_ks</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=asreceived</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=0</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=from-pstn</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">channel => 1</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=default</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">;;; line="2 WCTDM/0/1"</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">signalling=fxs_ks</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=asreceived</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=0</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=from-pstn</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">channel => 2</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=default</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">;;; line="3 WCTDM/0/2"</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">signalling=fxs_ks</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=asreceived</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=0</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=from-pstn</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">channel => 3</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=default</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">;;; line="4 WCTDM/0/3"</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">signalling=fxs_ks</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=asreceived</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=0</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=from-pstn</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">channel => 4</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">callerid=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">group=</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">context=default</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<BR>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">/etc/asterisk/extensions.conf</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B></B></SPAN><SPAN LANG="en-us"><B><FONT FACE="Arial">[general]</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">static=yes</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">writeprotect=no</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">clearglobalvars=no</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">[globals]</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">CONSOLE=Console/dsp ; Console interface for demo</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">IAXINFO=guest ; IAXtel username/password</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">TRUNK=DAHDI/G0 ; Trunk interface</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">[outdial]</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">exten => s,1,Set(TIMEOUT(response)=3)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">exten => s,n,WaitForSilence(4000,1,16)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">exten => s,n,Agi(agi://localhost/Outdial.agi)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">exten => s,n,Hangup()</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">exten => failed,1,Verbose(Outdial failed)</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">exten => failed,n,Verbose(Reason= ${REASON})</FONT></B></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><B><FONT FACE="Arial">exten => failed,n,Hangup()</FONT></B></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">****</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">Thanks in advance for any help you can provide</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"><FONT FACE="Arial">,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">Deric Page</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT FACE="Arial">deric.page@nisc.coop</FONT></SPAN><SPAN LANG="en-us"></SPAN><SPAN LANG="en-us"></SPAN></P>
</BODY>
</HTML>