CDR, change extension number

I try to use routing using variables, it works but now I get “s” instead of called number in CDR. How to set called number to ${OUTNUM} for this context only?

sip.conf:

[from_user]
exten=>_X.,1,NoOp
exten=>_X.,n,Set(OUTNUM=${EXTEN})
....
exten=>_X.,n,Goto(user_ext,s,1)

[user_ext]
exten=>s,1,NoOp
....
exten=>s,n,Dial(SIP/isp/${OUTNUM})

Use ${EXTEN} instead of s, in the GoTo and an appropriate pattern, in the context.

Thanks. I just don’t know that this is possible :smile:

Now i use “_X.” extension and REGEX routing like this:

exten=>_X.,n,GotoIf($[${REGEX("^99" ${EXTEN})}]?to_isp)
...
exten=>_X.,n,Hangup
exten=>_X.,n(to_isp),Dial(SIP/isp/${EXTEN})

Is this OK or bad?