Author Topic: [Queuemetrics] Dialplan context problem  (Read 4833 times)

Sandhawk

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
[Queuemetrics] Dialplan context problem
« on: January 25, 2011, 23:29:02 »
Hey everyone,

Im currently stuck trying to enable call outcomes on my asterisk/queuemetrics setup.

I have Asterisk/FreePBX running on serverA, and queuemetrics/mysql running on serverB. Everything is working great, except now we would like to start using call outcomes. I have included extensions_queuemetrics.conf to my extensions_custom.conf and have verified it has loaded, however when I try dialing "12" for example, the call cannot be completed. However if I paste the following

Code: [Select]
; extension 12: set call status code
exten => 12,1,Answer
exten => 12,2,NoOp( "QM: Setting call status '${CALLSTATUS}' on call '${CALLID}' for agent '${AGENTCODE}' made by '${QM_LOGIN}'" )
exten => 12,3,System( echo "${EPOCH}|${CALLID}|NONE|Agent/${AGENTCODE}|CALLSTATUS|${CALLSTATUS}" >> /var/log/asterisk/queue_log )
exten => 12,4,Hangup

into extensions_custom.conf without the [queuemetrics] context, the call completes and shows this in the asterisk cli:

Code: [Select]
    -- Executing [12@from-internal:1] Answer("SIP/536-0000370e", "") in new stack
    -- Executing [12@from-internal:2] NoOp("SIP/536-0000370e", " "QM: Setting call status '' on call '' for agent '' made by ''" ") in new stack
    -- Executing [12@from-internal:3] System("SIP/536-0000370e", " echo "1295994407||NONE|Agent/|CALLSTATUS|" >> /var/log/asterisk/queue_log ") in new stack
    -- Executing [12@from-internal:4] Hangup("SIP/536-0000370e", "") in new stack
  == Spawn extension (from-internal, 12, 4) exited non-zero on 'SIP/536-0000370e'
    -- Executing [h@from-internal:1] Macro("SIP/536-0000370e", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/536-0000370e", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,4)
    -- Executing [s@macro-hangupcall:4] GotoIf("SIP/536-0000370e", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] GotoIf("SIP/536-0000370e", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] Hangup("SIP/536-0000370e", "") in new stack
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/536-0000370e' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/536-0000370e'

And this is entered into the queue_log
Code: [Select]
1295994407||NONE|Agent/|CALLSTATUS|

Any help would be great!

Thanks!

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: [Queuemetrics] Dialplan context problem
« Reply #1 on: January 26, 2011, 09:43:59 »
That piece of dialplan is not meant to be called "by hand" - it will be called by QM through an AMI connection. You need to set up the AMI connection between the two boxes.


Sandhawk

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: [Queuemetrics] Dialplan context problem
« Reply #2 on: January 26, 2011, 22:36:01 »
That piece of dialplan is not meant to be called "by hand" - it will be called by QM through an AMI connection. You need to set up the AMI connection between the two boxes.



I believe I have done this, when I run the AMI test on the dbtest page I get an OK on everything, am I missing a step?

AMI URL: tcp:***:***@x.x.x.x:5038
callfile.agentremovemember_ht is OK
     callfile.agentaddmember_ht is OK
     callfile.agentlogoff is OK
     callfile.agentlogin is OK
     Skipping check for $EM@from-internal
     callfile.monitoring is OK
     Skipping check for $EM@from-internal
     callfile.customdial is OK
     callfile.agentunpause_ht is OK
     Skipping check for $EM@from-internal
     callfile.outmonitoring is OK
     callfile.agentunpause is OK
     callfile.agentpause_ht is OK
     callfile.calloutcome is OK
     callfile.agentaddmember is OK
     callfile.agentremovemember is OK
     callfile.agentpause is OK
OK    Asterisk dialog was OK
     AMI Dialog took 9334 ms

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: [Queuemetrics] Dialplan context problem
« Reply #3 on: January 27, 2011, 09:15:10 »
Try and take a trace when you set an outcome through the Agent's page.

Sandhawk

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: [Queuemetrics] Dialplan context problem
« Reply #4 on: January 27, 2011, 20:18:01 »
I see what the problem is, I misunderstood this feature, it works as intended

Thanks!

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: [Queuemetrics] Dialplan context problem
« Reply #5 on: January 28, 2011, 09:36:28 »
OK nice.  ;)