Hello,
I would like to ask to allow customizing queue options in the dialplan, using a similar approach to what you guys currently have for allowing to use Custom Dynamic Features.
For context, you currently allow using the ${CUSTOM_DYNAMIC_FEATURES}
variable to allow adding additional Custom Dynamic Features, and this is how it looks in the dialplan
same => n,Set(__DYNAMIC_FEATURES=${IF($["${CUSTOM_DYNAMIC_FEATURES}" = ""]?custom-features:custom-features#${CUSTOM_DYNAMIC_FEATURES})})
We would love to see the same for Queues.
The Queue()
application allows you to pass multiple options, and sometimes we would love to customize it or allow it to be dynamic based on the caller ID or different criteria’s.
Here is the official Queue()
documentation from Asterisk: https://docs.asterisk.org/Asterisk_21_Documentation/API_Documentation/Dialplan_Applications/Queue/
Here is how the current queue dialplan looks like in VitalPBX:
[ext-queues]
exten => 801,1,NoOp(Queue: Test)
same => n,Set(__QUEUE_UID=${UNIQUEID})
same => n,Set(__QUEUE_CALL=TRUE)
same => n,Set(__SKIP_AA=TRUE)
same => n,Set(__FROM_QUEUE_ID=1)
same => n,Gosub(sub-set-moh,s,1(default,YES))
same => n,Set(__QUEUE_NUMBER=801)
same => n,Set(__QUEUE_NAME=Q801)
same => n,Set(__PBX_APP=QUEUE)
same => n,Set(__PBX_APP_DESC=Test)
same => n,Set(__FORCE_QUEUE_MOH=no)
same => n,Gosub(sub-set-call-vars,app-incoming,1)
same => n,GotoIf($["${SKIP_ANSWER}"="yes"]?after-join-announcement)
same => n,Playback(/var/lib/vitalpbx/static/005723981cce3f6c/recordings/c81e728d9d4c2f636f067f89cc14862c)
same => n(after-join-announcement),NoOp(Join announcement finished)
same => n(qconnect),NoOp(Connecting to Queue)
same => n,Set(ANSWER_CHANNEL=yes)
same => n,ExecIf($[$["${SKIP_ANSWER}"="yes"]|$["${ANSWER_CHANNEL}"="no"]]?Progress():Answer())
same => n,NoCDR()
same => n,Set(Q_RING_TIME=60)
same => n,ExecIf($["${DISABLE_QRT}"="yes"]?Set(Q_RING_TIME=):)
same => n,Queue(Q801,c,,,${Q_RING_TIME},,,,,${Q_FORCE_POSITION})
I would love to see it changed to something like this:
same => n,Gosub(sub-set-call-vars,app-incoming,1)
same => n,GotoIf($["${SKIP_ANSWER}"="yes"]?after-join-announcement)
;CHANGE
same => n,Playback(${IF($[${LEN(${CUSTOM_QJOIN_ANN})}>0]?)}${CUSTOM_QJOIN_ANN}:/var/lib/vitalpbx/static/005723981cce3f6c/recordings/c81e728d9d4c2f636f067f89cc14862c)
same => n(after-join-announcement),NoOp(Join announcement finished)
same => n(qconnect),NoOp(Connecting to Queue)
same => n,Set(ANSWER_CHANNEL=yes)
same => n,ExecIf($[$["${SKIP_ANSWER}"="yes"]|$["${ANSWER_CHANNEL}"="no"]]?Progress():Answer())
same => n,NoCDR()
;CHANGE
same => n,Set(Q_RING_TIME=${IF($[${LEN(${CUSTOM_Q_RING_TIME})}>0]?${CUSTOM_Q_RING_TIME}:60)})
same => n,Set(QOPTIONS=${IF($[${CUSTOM_QOPTIONS}>0]?${CUSTOM_QOPTIONS}:c)})
same => n,Set(Q_FORCE_POSITION=${IF($[${CUSTOM_QPOSITION}>0]?${CUSTOM_QPOSITION}:${Q_FORCE_POSITION})})
same => n,ExecIf($["${DISABLE_QRT}"="yes"]?Set(Q_RING_TIME=):)
;CHANGE
same => n,Queue(Q801,${QOPTIONS},${CUSTOM_QURL},${CUSTOM_QANN},${Q_RING_TIME},${CUSTOM_QAGI},${CUSTOM_QGOSUB},${CUSTOM_QRULE},${Q_FORCE_POSITION})
This will make the queues more dynamic and allow customizing even more without needing to override the dialplan files.
Thank you