[Asterisk-Users] AbsoluteTimeout Inside A Macro
Christopher L. Wade
clwade at sparco.com
Tue Aug 10 10:03:46 MST 2004
Christopher L. Wade wrote:
> 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
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
Anybody?
Right now I'm considering doing this inside an AGI app, but I don't like
the way Dial is 'blocking' (AGI or not). I guess I could use chan_local
in my dial string inside the AGI to make it 'fork' but that just creates
a whole new ball of ear wax to deal with. :(
This 'bug' seams strange though, because I've seen examples that, at
least to my eyes, appear exactly the same as my above code.
Any help would be appreciated.
Thanks,
Chris
More information about the asterisk-users
mailing list