....sorry forgot the extensions.conf

Comment on Asterisk addon rate-engine
Anonymous

....sorry forgot the extensions.conf

Posted:Sun 16 of Jan, 2005 (17:51 UTC)
oh i will just include that here.
(:cool:)
[macro-dial-lcr]
; ARG1 = number to dial
; ARG2 = timeout value
; ARG3 = flag determines if hangup or return on no answer
; HR = hangup and return (default)
; RT = return without hangup (must set)
;
exten => s,1,SetGlobalVar(FOUNDME=ANSWER)
;exten => s,2,GotoIf($[${LEN(${ARG1})} = 10]?2:4)
exten => s,2,SetVar(NumToDial=${ARG1})
exten => s,3,RouteCall(${NumToDial})
;exten => s,6,Goto(s,6)
;
exten => s,4,NoOp(${ISO})
;exten => s,5,NoOp(${DESTINATION1})
exten => s,6,SetGlobalVar(FOUNDME=${DIALSTATUS})
exten => s,5,NoOp(${DESTINATION1} ${PERIODCOST1}  "vs"   ${DESTINATION2} ${PERIODCOST2})
exten => s,7,AGI(sort-trunksphp.agi);
exten => s,8,NoOp(${DESTINATION1} ${ECOST1}  "vs"  ${DESTINATION2} ${ECOST2})
exten => s,9,Noop
exten => s,10,Dial(${DESTINATION1},${ARG2})
exten => s,11,SetGlobalVar(FOUNDME=${DIALSTATUS})
exten => s,12,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?9:20)
;
exten => s,13,SetGlobalVar(FOUNDME=ANSWER)
exten => s,14,Dial(${DESTINATIION2},${ARG2})
exten => s,15,SetGlobalVar(FOUNDME=${DIALSTATUS})


exten => s,16,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?13:20)
;
exten => s,17,SetGlobalVar(FOUNDME=ANSWER)
exten => s,18,Dial(${DESTINATIION3},${ARG2})
exten => s,19,SetGlobalVar(FOUNDME=${DIALSTATUS})
exten => s,20,GotoIf($[${DIALSTATUS} = CHANUNAVAIL]?18:20)
;
exten => s,21,SetGlobalVar(FOUNDME=ANSWER)
exten => s,22,Dial(${DESTINATIION4},${ARG2})
exten => s,23,SetGlobalVar(FOUNDME=${DIALSTATUS})
exten => s,24,Goto(s-${DIALSTATUS},1)



and in the dial plan ... 
exten => _00XX.,1,macro(dial-lcr,${EXTEN}, ${LONGTIMEOUT})
exten => _011XX.,1,macro(dial-lcr,00${EXTEN:3}, ${LONGTIMEOUT})