Hi,
I have configured an Asterisk server with TDM01P (1FXO) for testing purpose. The
interface I'm using is AMP.  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.
My Zaptel.conf is as follows:
--------------------------
context=from-pstn
signalling=fxs_ks
faxdetect=incoming
usecallerid=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=400
callerid=asreceived
group=1
channel=4
---------------------------
My extensions.conf is as follows:
------------------------------------------------------------------------------------------------------
; Asterisk Management Portal (AMP)
; Copyright (C) 2004 Coalescent Systems Inc
; dialparties.agi (http://www.sprackett.com/asterisk/)
; Asterisk::AGI (http://asterisk.gnuinter.net/)
; gsm (http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html)
; loligo sounds (http://www.loligo.com/asterisk/sounds/)
; mpg123 (http://voip-info.org/wiki-Asterisk+config+musiconhold.conf)
; include part generated from AMP
#include extensions_additional.conf
[from-pstn]
exten => s,1,GotoIf($[${IN_OVERRIDE} =
forcereghours]?from-pstn-reghours,s,1:)
exten => s,2,GotoIf($[${IN_OVERRIDE} =
forceafthours]?from-pstn-afthours,s,1:)
exten => s,3,GotoIfTime(${REGTIME}|${REGDAYS}|*|*?from-pstn-reghours,s,1:)
exten => s,4,Goto(from-pstn-afthours,s,1)
[from-pstn-reghours]
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
exten => s,2,Answer
exten => s,3,Wait(1)
exten => s,4,SetVar(intype=${INCOMING})
exten => s,5,Cut(intype=intype,-,1)
exten => s,6,GotoIf($[${intype} = EXT]?7:9)             ; If INCOMING starts
with EXT, then assume its an extension
exten => s,7,Wait(3)                                                    ;wait
3 more second to make sure this isn't a fax before dialing someone
exten => s,8,Goto(ext-local,${INCOMING:4},1)
exten => s,9,GotoIf($[${intype} = GRP]?10:11)   ; If INCOMING starts with
GRP, then assume its a ring group
exten => s,10,Goto(ext-group,${INCOMING:4},1)
exten => s,11,Goto(${INCOMING},s,1)                     ; not EXT or GR1 -
it's an auto attendant
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => h,1,Hangup
[from-pstn-reghours-nofax]
exten => s,1,SetVar(intype=${INCOMING})
exten => s,2,Cut(intype=intype,-,1)
exten => s,3,GotoIf($[${intype} = EXT]?4:5)             ; If INCOMING starts
with EXT, then assume its an extension
exten => s,4,Goto(ext-local,${INCOMING:4},1)
exten => s,5,GotoIf($[${intype} = GRP]?6:7)     ; If INCOMING starts with
GRP, then assume its a ring group
exten => s,6,Goto(ext-group,${INCOMING:4},1)
exten => s,7,Answer                                                     ;
answer call before auto attendant
exten => s,8,Wait(1)
exten => s,9,Goto(${INCOMING},s,1)                              ; not EXT or
GR1 - it's an auto attendant
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => h,1,Hangup
[from-pstn-afthours]
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
exten => s,2,Answer
exten => s,3,Wait(1)
exten => s,4,SetVar(intype=${AFTER_INCOMING})
exten => s,5,Cut(intype=intype,-,1)
exten => s,6,GotoIf($[${intype} = EXT]?7:9)             ; If INCOMING starts
with EXT, then assume its an extension
exten => s,7,Wait(3)                                                    ;wait
3 more second to make sure this isn't a fax before dialing someone
exten => s,8,Goto(ext-local,${AFTER_INCOMING:4},1)
exten => s,9,GotoIf($[${intype} = GRP]?10:11)   ; If INCOMING starts with
GRP, then assume its a ring group
exten => s,10,Goto(ext-group,${AFTER_INCOMING:4},1)
exten => s,11,Goto(${AFTER_INCOMING},s,1)                       ; not EXT or
GR1 - it's an auto attendant
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => h,1,Hangup
[from-pstn-afthours-nofax]
exten => s,1,SetVar(intype=${AFTER_INCOMING})
exten => s,2,Cut(intype=intype,-,1)
exten => s,3,GotoIf($[${intype} = EXT]?4:5)             ; If INCOMING starts
with EXT, then assume its an extension
exten => s,4,Goto(ext-local,${AFTER_INCOMING:4},1)
exten => s,5,GotoIf($[${intype} = GRP]?6:7)     ; If INCOMING starts with
GRP, then assume its a ring group
exten => s,6,Goto(ext-group,${AFTER_INCOMING:4},1)
exten => s,7,Answer                                                     ;
answer call before auto attendant
exten => s,8,Wait(1)
exten => s,9,Goto(${AFTER_INCOMING},s,1)                                ; not
EXT or GR1 - it's an auto attendant
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => h,1,Hangup
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20050118/8d23052f/attachment.htm