[Asterisk-Users] Inbound analog Telco line not answered

Jeff R Glassman jrglass at columbus.rr.com
Wed Jan 26 15:13:07 MST 2005


I have an X100P clone hocked up to an analog line of my PRI.  I can use it
to dial out.

but when I call the extension it answers and says "GOODBY"

I have a Livevoip DID which successfuly rings to ext 202

I am using asterisk at home and through the AMP inface the line should ring to
ext 202


Below are Asterisk Messages, Extensions.conf and Extensions_additional.conf

Extensions.conf

Jeff

Sorry for the long post!


----------------------------------------------------------------------------
---------------

Asterisk Message

  -- Starting simple switch on 'Zap/1-1'
  == Starting Zap/1-1 at inbound-analog,s,1 failed so falling back to exten
's'
  == Starting Zap/1-1 at inbound-analog,s,1 still failed so falling back to
context 'default'
    -- Executing Playback("Zap/1-1", "vm-goodbye") in new stack
    -- Playing 'vm-goodbye' (language 'en')
    -- Executing Macro("Zap/1-1", "hangupcall") in new stack
    -- Executing ResetCDR("Zap/1-1", "w") in new stack
    -- Executing NoCDR("Zap/1-1", "") in new stack
    -- Executing Wait("Zap/1-1", "5") in new stack
  == Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'Zap/1-1'
in macro 'hangupcall'
  == Spawn extension (default, s, 2) exited non-zero on 'Zap/1-1'
    -- Hungup 'Zap/1-1'


; include part generated from AMP
#include extensions_additional.conf






[from-pstn]
include => ext-did
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:12) 	; If INCOMING starts with
GRP, then assume its a ring group
exten => s,10,Wait(3)
exten => s,11,Goto(ext-group,${INCOMING:4},1)
exten => s,12,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:12) 	; If INCOMING starts with
GRP, then assume its a ring group
exten => s,10,Wait(3)
exten => s,11,Goto(ext-group,${AFTER_INCOMING:4},1)
exten => s,12,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

;
############################################################################
; Macros [macro]
;
############################################################################

; Rings one or more extensions.  Handles things like call forwarding and DND
; We don't call dial directly for anything internal anymore.
; ARGS: $TIMER, $OPTIONS, $EXT1, $EXT2, $EXT3, ...
; Assumes that 2xxx is SIP and 3xxN is ZAP, where N is channel.
; Use a Macro call such as the following:
;  Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...)
[macro-dial]
exten => s,1,AGI,dialparties.agi
exten => s,22,Macro(hangupcall)             ; The call was answered and then
hungup
exten => s,23,Wait(1)
exten => s,24,Voicemail(b${ARG3})           ; The call was internal to
extension, and was busy
exten => o,1,Background(one-moment-please)	; 0 during vm message will hangup
exten => o,2,Hangup

; Ring an extension, if the extension is busy or there is no answer send it
; to voicemail
; ARGS: $VMBOX, $EXT
[macro-exten-vm]
exten => s,1,SetGroup(${CALLERIDNUM})
exten => s,2,SetMusicOnHold(default)
exten => s,3,Setvar(FROMCONTEXT=exten-vm)
exten => s,4,Macro(dial,${RINGTIMER},${DIAL_OPTIONS},${ARG2})
exten => s,5,Wait(1)
exten => s,6,Voicemail(u${ARG1})      ; no answer to voicemail
exten => s,7,Macro(hangupcall)
exten => s,106,Wait(1)
exten => s,107,Voicemail(b${ARG1})
exten => o,1,Background(one-moment-please)	; 0 during vm message will hangup
exten => o,2,Hangup
exten => a,1,Goto(app-directory,*411,1)
exten => a,2,Hangup

[macro-vm]
exten => s,1,Voicemail(u${ARG1})      ; no answer to voicemail
exten => s,2,Hangup
exten => o,1,Background(one-moment-please)	; 0 during vm message will hangup
exten => o,2,Hangup
exten => a,1,Goto(app-directory,*411,1)
exten => a,2,Hangup

; For some reason, if I don't run setCIDname, CALLERIDNAME will be blank in
my AGI
; ARGS: none
[macro-fixcid]
exten => s,1,SetCIDName(${CALLERIDNAME})

; Ring groups of phones
; ARGS: comma separated extension list
[macro-rg-group];
exten => s,1,Setvar(GRP=${GROUP})   ;my original choice of variable GROUP is
now overwritten by SetGroup.  Copy contents to GRP
exten => s,2,SetGroup(${CALLERIDNUM})
exten => s,3,Setvar(FROMCONTEXT=rg-group)
exten => s,4,SetCIDName(${PRE}${CALLERIDNAME})
exten => s,5,Macro(dial,${RINGTIMER},${DIAL_OPTIONS},${GRP})

;
; Outgoing channel(s) are busy ... inform the client
;
[macro-outisbusy]
exten => s,1,Playback(allison7/all-circuits-busy-now)
exten => s,2,Playback(allison7/pls-try-call-later)
exten => s,3,Macro(hangupcall)

; What to do on hangup.
[macro-hangupcall]
exten => s,1,ResetCDR(w)
exten => s,2,NoCDR()
exten => s,3,Wait(5)
exten => s,4,Hangup

[macro-faxreceive]
exten => s,1,SetVar(FAXFILE=/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => s,2,SetVar(EMAILADDR=${FAX_RX_EMAIL})
exten => s,3,rxfax(${FAXFILE})
exten => s,103,SetVar(EMAILADDR=${FAX_RX_EMAIL})
exten => s,104,Goto(3)

[macro-dialout]
exten => s,1,SetVar(length=${LEN(${DIAL_OUT_${ARG1}})})
exten => s,2,Dial(${OUT_${ARG1}}/${ARG2:${length}})
exten => s,3,Congestion
exten => s,102,Macro(outisbusy)

;
############################################################################
; Applications [app]
;
############################################################################
;
[app-directory]
exten => #,1,Wait(1)
exten => #,2,GotoIf($[${DIRECTORY} = first]?4:)
exten => #,3,Directory(default|ext-local)
exten => #,4,Directory(default|ext-local|f)
exten => #,5,Hangup
exten => *411,1,Wait(1)
exten => *411,2,GotoIf($[${DIRECTORY} = first]?4:)
exten => *411,3,Directory(default|ext-local)
exten => *411,4,Directory(default|ext-local|f)
exten => *411,5,Hangup
exten => h,1,Hangup

[app-dnd]
exten => *78,1,Answer
exten => *78,2,Wait(1)
exten => *78,3,DBput(DND/${CALLERIDNUM}=YES)
exten => *78,4,Playback(allison7/do-not-disturb)
exten => *78,5,Playback(activated)
exten => *78,6,Macro(hangupcall)
exten => *79,1,Answer
exten => *79,2,Wait(1)
exten => *79,3,DBdel(DND/${CALLERIDNUM})
exten => *79,4,Playback(allison7/do-not-disturb)
exten => *79,5,Playback(de-activated)
exten => *79,6,Macro(hangupcall)

[app-messagecenter]
exten => *98,1,Answer
exten => *98,2,Wait(1)
exten => *98,3,VoiceMailMain(default)
exten => *98,4,Macro(hangupcall)
exten => _*98X.,1,Answer			; can dial *98<exten> to skip 'mailbox' prompt.
Useful for speedial.
exten => _*98X.,2,Wait(1)
exten => _*98X.,3,VoiceMailMain(${EXTEN:3}@default)
exten => _*98X.,4,Macro(hangupcall)

[app-callwaiting]
exten => *70,1,Answer
exten => *70,2,Wait(1)
exten => *70,3,DBput(CW/${CALLERIDNUM}=ENABLED)
exten => *70,4,Playback(callwaiting)
exten => *70,5,Playback(activated)
exten => *70,6,Macro(hangupcall)
exten => *71,1,Answer
exten => *71,2,Wait(1)
exten => *71,3,DBdel(CW/${CALLERIDNUM})
exten => *71,4,Playback(callwaiting)
exten => *71,5,Playback(de-activated)
exten => *71,6,Macro(hangupcall)

[app-callforward]
; dialed call forward app - forwards calling extension
exten => _*72.,1,DBput(CF/${CALLERIDNUM}=${EXTEN:3})
exten => _*72.,2,Answer
exten => _*72.,3,Wait(1)
exten => _*72.,4,Playback(loligo/call-fwd-unconditional)
exten => _*72.,5,Playback(loligo/for)
exten => _*72.,6,Playback(loligo/extension)
exten => _*72.,7,SayDigits(${CALLERIDNUM})
exten => _*72.,8,Playback(loligo/is-set-to)
exten => _*72.,9,SayDigits(${EXTEN:3})
exten => _*72.,10,Macro(hangupcall)
; prompting call forward app - forwards entered extension
exten => *72,1,Answer
exten => *72,2,Wait(1)
exten => *72,3,BackGround(allison7/please-enter-your)
exten => *72,4,Playback(extension)
exten => *72,5,Read(fromext,then-press-pound)
exten => *72,6,Wait(1)
exten => *72,7,BackGround(ent-target-attendant)
exten => *72,8,Read(toext,then-press-pound)
exten => *72,9,Wait(1)
exten => *72,10,DBput(CF/${fromext}=${toext})
exten => *72,11,Playback(call-fwd-unconditional)
exten => *72,12,Playback(for)
exten => *72,13,Playback(extension)
exten => *72,14,SayDigits(${fromext})
exten => *72,15,Playback(is-set-to)
exten => *72,16,SayDigits(${toext})
exten => *72,17,Macro(hangupcall)
; cancels dialed extension call forward
exten => _*73.,1,DBdel(CF/${EXTEN:3})
exten => _*73.,2,Answer
exten => _*73.,3,Wait(1)
exten => _*73.,4,SayDigits(${EXTEN:3})
exten => _*73.,5,Playback(call-fwd-cancelled)
exten => _*73.,6,Macro(hangupcall)
; cancels call forward for calling extension
exten => *73,1,DBdel(CF/${CALLERIDNUM})
exten => *73,2,Answer
exten => *73,3,Wait(1)
exten => *73,4,Playback(loligo/call-fwd-cancelled)
exten => *73,5,Macro(hangupcall)
exten => h,1,Hangup

[app-calltrace]
; We can't have our timeouts or dial digits collide with other applications
; or extensions, so we build the app in pieces
exten => *69,1,Goto(app-calltrace-perform,s,1)

[app-calltrace-perform]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Background(allison7/info-about-last-call)
exten => s,4,Background(allison7/telephone-number)
exten => s,5,Dbget(lastcaller=CALLTRACE/${CALLERIDNUM})
exten => s,6,GotoIf($[${lastcaller}]?7:13)
exten => s,7,SayDigits(${lastcaller})
exten => s,8,DigitTimeout(3)
exten => s,9,ResponseTimeout(7)
exten => s,10,Background(loligo/to-call-this-number)
exten => s,11,Background(allison7/press-1)
exten => s,12,Goto(15)
exten => s,13,Playback(loligo/from-unknown-caller)
exten => s,14,Macro(hangupcall)
exten => s,15,NoOp
exten => 1,1,Goto(from-internal,${lastcaller},1);
exten => i,1,Playback(vm-goodbye)
exten => i,2,Macro(hangupcall)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Macro(hangupcall)

;
############################################################################
; Outbound Trunk Contexts [outbound]
;
############################################################################

[outbound-local]
ignorepat => ${DIAL_OUT}
exten => _NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _NXXXXXX,2,Dial(${OUT}/${EXTEN},,)
exten => _NXXXXXX,3,Congestion
exten => _NXXXXXX,103,Macro(outisbusy)
exten => _NXXNXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _NXXNXXXXXX,2,Dial(${OUT}/${EXTEN},,)
exten => _NXXNXXXXXX,3,Congestion
exten => _NXXNXXXXXX,103,Macro(outisbusy)
exten => _${DIAL_OUT}NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}NXXXXXX,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}NXXXXXX,3,Congestion
exten => _${DIAL_OUT}NXXXXXX,103,Macro(outisbusy)
exten => _${DIAL_OUT}NXXXXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}NXXNXXXXXX,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}NXXNXXXXXX,3,Congestion
exten => _${DIAL_OUT}NXXNXXXXXX,103,Macro(outisbusy)

[outbound-tollfree]
ignorepat => ${DIAL_OUT}
exten => _1800NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _1800NXXXXXX,2,Dial(${OUT}/${EXTEN},,)
exten => _1800NXXXXXX,3,Congestion
exten => _1800NXXXXXX,103,Macro(outisbusy)
exten => _1888NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _1888NXXXXXX,2,Dial(${OUT}/${EXTEN},,)
exten => _1888NXXXXXX,3,Congestion
exten => _1888NXXXXXX,103,Macro(outisbusy)
exten => _1877NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _1877NXXXXXX,2,Dial(${OUT}/${EXTEN},,)
exten => _1877NXXXXXX,3,Congestion
exten => _1877NXXXXXX,103,Macro(outisbusy)
exten => _1866NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _1866NXXXXXX,2,Dial(${OUT}/${EXTEN},,)
exten => _1866NXXXXXX,3,Congestion
exten => _1866NXXXXXX,103,Macro(outisbusy)
exten => _${DIAL_OUT}1800NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}1800NXXXXXX,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}1800NXXXXXX,3,Congestion
exten => _${DIAL_OUT}1800NXXXXXX,103,Macro(outisbusy)
exten => _${DIAL_OUT}1888NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}1888NXXXXXX,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}1888NXXXXXX,3,Congestion
exten => _${DIAL_OUT}1888NXXXXXX,103,Macro(outisbusy)
exten => _${DIAL_OUT}1877NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}1877NXXXXXX,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}1877NXXXXXX,3,Congestion
exten => _${DIAL_OUT}1877NXXXXXX,103,Macro(outisbusy)
exten => _${DIAL_OUT}1866NXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}1866NXXXXXX,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}1866NXXXXXX,3,Congestion
exten => _${DIAL_OUT}1866NXXXXXX,103,Macro(outisbusy)

[outbound-ld]
ignorepat => ${DIAL_OUT}
exten => _1NXXNXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _1NXXNXXXXXX,2,Dial(${OUT}/${EXTEN},,)
exten => _1NXXNXXXXXX,3,Congestion
exten => _1NXXNXXXXXX,103,Macro(outisbusy)
exten => _${DIAL_OUT}1NXXNXXXXXX,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}1NXXNXXXXXX,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}1NXXNXXXXXX,3,Congestion
exten => _${DIAL_OUT}1NXXNXXXXXX,103,Macro(outisbusy)

[outbound-international]
ignorepat => ${DIAL_OUT}
exten => _011.,1,SetGroup(${CALLERIDNUM})
exten => _011.,2,Dial(${OUT}/${EXTEN},,)
exten => _011.,3,Congestion
exten => _011.,103,Macro(outisbusy)
exten => _${DIAL_OUT}011.,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}011.,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}011.,3,Congestion
exten => _${DIAL_OUT}011.,103,Macro(outisbusy)

[outbound-emerg]
exten => 911,1,SetGroup(${CALLERIDNUM})
exten => 911,2,Dial(${OUT}/${EXTEN},,${DIAL_OPTIONS})
exten => 911,3,Congestion
exten => 911,103,Playback(ss-noservice)
exten => 911,104,Congestion
exten => _${DIAL_OUT}911,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}911,2,Dial(${OUT}/${EXTEN:1},,${DIAL_OPTIONS})
exten => _${DIAL_OUT}911,3,Congestion
exten => _${DIAL_OUT}911,103,Playback(ss-noservice)
exten => _${DIAL_OUT}911,104,Congestion

[outbound-info]
exten => 411,1,SetGroup(${CALLERIDNUM})
exten => 411,2,Dial(${OUT}/${EXTEN},,)
exten => 411,3,Congestion
exten => 411,103,Playback(ss-noservice)
exten => 411,104,Congestion
exten => _${DIAL_OUT}411,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}411,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}411,3,Congestion
exten => _${DIAL_OUT}411,103,Playback(ss-noservice)
exten => _${DIAL_OUT}411,104,Congestion
exten => 311,1,SetGroup(${CALLERIDNUM})
exten => 311,2,Dial(${OUT}/${EXTEN},,)
exten => 311,3,Congestion
exten => 311,103,Playback(ss-noservice)
exten => 311,104,Congestion
exten => _${DIAL_OUT}311,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}311,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}311,3,Congestion
exten => _${DIAL_OUT}311,103,Playback(ss-noservice)
exten => _${DIAL_OUT}311,104,Congestion
exten => _${DIAL_OUT}*X.,1,SetGroup(${CALLERIDNUM})
exten => _${DIAL_OUT}*X.,2,Dial(${OUT}/${EXTEN:1},,)
exten => _${DIAL_OUT}*X.,3,Congestion
exten => _${DIAL_OUT}*X.,103,Macro(outisbusy)

;
############################################################################
; Inbound Contexts [from]
;
############################################################################

}


	[from-bellster] ;match the context in iax.conf
	; make sure we only accept local calls, limit to 30 minutes
	exten => _1614XXXXXXX,1,Dial(ZAP/1/*67${EXTEN},60,T,L(1800000:1790000))
	exten => _1614XXXXXXX,1,Dial(ZAP/1/*67${EXTEN},60,T,L(1800000:1790000))
	exten => _1614XXXXXXX,1,Dial(ZAP/1/*67${EXTEN},60,T,L(1800000:1790000))

	; watch out for 900, 976, and Bahamas#
	include => frombellster-catchall

	[from-bellster-catchall]
	exten => _.,1,Congestion
	exten => h,1,Hangup     ;hangup event
	exten => i,1,Hangup     ;invalid event
	exten => t,1,Hangup     ;timeout event

	;Note the *67 prefix in ZAP/1/*67${EXTEN} as ZAP/1/*67${EXTEN} to make the
call anonymous.


[from-sip-external]

;give external sip users congestion and hangup
exten => _.,1,AbsoluteTimeout(15)
exten => _.,2,Congestion
exten => _.,3,Hangup

[from-internal]
;allow phones to use applications
include => app-directory
include => app-dnd
include => app-callforward
include => app-callwaiting
include => app-messagecenter
include => app-calltrace
include => parkedcalls
;allow phones to dial other extensions
include => ext-fax
include => ext-local
include => ext-group
include => ext-zapbarge
include => ext-meetme
include => ext-record
include => ext-test
;allow phones to access trunks
include => outbound-emerg
include => outbound-info
include => outbound-local
include => outbound-tollfree
include => outbound-ld
include => outbound-international
include => outbound-trunks
exten => h,1,Macro(hangupcall)


exten => _394.,1,SetCallerId,jrglass at columbus.rr.com
exten => _394.,2,Dial(IAX2/12355 at bellster/${EXTEN:3},60,r)
exten => _394.,3,Congestion





;
############################################################################
; Extension Contexts [ext]
;
############################################################################

[ext-zapbarge]
exten => 888,1,SetGroup(${CALLERIDNUM})
exten => 888,2,Answer
exten => 888,3,Wait(1)
exten => 888,4,ZapBarge
exten => 888,5,Hangup

[ext-meetme]
exten => _8X,1,Answer
exten => _8X,2,Wait(1)
exten => _8X,3,GotoIf($[${CALLERIDNUM} = ${EXTEN:1}]?5:4)
exten => _8X,4,MeetMe(${EXTEN}|sM)
exten => _8X,5,MeetMe(${EXTEN}|asM)

exten => _8XX,1,Answer
exten => _8XX,2,Wait(1)
exten => _8XX,3,GotoIf($[${CALLERIDNUM} = ${EXTEN:1}]?5:4)
exten => _8XX,4,MeetMe(${EXTEN}|sM)
exten => _8XX,5,MeetMe(${EXTEN}|asM)

exten => _8XXX,1,Answer
exten => _8XXX,2,Wait(1)
exten => _8XXX,3,GotoIf($[${CALLERIDNUM} = ${EXTEN:1}]?5:4)
exten => _8XXX,4,MeetMe(${EXTEN}|sM)
exten => _8XXX,5,MeetMe(${EXTEN}|asM)

exten => _8XXXX,1,Answer
exten => _8XXXX,2,Wait(1)
exten => _8XXXX,3,GotoIf($[${CALLERIDNUM} = ${EXTEN:1}]?5:4)
exten => _8XXXX,4,MeetMe(${EXTEN}|sM)
exten => _8XXXX,5,MeetMe(${EXTEN}|asM)


[ext-fax]
exten => in_fax,1,GotoIf($[${FAX_RX} = system]?2:analog_fax,1)
exten => in_fax,2,Macro(faxreceive)
exten => in_fax,3,system(tiff2ps -2eaz -w 8.5 -h 11 ${FAXFILE} | ps2pdf -
${FAXFILE}.pdf)
exten => in_fax,4,system(mime-construct --to ${EMAILADDR} --subject "Fax
from ${CALLERIDNUM} ${CALLERIDNAME}" --attachment ${CALLERIDNUM}.pdf --type
application/pdf --file ${FAXFILE}.pdf)
exten => in_fax,5,system(rm ${FAXFILE} ${FAXFILE}.pdf)
exten => in_fax,6,Hangup
exten => analog_fax,1,GotoIf($[${FAX_RX} = disabled]?3:2)  ;if fax is
disabled, just hang up
exten => analog_fax,2,Dial(${FAX_RX},20,d)
exten => analog_fax,3,Hangup
;exten => out_fax,1,wait(7)
exten => out_fax,1,txfax(${TXFAX_NAME}|caller)
exten => out_fax,2,Hangup
exten => h,1,Hangup()

[ext-record]
exten => *77,1,Wait(2)
exten => *77,2,Record(ivrrecording:wav)
exten => *77,3,Wait(2)
exten => *77,4,Hangup
exten => *99,1,Playback(ivrrecording)
exten => *99,2,Wait(2)
exten => *99,3,Hangup

;this is where parked calls go if they time-out.  Should probably re-ring
[default]
include => ext-local
exten => s,1,Playback(vm-goodbye)
exten => s,2,Macro(hangupcall)

[ext-test]
exten => 7777,1,Goto(from-pstn,s,1)
exten => 666,1,Goto(ext-fax,in_fax,1)
exten => h,1,Macro(hangupcall)
----------------------------------------------------------------------------
--------------
Extensions_additional.conf

[globals]
RINGTIMER = 15
REGTIME = 7:55-17:05
REGDAYS = mon-fri
RECORDEXTEN = ""
PARKNOTIFY = SIP/200
OUT_2 = ZAP/1
OUT = ${OUT_2}
OPERATOR =
NULL = ""
IN_OVERRIDE = none
INCOMING = EXT-202
FAX_RX_EMAIL = fax at mydomain.com
FAX_RX = system
FAX =
E230 = IAX2
E205 = SIP
E204 = SIP
E203 = SIP
E202 = SIP
E201 = SIP
DIRECTORY = last
DIAL_OUT_2 = 9
DIAL_OUT = ${DIAL_OUT_2}
DIAL_OPTIONS = tr
DIALOUTIDS = 2/
CALLFILENAME = ""
AFTER_INCOMING = EXT-202

[ext-did]
exten => 6143644883,1,Goto(ext-local,202,1)	;

[ext-local]
exten => 200,1,Macro(exten-vm,200,200)
exten => 201,1,Macro(exten-vm,201,201)
exten => 202,1,Macro(exten-vm,202,202)
exten => 203,1,Macro(exten-vm,203,203)
exten => 204,1,Macro(exten-vm,204,204)
exten => 205,1,Macro(exten-vm,205,205)
exten => 230,1,Macro(exten-vm,230,230)

[outbound-trunks]
exten => _${DIAL_OUT_2}.,1,Macro(dialout,2,${EXTEN})







More information about the asterisk-users mailing list