Queue gosub variables not changed

I have a problem with variables in queue. This is my configuration:

[all-busy]

exten => s,1,Set(__CID=${callerdid})

same => n,Set(SHOP=${shopname})

same => n,Set(__STIME=${STRFTIME(${EPOCH},,%Y%m%d_%H%M)})

same => n,Set(__START=${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)}))

same => n,Queue(holding,,,,,,,queueinfo)

exten => h,1,Set(OID=${CDR(dstchannel):4:12})

exten => h,n,GotoIf([ "{CDR(disposition)}" != “ANSWERED” ]?addskip:addcall)

same => n(addskip),Set(ODBC_MISSED()=${CID},${SHOP})

same => n(addcall),Set(ODBC_HOLDED()=${OID},${CID},${SHOP},${CDR(duration)},${CID}_${STIME}.wav, ${START})

[queueinfo]

exten => s,1,Verbose(2, {MEMBERINTERFACE} name {MEMBERNAME} caller ${MMCID})

exten => s,n,Set(FILE={CID}_{STIME}.wav)

exten => s,n,Set(START={STRFTIME({EPOCH},%Y-%m-%d %H:%M:%S)}))

exten => s,n,MixMonitor(/home/normar/server/records/${FILE})

exten => s,n,NoOp(start: ${CDR(billsec)})

exten => s,n,Return(${FILE})

Well, [all-busy] is configuration for managing call on hold. Variables CID, STIME and START are passed to gosub [queueinfo] but they are never changed in gosub. Specifically I need this variable START to be changed. When I use it on hangout, it has the same initial value.
Please help, as I haven’t found any suggestion about this problem anywhere

Prefixing a variable with _ doesn’t cause the variable to be shared; all it does is cause the value to be copied when the new channel is created. Shared variables ( https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_SHARED ) may be your solution, or you could use global variables or ASTDB.

Works with AstDB!
Thank you for all your help!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.