Author Topic: Agent extensions being set as phone number  (Read 7887 times)

jhfitness

  • Newbie
  • *
  • Posts: 26
  • Karma: 1
    • View Profile
    • Buy Treadmill Parts
Agent extensions being set as phone number
« on: May 06, 2013, 21:35:49 »
Hello we have upgraded Asterisk to 11.3.0 and I'm having a minor issue with outbound calls... They are being imported into queuemetrics correctly but the agent field, instead of storing as "Agent/123" previously (where 123 was the employee's extension), they are all storing as "Agent/636xxxxxxx" where (xxxxxxx is our business phone number). Do we need to change what the QDIALER_AGENT is set to in [queuedial]?

Code: [Select]
exten => _XXX.,1,Set(QDIALER_QUEUE=q-340)
exten => _XXX.,n,Set(QDIALER_NUMBER=${EXTEN:1})
exten => _XXX.,n,Set(QDIALER_AGENT=Agent/${CALLERID(num)})
exten => _XXX.,n,Set(QDIALER_CHANNEL=SIP/VP-SIPSJC/+1${QDIALER_NUMBER})
exten => _XXX.,n,Set(QueueName=${QDIALER_QUEUE})
exten => _XXX.,n,MixMonitor(Q-${QDIALER_QUEUE}-${UNIQUEID}.WAV,b,)
exten => _XXX.,n,Goto(qm-queuedial,s,1)

[qm-queuedial]
; We use a global variable to pass values back from the answer-detect macro.
; STATUS = U unanswered
;        = A answered    (plus CAUSECOMPLETE=C when callee hung up)
; The 'g' dial parameter must be used in order to track callee disconnecting.
; Note that we'll be using the 'h' hook in any case to do the logging when channels go down.
; We set the CDR(accountcode) for live monitoring by QM.
;
exten => s,1,NoOp()
exten => s,n,Set(CDR(accountcode)=QDIALAGI)
exten => s,n,Set(ST=${EPOCH})
exten => s,n,Set(GM=QDV-${QDIALER_AGENT})
exten => s,n,Set(GLOBAL(${GM})=U)
exten => s,n,Set(GLOBAL(${GM}ans)=0)
exten => s,n,Macro(queuelog,${ST},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},CALLOUTBOUND,,${QDIALER_NUMBER})
exten => s,n,Set(CALLERID(all)=<636xxxxxxx>)
exten => s,n,Dial(${QDIALER_CHANNEL},300,gM(queuedial-answer^${UNIQUEID}^${GM}^${QDIALER_QUEUE}^${QDIALER_AGENT}^${ST}))
exten => s,n,Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)})
« Last Edit: May 06, 2013, 21:40:38 by jhfitness »

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Agent extensions being set as phone number
« Reply #1 on: May 08, 2013, 09:25:19 »
You can get the currently logged on agent from the variable ${QM_LOGIN}

jhfitness

  • Newbie
  • *
  • Posts: 26
  • Karma: 1
    • View Profile
    • Buy Treadmill Parts
Re: Agent extensions being set as phone number
« Reply #2 on: May 08, 2013, 20:08:00 »
That did not work, we don't have agents logged into QM while they are making calls... the queue logs from asterisk just get imported into QM. However, after looking at the 'full' asterisk logs I got it to work using ${FROMEXTEN} .... it looks like CALLERID gets set with the Agent extension but then gets set again with the business number for the outbound call before the queuedial lines try to reference it. Not sure if this is something new in this version or if we configured something different/incorrectly, but I saw that the FROMEXTEN variable was also getting set with the agent number, so I tried that and got it to store correctly.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Agent extensions being set as phone number
« Reply #3 on: May 13, 2013, 12:32:27 »
+1 :-)