[Asterisk-Users] Why ${EXTEN} variable changes after Goto ?

Robert Rozman
Thu, 03 Mar 2005 14:11:23 -0000

Hi,

I'm trying to implement dynamic routing of incoming calls to local extension
if previous outgoing call was unanswered.
But after I do Goto to s-NOANSWER, variable ${EXTEN} changes to
's-NOANSWER'. I guess this is normal, but I don't understand why ?
How to
workaround on this one ?

Thanks in advance,

regards,

Rob.

[outbound-capi-ISDN]
exten => _0.,1,NoOp(Calling ISDN number ${EXTEN:1} on CAPI/7104370 from
${CALLERIDNUM})
exten => _0.,2,Dial,CAPI/7104370:b${EXTEN:1}|10|Tt
exten => _0.,3,Goto(s-${DIALSTATUS},1)
exten => _0.,103,NoOp(Calling ISDN number ${EXTEN:1} on CAPI/7104371)
exten => _0.,104,Dial,CAPI/7104371:b${EXTEN:1}|30|Tt
exten => _0.,105,Goto(s-${DIALSTATUS},1)
exten => _0.,205,Macro(outisbusy)

exten => s-NOANSWER,1,NoOp(NOANSWER - Setting dynamic autoroute for ISDN
number ${EXTEN:1} to local ext. ${CALLERIDNUM})
exten => s-NOANSWER,2,DBput(DYNAMIC/${EXTEN}=${CALLERIDNUM})
exten => s-NOANSWER,3,Congestion

exten => _s-.,1,Congestion
exten => _s-.,2,Macro(hangupcall)