Overwrite Existing Dialplan Vitalpbx

Hi Dev Vitalpbx,

When I create queue from vitalpbx queue it will write to /etc/asterisk/vitalpbx/extensions__50-1-dialplan.conf file

Example Queue 401

/etc/asterisk/vitalpbx/extensions__50-1-dialplan.conf

[ext-queues]
exten => 401,1,NoOp(Queue: 401)
same => n,Set(__QUEUE_UID=${UNIQUEID})
same => n,Set(__QUEUE_CALL=TRUE)
same => n,Set(__SKIP_AA=TRUE)
same => n,Set(__FROM_QUEUE_ID=21)
same => n,Gosub(sub-set-moh,s,1(default,YES))
same => n,Set(__QUEUE_NUMBER=401)
same => n,Set(__QUEUE_NAME=Q401)
same => n,Gosub(sub-set-call-vars,app-incoming,1)
same => n(qconnect),NoOp(Connecting to Queue)
same => n,Set(ANSWER_CHANNEL=yes)
same => n,ExecIf($["${HIGH_PRIORITY}"="yes"]?Set(QUEUE_PRIO=${QUEUES_CALLBACK_PRIORITY}):)
same => n,ExecIf($[$["${SKIP_ANSWER}"="yes"]|$["${ANSWER_CHANNEL}"="no"]]?Progress():Answer())
same => n,NoCDR()
same => n,Queue(Q401,c,,,30)
same => n,ResetCDR(ve)
same => n,NoOp(Queue Status: ${QUEUESTATUS})
same => n,Set(__QUEUE_CALL=FALSE)
same => n,GotoIf($["${QUEUESTATUS}"="CONTINUE"]?app-termination,hangup,1)
same => n,Goto(app-termination,hangup,1)
same => n,Hangup()

exten => h,1,NoOp(Ending Queue Call)
same => n,Hangup()

I want to modify or add this line

same => n,Noop(CUSTOM WAIT 2 SECOND)
same => n,Wait(2)

[ext-queues]
exten => 401,1,NoOp(Queue: 401)
same => n,Set(__QUEUE_UID=${UNIQUEID})
same => n,Set(__QUEUE_CALL=TRUE)
same => n,Set(__SKIP_AA=TRUE)
same => n,Set(__FROM_QUEUE_ID=21)
same => n,Gosub(sub-set-moh,s,1(default,YES))
same => n,Set(__QUEUE_NUMBER=401)
same => n,Set(__QUEUE_NAME=Q401)
same => n,Gosub(sub-set-call-vars,app-incoming,1)
same => n(qconnect),NoOp(Connecting to Queue)
same => n,Set(ANSWER_CHANNEL=yes)
same => n,ExecIf($["${HIGH_PRIORITY}"="yes"]?Set(QUEUE_PRIO=${QUEUES_CALLBACK_PRIORITY}):)
same => n,ExecIf($[$["${SKIP_ANSWER}"="yes"]|$["${ANSWER_CHANNEL}"="no"]]?Progress():Answer())
same => n,NoCDR()


same => n,Noop(CUSTOM WAIT 2 SECOND)
same => n,Wait(2)

same => n,Queue(Q401,c,,,30)
same => n,ResetCDR(ve)
same => n,NoOp(Queue Status: ${QUEUESTATUS})
same => n,Set(__QUEUE_CALL=FALSE)
same => n,GotoIf($["${QUEUESTATUS}"="CONTINUE"]?app-termination,hangup,1)
same => n,Goto(app-termination,hangup,1)
same => n,Hangup()

exten => h,1,NoOp(Ending Queue Call)
same => n,Hangup()

What should I do so that vitalpbx reads the “ext-queues” dial plan I have changed?

If in freepbx, usually written in the file “extensions_custom.conf” or in “extensions_overwrite.conf” I want to know how the equation is in vitalpbx.

Thanks

Hi All,

Any update? is it possible using custom context?

Thanks

Yes, it is possible creating custom contexts. Nonetheless, you cannot modify the ones created by the PBX.

There is a trick but it’s at your own risk:
Call the new file:
extensions__49-1-dialplan.conf

Whatever file comes first will be used first.
No need for (+) then.

@miguel @mo10

i will try and report the result.

Thanks

TBH, I would rather send the call to a custom context which has the two second wait prior to going to the queue. By overwriting the queue config you are loosing the ability to update the queue in the GUI.

Hi @mo10

your idea it working well.

@miguel

please help how to do it if using custom context

@PitzKey
yes, i know that, its my risk.

Thanks

Hi Sir,

Can you share how to implementation ‘ext-queues’ using custom context?

if i using idea @mo10 , i only copy the ‘ext-queue’ to extensions__49-1-dialplan.conf then core reload, it working.

Thanks

Try something like this inside.
extensions__50-custom.conf
Pay attention on the right permissions of the file.

[ext-queues](+)
exten => 501,1,NoOp(Queue: 501)
same => n,Set(__QUEUE_UID=${UNIQUEID})
same => n,Set(__QUEUE_CALL=TRUE)
same => n,Set(__SKIP_AA=TRUE)
same => n,Set(__FROM_QUEUE_ID=21)
same => n,Gosub(sub-set-moh,s,1(default,YES))
same => n,Set(__QUEUE_NUMBER=401)
same => n,Set(__QUEUE_NAME=Q401)
same => n,Gosub(sub-set-call-vars,app-incoming,1)
same => n(qconnect),NoOp(Connecting to Queue)
same => n,Set(ANSWER_CHANNEL=yes)
same => n,ExecIf($["${HIGH_PRIORITY}"="yes"]?Set(QUEUE_PRIO=${QUEUES_CALLBACK_PRIORITY}):)
same => n,ExecIf($[$["${SKIP_ANSWER}"="yes"]|$["${ANSWER_CHANNEL}"="no"]]?Progress():Answer())
same => n,NoCDR()


same => n,Noop(CUSTOM WAIT 2 SECOND)
same => n,Wait(2)

same => n,Queue(Q401,c,,,30)
same => n,ResetCDR(ve)
same => n,NoOp(Queue Status: ${QUEUESTATUS})
same => n,Set(__QUEUE_CALL=FALSE)
same => n,GotoIf($["${QUEUESTATUS}"="CONTINUE"]?app-termination,hangup,1)
same => n,Goto(app-termination,hangup,1)
same => n,Hangup()

exten => h,1,NoOp(Ending Queue Call)
same => n,Hangup()

I Just change those two lines.
So it will be a different number that does not exist yet (501).
You need to change more like Q401 to Q501

[ext-queues](+)
exten => 501,1,NoOp(Queue: 501)

Or maybe:

[cos-all-custom](+)

instead of

[ext-queues](+)

No guaranty because i don’t know about those lines again:

exten => h,1,NoOp(Ending Queue Call)
same => n,Hangup()

It’s the same as the one you proposed yesterday
by creating a file “extensions__49-1-dialplan.conf”

When updating the config queue from the vitalpbx GUI it will not update the contents of the “extensions__49-1-dialplan.conf” file

But for me this is enough, because there won’t be frequent changes to Queue parameters, if it changes then I have to manually update in extensions__49-1-dialplan.conf

I’m just curious, can it be done from vitalpbx by using the “custom context” module.

instead of

[ext-queues](+)

try

[my-queue-1]

Then do it like they say here:

Not needed:

[cos-all-custom](+)

Like I mentioned, if you only need to add the 2 second wait, then you can do it through the custom context module, setting the Wait() prior to the queue.

Incoming Call → Custom Context → 2 Seconds Wait → Queue

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