Create a custom conf file /etc/asterisk/vitalpbx/extensions__90-custom.conf
Add the below:
[custom-pre-queue]
exten => s,1,Noop(Entering custom pre queue announcement context in extensions__90-custom.conf)
exten => s,n,ExecIf($["${QUEUE_MEMBER(Q100,logged)}"!="0"]?Playback(join-ann-audio))
exten => s,n,Goto(${ARG1},${ARG2},${ARG3})
Create a custom context:
Description: Q100 Pre Announcement
Context: custom-pre-queue
Extension: s
Priority: 1
Destination: Queues > 100
With that being said, you will need a new dialplan bloc for every queue. If/once VitalPBX decides to properly implement the custom context module to be able to make use of all GoSub features as mentioned here: Custom Context GoSub functionalities then you would be able to do something like this:
[custom-pre-queue]
exten => s,1,Noop(Entering custom pre queue announcement context for queue ${ARG1} in extensions__90-custom.conf)
exten => s,n,ExecIf($["${QUEUE_MEMBER(Q${ARG1},logged)}"!="0"]?Playback(${ARG2}))
exten => s,n,Return()