QueueMetrics > QueueMetrics installation
Track inbound direct call (outside of an inbound queue)
peterbokune:
Hi,
I have a group of users, members in a queue, who will give out their direct number for callback. These direct inbound calls obviously don't appear in queue stats. Their manager would like their call activity to be recorded and reported.
Has this already been done and I just can't find the thread?
My initial thought was to add a queue and put his agents into the queue (9999) named Direct Inbound. In the dialplan [from-pstn-custom] I'd use the DID to determine the extension and look in QUEUE_MEMBER_LIST(9999). If the extension is logged into the queue, I'd setup the QDIALER_ vars and pass the call to qm-queuedial (like for outbound) to log and connect the call.
[Yes, a CDR report is probably a better solution for these calls, but then the manager has to use two systems and it really needs to be simple for him.]
FreePBX 2.7
QueueMetrics 1.6.0.3
Thoughts, ideas, pointers?
Thanks!
QueueMetrics:
Quick question: does this need to be done in real-time or just for historical reporting?
peterbokune:
Historical reporting is sufficient. I'm not using asterisk real-time, but I'm now curious what you're thinking... <grin>
peterbokune:
I got to doodling something like this [mildly tested] as I'm using it with FreePBX:
--- Code: ---[from-pstn-custom]
; ... your existing dialplan
; We use the last 4 digits of the DID as the user's extension (check for your install)
exten => _X.,n,Set(user=${EXTEN:-4:4})
; eg. user=1111
; Set InQ to be the queue you want to track for incoming queue
; comma separated -- quotes are essential!
exten => _X.,n,Set(InQueues="125,126")
exten => _X.,n,Set(IsInQueue=0)
exten => _X.,n,While(${EXISTS(${InQueues})})
exten => _X.,n,Set(InQ="${CUT(InQueues,\,,1)}")
exten => _X.,n,Set(InQueues="${CUT(InQueues,\,,2-)}")
exten => _X.,n,Set(QML="${QUEUE_MEMBER_LIST(${InQ})}")
exten => _X.,n,While(${EXISTS(${QML})}))
exten => _X.,n,Set(IsInQueue=${IF($[ ${CUT(CUT(QML,@,1),/,2)} = ${user}]?$[${IsInQueue}+1]:${IsInQueue})})
exten => _X.,n,GotoIf($[${IsInQueue}]?matched) ; track it, stop looking!
exten => _X.,n,Set(QML="${CUT(QML,\,,2-)}")
exten => _X.,n,EndWhile
exten => _X.,n,EndWhile
exten => _X.,n(matched),Set(QDIALER_NUMBER=${CALLERID(number)})
exten => _X.,n,Set(QDIALER_QUEUE=q-${InQ})
exten => _X.,n,Set(QDIALER_AGENT=Local/${user}@from-internal)
exten => _X.,n,Set(QDIALER_CHANNEL=SIP/${user})
exten => _X.,n,NoOp(Branch to qm-queuedial? ${IsInQueue})
exten => _X.,n,GotoIf($[${IsInQueue}]?queue:noqueue)
exten => _X.,n(queue),NoOp( "Inbound call - A:${QDIALER_AGENT} N:${QDIALER_NUMBER} Q:${QDIALER_QUEUE} Ch:${QDIALER_CHANNEL}" )
exten => _X.,n,Goto(qm-queuedial,s,1)
exten => _X.,n,Hangup()
exten => _X.,n(noqueue),NoOp(Normally handling call to: ${EXTEN})
exten => _X.,n,Goto(ext-did,${EXTEN},1)
--- End code ---
I'm not much of a dialplan hacker (thus my use of FreePBX). I'd like to try it but I'm still wildly open to "not invented here" solutions.
Other ideas?
Edit: Updated to latest tested, added multiple queue loop
QueueMetrics:
Yes that's what I was thinking about.
Otherwise - but it will take a few coding days - one could write a converter from CDR-CSV to the queue_log format and upload changes nightly to QM.
Navigation
[0] Message Index
[#] Next page
Go to full version