[Asterisk-Users] AbsoluteTimeout Inside A Macro

Christopher L. Wade clwade at sparco.com
Mon Aug 9 13:15:24 MST 2004


Hi all,

Is it just me and not reading the docs right, or has anybody else had 
problems with the AbsoluteTimeout application and the 'T' extension when 
used inside a macro?

[macro-attended]
; ARG1 is the device to dial out on, SIP or Zap, or whatever
; ARG2 is the extension to dial using 'attended' dialing
exten => s,1,AbsoluteTimeout(30)
exten => s,2,AGI(attended-extension,${ARG1},${ARG2})
; attended-extension takes a device string and an extension
; and builds a dial string according to some crazy internal logic
exten => s,3,Dial(${DIALSTRING},5,t)
exten => s,4,Goto(s-${DIALSTATUS},1)

exten => s-NOANSWER,1,Goto(s,1)

exten => T,1,NoOp("i got here here")
exten => T,2,Goto(s,1)

The purpose of this macro is to be able to say something like

exten => _8XX,1,Macro(attended,SIP,${EXTEN})

and have the the dialed extension rung, then, if no answer within 5 
seconds, have the dialed extension plus an 'attendant' for that 
extension rung, (etc. etc. etc.).  If nobody answers after 30 seconds, 
the caller is (read 'will be') offered the chance to leave a voicemail, 
otherwise re-enter the loop, ringing the 'full' attendant list for the 
requested extension.

When I test this, everything works according to plan, except when 
AbsoluteTimeout expires, my T extension inside the macro is not 
executed, the call is simply hungup.  What am I doing wrong?


Thanks,
Chris




More information about the asterisk-users mailing list