[Asterisk-code-review] Basic PBX: Add Queues. (...asterisk[16])

cmaj asteriskteam at digium.com
Tue Sep 24 12:40:45 CDT 2019


cmaj has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/12951


Change subject: Basic PBX: Add Queues.
......................................................................

Basic PBX: Add Queues.

The current Super Awesome Company configurations reference some queues from
the IVR but do not implement them. This patch fixes that with two new Queues,
a new Queue Rule, and pertinent Dial Plan. Also both of the new Queues --
Sales and Customer Experience -- are a RINGALL strategy, using penalty
modification over time to include the Department Director phone in calls
that are not answered by Staff members within twenty seconds.

ASTERISK-28554

Change-Id: I11554be5b99a6b87139f041ec3358c59572a972f
---
M configs/basic-pbx/extensions.conf
A configs/basic-pbx/queuerules.conf
A configs/basic-pbx/queues.conf
3 files changed, 80 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/51/12951/1

diff --git a/configs/basic-pbx/extensions.conf b/configs/basic-pbx/extensions.conf
index e1da261..04d6ab9 100644
--- a/configs/basic-pbx/extensions.conf
+++ b/configs/basic-pbx/extensions.conf
@@ -35,6 +35,10 @@
 exten = 2565551234,1,Verbose(1, "User ${CALLERID(num)} dialed into remote voicemail.")
  same = n,VoiceMailMain(example)
  same = n,Hangup()
+; Extensions for Queues.
+exten = 2565551200,1,Goto(Dial-Queues,1200,1) ; sales queue
+exten = 2565551250,1,Goto(Dial-Queues,1250,1) ; customer experience queue
+
 
 [Dialing-Errors]
 ; Handle any extensions dialed internally that don't otherwise exist.
@@ -61,6 +65,7 @@
 include = Hints
 include = Features
 include = Dial-Users
+include = Dial-Queues
 include = Dialing-Errors
 
 ; Dial-Users handles calls to internal extensions.
@@ -92,6 +97,27 @@
 ; 'o' extension.
 exten = o,1,Goto(1111)
 
+; Dial-Queues handles calls to internal queues.
+; Calls coming into this context may be *external* or *internal* in origin.
+[Dial-Queues]
+exten = _12[05]0,1,Verbose(1, "User ${CALLERID(num)} dialed ${EXTEN}.")
+ same = n,Answer()
+ same = n,Playback(thank-you-for-calling)
+ same = n,Set(QUEUE_MIN_PENALTY=0)
+ same = n,Set(QUEUE_MAX_PENALTY=0)
+ same = n,Set(QUEUE_RAISE_PENALTY=0)
+exten = 1200,n,Queue(salesq,iI,,,120)
+exten = 1250,s,Queue(customerxpq,iI,,,120)
+exten = _12[05]0,n,GotoIf($["${ABANDONED}"!="TRUE"]?done)
+ same = n,Set(members=${FILTER(0123456789\,,${QUEUE_MEMBER_LIST(${QUEUENAME})})})
+ same = n,While($["${SET(member=${SHIFT(members)})}" != ""])
+ same = n,Set(PUSH(vmboxes,&)=${member}@example)
+ same = n,EndWhile
+ same = n,GotoIf($[${LEN(${vmboxes})} = 0]?done)
+ same = n,Playback(were-sorry&vm-nobodyavail&pls-lv-msg-will-contact)
+ same = n,Voicemail(${vmboxes},s) ; if no answer, voicemail blast all queue members
+ same = n(done),Hangup()
+
 ; Outbound-Dial
 ;
 ; Before we dial, see if the extension matches our restricted number patterns.
diff --git a/configs/basic-pbx/queuerules.conf b/configs/basic-pbx/queuerules.conf
new file mode 100644
index 0000000..d69d041
--- /dev/null
+++ b/configs/basic-pbx/queuerules.conf
@@ -0,0 +1,7 @@
+; Queue Rules recipe contributed in 2019 by Chris Maj at Penguin PBX Solutions
+
+[general]
+
+; After 15 seconds, increment QUEUE_MAX_PENALTY and QUEUE_RAISE_PENALTY.
+[ring_more_rule]
+penaltychange => 15,+1,,+1
diff --git a/configs/basic-pbx/queues.conf b/configs/basic-pbx/queues.conf
new file mode 100644
index 0000000..fdcd0bf
--- /dev/null
+++ b/configs/basic-pbx/queues.conf
@@ -0,0 +1,47 @@
+; Queue recipe contributed in 2019 by Chris Maj at Penguin PBX Solutions
+
+[general]
+
+; When a caller enters a queue, the staff members in that department
+; with penalty=0 will ring for 16 seconds. If nobody answers, then
+; after a 4 second pause, the staff members AND the department
+; director (with penalty=1) will ring for 16 seconds. This will then
+; repeatedly ring all three members for as long as the caller is
+; waiting in the queue (timeout specified in call to Queue() app.)
+
+[genericq](!)
+strategy = ringall
+timeout = 16
+retry = 4
+
+; Statistics.
+servicelevel = 20
+
+; Penalty change rule, as caller wait time increases.
+; See queuerules.conf file for the definition.
+defaultrule = ring_more_rule
+
+; Set some extra variables automatically.
+setinterfacevar = yes
+setqueueentryvar = yes
+setqueuevar = yes
+
+; Announcements.
+announce-to-first-user = yes
+announce-holdtime = once
+announce-position = limit
+announce-position-limit = 5
+announce-round-seconds = 10
+announce-frequency = 30
+
+; Sales queue inherits all the settings from generic queue.
+[salesq](genericq)
+member => PJSIP/1105,0,Garnet Claude
+member => PJSIP/1112,0,Franny Ocean
+member => PJSIP/1109,1,Terry Jules
+
+; Customer Experience queue inherits all the settings from generic queue.
+[customerxpq](genericq)
+member => PJSIP/1115,0,Dusty Williams
+member => PJSIP/1102,0,Tommie Briar
+member => PJSIP/1101,1,Maria Berny

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12951
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I11554be5b99a6b87139f041ec3358c59572a972f
Gerrit-Change-Number: 12951
Gerrit-PatchSet: 1
Gerrit-Owner: cmaj <chris at penguinpbx.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190924/3c280379/attachment.html>


More information about the asterisk-code-review mailing list