<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have configured an Asterisk server with TDM01P
(1FXO) for testing purpose. The interface I'm using is AMP. <STRONG> I want
to configure my extension so that when I dial from my mobile phone to
the asterisk line, I want it to transfer the call to any extension, say
3042 and after a particular number of rings, transfer the call to voice mail so
that I can record my message. </STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>My Zaptel.conf is as follows:</DIV>
<DIV>--------------------------</DIV>
<DIV>context=from-pstn<BR>signalling=fxs_ks<BR>faxdetect=incoming<BR>usecallerid=yes<BR>echocancel=yes<BR>echocancelwhenbridged=yes<BR>echotraining=400<BR>callerid=asreceived<BR>group=1<BR>channel=4<BR>---------------------------</DIV>
<DIV> </DIV>
<DIV>My extensions.conf is as follows:</DIV>
<DIV>------------------------------------------------------------------------------------------------------</DIV>
<DIV>; Asterisk Management Portal (AMP)<BR>; Copyright (C) 2004 Coalescent
Systems Inc</DIV>
<DIV> </DIV>
<DIV>; dialparties.agi (<A
href="http://www.sprackett.com/asterisk/">http://www.sprackett.com/asterisk/</A>)<BR>;
Asterisk::AGI (<A
href="http://asterisk.gnuinter.net/">http://asterisk.gnuinter.net/</A>)<BR>; gsm
(<A
href="http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html">http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html</A>)<BR>;
loligo sounds (<A
href="http://www.loligo.com/asterisk/sounds/">http://www.loligo.com/asterisk/sounds/</A>)<BR>;
mpg123 (<A
href="http://voip-info.org/wiki-Asterisk+config+musiconhold.conf">http://voip-info.org/wiki-Asterisk+config+musiconhold.conf</A>)</DIV>
<DIV> </DIV>
<DIV><BR>; include part generated from AMP<BR>#include
extensions_additional.conf</DIV>
<DIV> </DIV>
<DIV><BR>[from-pstn]<BR>exten => s,1,GotoIf($[${IN_OVERRIDE} =
forcereghours]?from-pstn-reghours,s,1:)<BR>exten =>
s,2,GotoIf($[${IN_OVERRIDE} = forceafthours]?from-pstn-afthours,s,1:)<BR>exten
=> s,3,GotoIfTime(${REGTIME}|${REGDAYS}|*|*?from-pstn-reghours,s,1:)<BR>exten
=> s,4,Goto(from-pstn-afthours,s,1)</DIV>
<DIV> </DIV>
<DIV>[from-pstn-reghours]<BR>exten => s,1,GotoIf($[${FAX_RX} =
disabled]?from-pstn-reghours-nofax,s,1:2) ; if fax
detection is disabled, then jump to from-pstn-nofax - else continue<BR>exten
=> s,2,Answer<BR>exten => s,3,Wait(1)<BR>exten =>
s,4,SetVar(intype=${INCOMING})<BR>exten =>
s,5,Cut(intype=intype,-,1)<BR>exten => s,6,GotoIf($[${intype} =
EXT]?7:9)
; If INCOMING starts with EXT, then assume its an extension<BR>exten =>
s,7,Wait(3)
;wait 3 more second to make sure this isn't a fax before dialing
someone<BR>exten => s,8,Goto(ext-local,${INCOMING:4},1)<BR>exten =>
s,9,GotoIf($[${intype} = GRP]?10:11) ; If INCOMING starts with GRP,
then assume its a ring group<BR>exten =>
s,10,Goto(ext-group,${INCOMING:4},1)<BR>exten =>
s,11,Goto(${INCOMING},s,1)
; not EXT or GR1 - it's an auto attendant<BR>exten =>
fax,1,Goto(ext-fax,in_fax,1)<BR>exten => h,1,Hangup</DIV>
<DIV> </DIV>
<DIV>[from-pstn-reghours-nofax]<BR>exten =>
s,1,SetVar(intype=${INCOMING})<BR>exten =>
s,2,Cut(intype=intype,-,1)<BR>exten => s,3,GotoIf($[${intype} =
EXT]?4:5)
; If INCOMING starts with EXT, then assume its an extension<BR>exten =>
s,4,Goto(ext-local,${INCOMING:4},1)<BR>exten => s,5,GotoIf($[${intype} =
GRP]?6:7) ; If INCOMING starts with GRP, then assume its
a ring group<BR>exten => s,6,Goto(ext-group,${INCOMING:4},1)<BR>exten =>
s,7,Answer
; answer call before auto attendant<BR>exten => s,8,Wait(1)<BR>exten =>
s,9,Goto(${INCOMING},s,1)
; not EXT or GR1 - it's an auto attendant<BR>exten =>
fax,1,Goto(ext-fax,in_fax,1)<BR>exten => h,1,Hangup</DIV>
<DIV> </DIV>
<DIV>[from-pstn-afthours]<BR>exten => s,1,GotoIf($[${FAX_RX} =
disabled]?from-pstn-afthours-nofax,s,1:2) ; if fax
detection is disabled, then jump to from-pstn-nofax - else continue<BR>exten
=> s,2,Answer<BR>exten => s,3,Wait(1)<BR>exten =>
s,4,SetVar(intype=${AFTER_INCOMING})<BR>exten =>
s,5,Cut(intype=intype,-,1)<BR>exten => s,6,GotoIf($[${intype} =
EXT]?7:9)
; If INCOMING starts with EXT, then assume its an extension<BR>exten =>
s,7,Wait(3)
;wait 3 more second to make sure this isn't a fax before dialing
someone<BR>exten => s,8,Goto(ext-local,${AFTER_INCOMING:4},1)<BR>exten =>
s,9,GotoIf($[${intype} = GRP]?10:11) ; If INCOMING starts with GRP,
then assume its a ring group<BR>exten =>
s,10,Goto(ext-group,${AFTER_INCOMING:4},1)<BR>exten =>
s,11,Goto(${AFTER_INCOMING},s,1)
; not EXT or GR1 - it's an auto attendant<BR>exten =>
fax,1,Goto(ext-fax,in_fax,1)<BR>exten => h,1,Hangup</DIV>
<DIV> </DIV>
<DIV>[from-pstn-afthours-nofax]<BR>exten =>
s,1,SetVar(intype=${AFTER_INCOMING})<BR>exten =>
s,2,Cut(intype=intype,-,1)<BR>exten => s,3,GotoIf($[${intype} =
EXT]?4:5)
; If INCOMING starts with EXT, then assume its an extension<BR>exten =>
s,4,Goto(ext-local,${AFTER_INCOMING:4},1)<BR>exten => s,5,GotoIf($[${intype}
= GRP]?6:7) ; If INCOMING starts with GRP, then assume
its a ring group<BR>exten =>
s,6,Goto(ext-group,${AFTER_INCOMING:4},1)<BR>exten =>
s,7,Answer
; answer call before auto attendant<BR>exten => s,8,Wait(1)<BR>exten =>
s,9,Goto(${AFTER_INCOMING},s,1)
; not EXT or GR1 - it's an auto attendant<BR>exten =>
fax,1,Goto(ext-fax,in_fax,1)<BR>exten =>
h,1,Hangup</DIV></FONT></FONT></DIV></BODY></HTML>