1 post / 0 new
JakeG's picture
Joined: 2015/04/23
Points: 0


I am in the process of trying to make a couple different versions of the queue timeout script to handle different tasks, ideally after the timeout I'd also like them to be able to go to a user extension, a huntlist, or forward to an outside number.

I've got the forward to an outside number working fine, as shown below. Basically just borrowed from tl-userexten-base. However, when I tried borrowing similarly from tl-goto-userextension and tl-huntlist I was unsuccessful.

Primarily I'm focused on trying to understand why replacing the last line of the script with:

exten => s,n,Goto(local-extensions${TL_DASH}${tenant},${ARG3},1)

and adjusting ARG3 appropriately does not work. If someone could point me in the right direction it would be greatly appreciated.

exten => s,1,Answer()
exten => s,n,Set(__RINGGROUP_TIMEOUT=60)
exten => s,n,Set(OPTIONS=itT)
exten => s,n,Set(HASH(Q)=${TL_QUEUE(${ARG1})})
exten => s,n(record_new),Set(NOW=${EPOCH})
exten => s,n,Set(DAY=${STRFTIME(${NOW},,%d)})
exten => s,n,Set(MONTH=${STRFTIME(${NOW},,%m)})
exten => s,n,Set(YEAR=${STRFTIME(${NOW},,%Y)})
exten => s,n,ExecIf($["${MIX_MONITOR_STATUS}" = "1"]?StopMixMonitor() )

exten => s,n,GoToIf($["${TL_NEW_RECORDING_MECHANISM}" != "1"]?skip_db)
exten => s,n,GoToIf($["${HASH(Q,monitor_format)}" = ""]?skip_db)

exten => s,n,Set(__MONITOR_FILENAME=queues/${ARG1}/${YEAR}/${MONTH}/${DAY}/queue-${ARG1}-${STRFTIME(,,%F-%H-%M-%S)}-${CALLERID(num)}${TL_DASH}${tenant}-${CALL_ID})
exten => s,n,Set(__FULL_NAME=${MONITOR_FILENAME}.${HASH(Q,monitor_format)})
exten => s,n,NoOp(result=${TL_RECORDING(${CALL_ID},${FULL_NAME},${RECORD_CALLER},${RECORD_CALLEE},queue,${TOUCH},${CALLERID(num)},${ARG1})})

exten => s,n(skip_db),ExecIf($["${TL_NEW_RECORDING_MECHANISM}" != "1"]?Set(__MONITOR_FILENAME=queue-${ARG1}-${STRFTIME(,,%F-%H-%M-%S)}-${CALLERID(num)}${TL_DASH}${tenant}))
exten => s,n,Set(CDR(recording)=${FULL_NAME}))
exten => s,n,Set(CALLERID(name)=${ARG5})
exten => s,n,Queue(${ARG1},${ARG4},,,${ARG2})
exten => s,n,Dial(Local/${ARG3}@from-inside${TL_DASH}${tenant},${TIMEOUT},${OPTIONS}${SCREEN_FORWARD_OPTIONS})