Pauses no longer reported correctly after FreePBX updates

We use this script to log call center agents into their queues:

[macro-call-center-agent-login]
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL,)
exten => s,n,Set(CALLBACKNUM=${AMPUSER})
exten => s,n,AddQueueMember(12000,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(12001,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(12500,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14000,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14001,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14100,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14101,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14200,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14201,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14400,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14401,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14402,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14403,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(14500,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13000,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13001,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13100,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13101,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13200,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13201,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13400,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13401,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13402,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13403,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(13500,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(204,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,System( echo “${EPOCH}|${UNIQUEID}|NONE|Agent/${CALLBASCKNUM}|AGENTLOGIN|-” >> /var/log/asterisk/queue_log )
exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loginok&with&extension)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Macro(user-callerid,)
exten => s,n,dbDel(DND/${AMPUSER})
exten => s,n,Set(STATE=NOT_INUSE)
exten => s,n,Gosub(app-dnd-off,sstate,1)
exten => s,n(hook_1),Playback(do-not-disturb&de-activated)
exten => s,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVSTATE(Custom:DND${AMPUSER})=${STATE})
exten => sstate,n,Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)})
exten => sstate,n,GotoIf($["${DEVICES}" = “” ]?return)
exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
exten => sstate,n,Set(ITER=1)
exten => sstate,n(begin),Set(DEVSTATE(Custom:DEVDND${CUT(DEVICES,&,${ITER})})=${STATE})
exten => sstate,n,Set(ITER=$[${ITER} + 1])
exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin)
exten => sstate,n(return),Return()

; end of [macro-call-center-agent-login]

As of a couple of updates ago, the system now reports multiple members for a single extension:

[[email protected] ~]# asterisk -rx “queue show” | grep 3007
Local/[email protected]/n (dynamic) (In use) has taken no calls yet
Mike Von Bank (Local/[email protected]/n) (In use) has taken no calls yet
Local/[email protected]/n (dynamic) (In use) has taken no calls yet

Did something change in FreePBX to start using membernames? The problem is that whatever data is used by AsterNIC Stats Pro can’t/doesn’t use whatever is being generated by FreePBX correctly-- at least that’s what I think.

Here is the “pause” macro I am using:

[macro-agent-pause]

exten => s,1,Answer
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL,)
exten => s,n,Set(CALLBACKNUM=${AMPUSER})
exten => s,n,PauseQueueMember(|Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,System( echo “${EPOCH}|${UNIQUEID}|NONE|Agent/${CALLBACKNUM}|AGENTPAUSED|-” >> /var/log/asterisk/queue_log )
exten => s,n,UserEvent(RefreshQueue)
exten => s,n,Wait(1)
exten => s,n,Playback(extension)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Playback(dictate/paused)
exten => s,n,Macro(user-callerid,)
exten => s,n,Set(DB(DND/${AMPUSER})=YES)
exten => s,n,Set(STATE=BUSY)
exten => s,n,Gosub(app-dnd-on,sstate,1)
exten => s,n(hook_1),Playback(do-not-disturb&activated)
exten => s,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVSTATE(Custom:DND${AMPUSER})=${STATE})
exten => sstate,n,Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)})
exten => sstate,n,GotoIf($["${DEVICES}" = “” ]?return)
exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
exten => sstate,n,Set(ITER=1)
exten => sstate,n(begin),Set(DEVSTATE(Custom:DEVDND${CUT(DEVICES,&,${ITER})})=${STATE})
exten => sstate,n,Set(ITER=$[${ITER} + 1])
exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin)
exten => sstate,n(return),Return()

; end of [macro-agent-pause]

Any ideas?

Agent/${CALLBASCKNUM} looks like a typo… I realize its in the echo () to the queue_log to fake out the log analyzer… but you report that your analyzer is messing up…

Mike Von Bank looks like it has not been added by your dynamic login routine [it shows as in the from-queue context which to me suggests this is a static queue member and with the freePBX use of hints now in its latest version, it would show up here by the hint i.e. the name]

Finally, “queue show” brings back the view of ALL queues, so queue show | grep 3007 is for sure going to show up with multiple instances of the same extension. Surely you need "queue show " | grep 3007 to demonstrate that 3007 has been put into a queue more than once.

maybe some of this will help