Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - peterbokune

Pages: [1]
1

I need to re-factor this.  I never give inbound callers to the ability to get to voicemail.

Perhaps I'll make a new qm-queuedial context to pass the calls to which use the existing FreePBX framework for passing the calls.



If you have problems with INBOUND, you should use simple queues, as their logging is already correct. The script is used for outbound,.




This would imply then one queue for every employee that would be tracked.  In rough numbers, this would be about 50 more queues added.  Yes, this is probably the best solution. It adds clutter to the FreePBX config but the QueueMetrics config isn't cosmetically different (it won't increase menus, etc).  I'll go that way next.

2
Can you help me understand what you're doing in qm-queuedialer please?

I can trap the DIALSTATUS for the direct inbound calls in a context called: ext-local-custom

Given this I'm reconsidering moving to this code.  Does it make sense?

Code: [Select]
[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-queue)
exten => _X.,n,Set(QDIALER_CHANNEL=SIP/${user})

exten => _X.,n,NoOp(Track Call?  ${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,Set(CDR(accountcode)=QDIALAGI)
exten => _X.,n,Set(ST=${EPOCH})
exten => _X.,n,Set(GM=QDV-${QDIALER_AGENT})
exten => _X.,n,Set(GLOBAL(${GM})=U)
exten => _X.,n,Set(GLOBAL(${GM}ans)=0)
exten => _X.,n,Macro(queuelog,${ST},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},CALLOUTBOUND,,${QDIALER_NUMBER})

exten => _X.,n(noqueue),Goto(ext-did,${EXTEN},1)


[ext-local-custom]
; Trapping call termination here
exten => h,1,Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)})
exten => h,n,NoOp( "Call exiting: status ${GLOBAL(${GM})} answered at: ${GLOBAL(${GM}ans)} DS: ${DIALSTATUS}"  )
exten => h,n,Goto(case-${GLOBAL(${GM})})
exten => h,n,Hangup()

; Call unanswered
exten => h,n(case-U),Set(WT=$[${EPOCH} - ${ST}])
exten => h,n,Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},ABANDON,1,1,${WT})
exten => h,n,Hangup()

; call answered: agent/callee hung
exten => h,n(case-A)i,Set(COMPLETE=${IF($["${CAUSECOMPLETE}" = "C"]?COMPLETECALLER:COMPLETEAGENT)})
exten => h,n,Set(WT=$[${GLOBAL(${GM}ans)} - ${ST}])
exten => h,n,Set(CT=$[${EPOCH} - ${GLOBAL(${GM}ans)}])
exten => h,n,Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},${COMPLETE},${WT},${CT})
exten => h,n,Hangup()

; Call not tracked
exten => h,n(case-),NoOp(here)
exten => h,n,Hangup()

The problem with this is that it doesn't get called when connected and terminated. 

Maybe the "cook the CDR" approach is better...

3

I need to re-factor this.  I never give inbound callers to the ability to get to voicemail.

Perhaps I'll make a new qm-queuedial context to pass the calls to which use the existing FreePBX framework for passing the calls.


4
Outbound and QueueMetrics / Re: More 1.6 integration issues
« on: August 06, 2010, 07:20:20 »
I missed the step of adding the agents as members to the queues in QueueMetrics.  This explains why our reporting failed to show active agents.

Issues here are resolved and happy!

Thanks!

5
Today will be the first day with this config.  I figured out my rewriteLocal issue -- I hadn't updated the queues to have the agents with the Agents/xxxx members.  I did the change and looked at the historical reports and it all looked good and right.  Even the Local/xxxx@from-inside got rewritten as you suggested.

The code above has been updated to reflect my current configuration.

6
With my code above, the agents are logged as Local/xxxx@from-internal and therefore don't match agents.

Given my trouble getting the ability to use Agent/xxxx instead of Local/xxxx@from-queue I might have some other configuration problems that contributes to this.

Hmmm....

7
I got to doodling something like this [mildly tested] as I'm using it with FreePBX:

Code: [Select]
[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)


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

8
Historical reporting is sufficient.  I'm not using asterisk real-time, but I'm now curious what you're thinking... <grin>

9
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!

10
Outbound and QueueMetrics / Re: More 1.6 integration issues
« on: July 30, 2010, 14:50:24 »
The logging on/off works perfectly.  Statuses update right away.

As for the agent definitions I didn't have such luck.

default.rewriteLocalChannels=true

I also defined the agents in QM as  Agent/XXXX and restarted.    Nothing showed up even though agents were logged in.  I reverted the changes and everything came back for me.

The definitions for the agents are Local/XXXX@from-queue which is clearly different than the Local/XXXX@ext as you note in the example so I assumed you were parsing out the XXXX and using that for the agent, but not so.

I can keep our agents defined as Local/XXXX@from-queue as that appears to be a cosmetic difference from Agent/XXXX. 

Or am I missing something?

11
Outbound and QueueMetrics / More 1.6 integration issues
« on: July 28, 2010, 18:55:49 »
Greetings,

We're using the queueDial.agi script with some success presently for outbound queues.  When we moved to 1.6 we kept the agi script because it seemed to work and there were enough other other variables changing.  I'm looking to correct this now.

First issue:  Local/xxxx@ext vs. Agent/xxxx

I understand I can change the property to rewrite the entries with:
Code: [Select]
# Rewrites Local/XXX@ext channels in the format Agent/XXX
default.rewriteLocalChannels=true
Do I need to do anything to the legacy entries in the database when I make this change (and restart queuemetrics)? Obviously I have to update each agent's configuration, but we really don't want to lose their data with this change.

Second issue:  ADDMEMBER/REMOVEMEMBER vs. Asterisk

Presently most agents log into multiple queues depending on which skillset they're supporting plus the overflow queues.  The agents log to each queue in via a GUI app on their phone (Aastra) which updates ASTDB.  We also have agents who are static members of other queues.  Is there a problem with agents continuing using this interface?

Thanks!

Configuration:
asterisk 1.6.2.7
freepbx 2.7 (could update to 2.8, if it matters)
aastra xml 2.3.0
queuemetrics 1.6.0.3 (installed on separate system than PBX, if it matters)

Pages: [1]