Author Topic: Quemeterics not recognising remote caller hangup  (Read 35763 times)

ericf

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #15 on: October 17, 2007, 15:57:47 »
I am experiencing the same issue with the basic settings as described in the documentation. I am using Queuemetrics 1.4.1 and Trixbox 2.2 with Asterisk 1.2.22-1

Here is the code from extensions_custom.conf:

[queuedial]
exten => _XXX.,1,SetVar(MY_QUE=${EXTEN:0:3})
exten => _XXX.,2,SetVar(MY_NUM=${EXTEN:3})
exten => _XXX.,3,SetVar(MY_AGENT=${CALLERIDNUM})
exten => _XXX.,4,NoOp,Ag: ${MY_AGENT} N: ${MY_NUM} Q: ${MY_QUE}
exten => _XXX.,5,NoOp,MixMonitor(Q-${MY_QUE}-${UNIQUEID}.wav|b|)
exten => _XXX.,6,DeadAGI(queueDial.agi|${MY_NUM}|Zap/g0/${MY_NUM}|q-${MY_QUE}|Agent/${MY_AGENT})
exten => _XXX.,7,Congestion

Here is the output from agi-log.txt:

*QueueDial ---- 8841575- Zap/g0/8841575----Tue Oct 16 17:17:08 2007
*Dial Num: '8841575' Chan: 'Zap/g0/8841575' on Queue: 'q-100' Agent: 'Agent/2181'
*SetVar: 'QDIALER_NUMBER' = '8841575' - 200 result=1

*SetVar: 'QDIALER_CHANNEL' = 'Zap/g0/8841575' - 200 result=1

*SetVar: 'QDIALER_QUEUE' = 'q-100' - 200 result=1

*SetVar: 'QueueName' = 'q-100' - 200 result=1

*SetVar: 'QDIALER_AGENT' = 'Agent/2181' - 200 result=1

That's all I ever get. It doesn't matter which side hangs up.

My trunk is configured with this dial string: Local/$OUTNUM$@queuedial

I don't know what I may have not setup correctly but it seems like it should be pretty simple.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Quemeterics not recognising remote caller hangup
« Reply #16 on: October 17, 2007, 20:40:16 »
This is strange, as the queuedail.agi was developed for 1.2. You're calling it through DeadAGI, correct?

ericf

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #17 on: October 17, 2007, 20:41:42 »
Yes. Basically cut and pasted the queuedial dialplan from the PDF.

kcmon

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #18 on: November 03, 2007, 22:41:39 »
I am also experiencing mostly the same issue.  When we use our outbound queue and the remote party hangs up, everything gets logged correctly.  When the agent hangs up, the call never gets terminated from QM.

Here are the details.

Running Trixbox 1.1.1 and Asterisk 1.2.22

extensions_custom.conf is setup exactly as ericf has it set up.

Here is my agi-log.txt on a call where the user hangs up.

*QueueDial ---- 503*******- Zap/g4/503*******----Sat Nov  3 13:21:23 2007
*Dial Num: '503*******' Chan: 'Zap/g4/503*******' on Queue: 'q-603' Agent: 'Agent/118'*Cmd: EXEC dial "Zap/g4/503*******||g"

*  A: 200 result=0


*GetVar: 'ANSWEREDTIME' = '43'
*GetVar: 'DIALSTATUS' = 'ANSWER'
*GetVar: 'ANSWEREDTIME' = '43'
*Hangup: '0' AT: '43' DS: 'ANSWER'
*1194121290 - 1194121333 - COMPLETECALLER - 7 - 43
*Terminating

Here is my agi-log.txt where the agent hangs up.

*QueueDial ---- 503*******- Zap/g4/503*******----Sat Nov  3 13:48:55 2007
*Dial Num: '503*******' Chan: 'Zap/g4/503*******' on Queue: 'q-603' Agent: 'Agent/118'*SetVar: 'QDIALER_NUMBER' = '503*******' - 200 result=1

*SetVar: 'QDIALER_CHANNEL' = 'Zap/g4/503*******' - 200 result=1

*SetVar: 'QDIALER_QUEUE' = 'q-603' - 200 result=1

*SetVar: 'QueueName' = 'q-603' - 200 result=1

*SetVar: 'QDIALER_AGENT' = 'Agent/118' - 200 result=1

Any help that you can give me in this matter would be great,

Thanks,

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Quemeterics not recognising remote caller hangup
« Reply #19 on: November 04, 2007, 10:19:00 »
We are investigating on this issue - bug #229.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Quemeterics not recognising remote caller hangup
« Reply #20 on: November 04, 2007, 10:36:56 »
Does thei happens whenever the agent hangs up, or only when the agent hangs up while not in conversation or while the agents hangs up while in conversation?
I am trying to replicate this behaviour on both * 1.2 and 1.4 we have here in the lab and I am not having success...

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Quemeterics not recognising remote caller hangup
« Reply #21 on: November 04, 2007, 13:27:25 »
If anybody is using * 1.4, try the following:

Quote
A locally executed AGI script will receive SIGHUP on hangup from the channel except when using DeadAGI. This can be disabled by setting the AGISIGHUP channel variable to "no" before executing the AGI application.

And see if the application behaves correctly. If you're running 1.2, this cannot be done. I believe the cause of this problem is the script receiving HANGUPs.


kcmon

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #22 on: November 05, 2007, 21:59:22 »
I am not quite understanding what you mean "while in conversation" or "while not in conversation"  It boils down to who hangs up first.  If the agent hangs up first, the call is not terminated correctly in queuemetrics.  If the customer hangs up first, the call is terminated correctly.  Currently, we have been telling our agents to allow the customer to hang up so that the numbers look correct.

As to the script getting SIGHUP, I believe this may be the case.  Since I am running Asterisk 1.2, I can't use the AGISIGHUP variable.  What harm would occur if I ignore the SIGHUP in the AGI script itself.  Will this work?

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Quemeterics not recognising remote caller hangup
« Reply #23 on: November 07, 2007, 13:27:35 »
I suggest you track the h extension and write a fake entry, though the actual talk time will be mistracked.

kcmon

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #24 on: November 07, 2007, 21:41:54 »
Thanks for the tip.  I am now tracking the h extension and this issue seems to be fixed.

derrickhix

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #25 on: January 31, 2008, 03:22:12 »
Hi guys,
Sorry to drag up such and old post, but I am also having this issue.

I am running TrixBox with * ver 1.2.23.

If the person called hangs up, the queue_log gets written to fine, If my agents initiate the hangup queue_log does not get updated with the hangup info so it appears that the call goes on forever...


here is a snippet of my agi-log.txt file from when an agent hangs up, like others who have posted it does not appear to be a complete log. *Dialed number edited*

*QueueDial ---- 4253****- ZAP/g0/4253****----Wed Jan 30 16:00:51 2008
*Dial Num: '4253677415' Chan: 'ZAP/g0/4253677415' on Queue: 'q-101' Agent: 'Agent/208'
*SetVar: 'QDIALER_NUMBER' = '4253****' - 200 result=1

*SetVar: 'QDIALER_CHANNEL' = 'ZAP/g0/4253****' - 200 result=1

*SetVar: 'QDIALER_QUEUE' = 'q-101' - 200 result=1

*SetVar: 'QueueName' = 'q-101' - 200 result=1

*SetVar: 'QDIALER_AGENT' = 'Agent/208' - 200 result=1

It seems that the previous poster was able to get around this issue by "tracking the h extension".

I do not understand this statement, could somebody point me in the right direction with what tracking an extension refers too?

kcmon

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #26 on: January 31, 2008, 19:56:14 »
Derrickhix

Here was my final solution to this problem.

[custom-outbound-queue]
exten => s,1,NoOp,Ag: ${MY_AGENT} N: ${MY_NUM} Q: ${MY_QUE}
exten => s,2,Macro(outbound-callerid,1)
exten => s,3,MixMonitor(Q-${MY_QUE}-${UNIQUEID}.wav|b|)
exten => s,4,DeadAGI(queueDial.agi|${MY_NUM}|Zap/g4/${MY_NUM}|q-${MY_QUE}|Agent/${MY_AGENT})
exten => s,5,Congestion
exten => h,1,System( echo "${EPOCH}|${UNIQUEID}|${QUEUENAME}|${AGENT}|COMPLETECALLER|0|${ANSWEREDTIME}" >> /var/log/asterisk/queue_log )
exten => h,2,NoOp,Epoch: ${EPOCH} UniqueID: ${UNIQUEID} QueueName: ${QUEUENAME} Agent: ${AGENT} AnsweredTime: ${ANSWEREDTIME}"
exten => h,3,Macro(hangupcall)

With it being so long ago, I am not sure if this was the only change that I made.  Give it a go and see if it works for you.

pat2man

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
    • Email
Re: Quemeterics not recognising remote caller hangup
« Reply #27 on: April 01, 2008, 19:48:23 »
If anybody is using * 1.4, try the following:

Quote
A locally executed AGI script will receive SIGHUP on hangup from the channel except when using DeadAGI. This can be disabled by setting the AGISIGHUP channel variable to "no" before executing the AGI application.

And see if the application behaves correctly. If you're running 1.2, this cannot be done. I believe the cause of this problem is the script receiving HANGUPs.



I am using 1.4.17 and I am getting the same error. Here is my outbound section of extensions.conf:

Code: [Select]
exten => _NXXNXXXXXX,1,noop(2)
exten => _NXXNXXXXXX,n,Set(AGENT="Agent/1${CALLERID(num)}")
exten => _NXXNXXXXXX,n,Set(CALLERID(num)="5555555555")
exten => _NXXNXXXXXX,n,Set(CALLERID(name)="Intercorp")
exten => _NXXNXXXXXX,n,GotoIf($["${CDR(ACCOUNTCODE)}" = "service"]?outbound,${EXTEN},101)
exten => _NXXNXXXXXX,n,Dial(ZAP/G1/${EXTEN},60,t)
exten => _NXXNXXXXXX,n,Hangup
exten => _NXXNXXXXXX,101,Set(AGISIGHUP=no)
exten => _NXXNXXXXXX,n,AGI(queueDial.agi|${EXTEN}|ZAP/G1/${EXTEN}|service_outbound|${AGENT})
exten => _NXXNXXXXXX,n,Hangup                                     

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Quemeterics not recognising remote caller hangup
« Reply #28 on: April 04, 2008, 10:59:22 »
You should try with the 'h' trick.

kayodea

  • Newbie
  • *
  • Posts: 21
  • Karma: 0
    • View Profile
Re: Quemeterics not recognising remote caller hangup
« Reply #29 on: April 14, 2008, 01:41:18 »
Hi Guys,

I honestly don't know if this is the right place to post this, or I should start a new post with this, but I am having similar issue.

 I get "agent/CALLERID(num)" (i.e e.g agent/1000) shown as one of the logged on agent on the realtime screen after the call have been terminated. It seems that queuemetrics is logging on the agent after the call ended. I need to stop this, as the agents are already logged on, and only needs to do "pause" with a pause code so that calls can stop coming to them, and they can make calls and then unpause to start receiving calls again, when done with making calls.

How can I stop queuemetrics from logging them on as specified above after making calls?

I use Asterisk-1.4.18 and here is what I currently do in my queuedial context.

[queuedial]
exten => _XXX.,1,Set(MY_QUE=${EXTEN:0:3})
exten => _XXX.,n,Set(MY_NUM=${EXTEN:3})
exten => _XXX.,n,Set(MY_AGENT=${CALLERID(num)})
exten => _XXX.,n,NoOp,Ag: ${MY_AGENT} N: ${MY_NUM} Q: ${MY_QUE}
exten => _XXX.,n,MixMonitor(Q-${MY_QUE}-${UNIQUEID}.wav|b|)
exten => _XXX.,n,Set(AGISIGHUP=no)
exten=>_XXX.,n,AGI(queueDial.agi|${MY_NUM}|Zap/g0/${MY_NUM}|q-${MY_QUE}|Agent/${MY_AGENT})
exten => _XXX.,n,Congestion()
exten => h,1,Hangup()

Cheers to all.