Author Topic: Tracking outbound calls from an inbound queue  (Read 4097 times)

iamjeff

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Tracking outbound calls from an inbound queue
« on: July 15, 2009, 17:04:56 »
Hi all,

we have a very basic configuration that we complicated with FreePBX.  We have setup a support queue (502) that our agents log into to receive calls.

I would like to track these agents and place the calls in the qm stats as outbound calls of queue 502.

From my dialplan, I am not seeing where the extensions_queuemetrics.conf would be called for an outbound call for these support agents:


    -- Executing [96132730204@queuewtc:1] Goto("SIP/204-02391360", "queuewtc_rulematch|96132730204|1") in new stack
    -- Goto (queuewtc_rulematch,96132730204,1)
    -- Executing [96132730204@queuewtc_rulematch:1] Macro("SIP/204-02391360", "user-callerid|SKIPTTL|") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/204-02391360", "AMPUSER=204") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/204-02391360", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/204-02391360", "1|Set|REALCALLERIDNUM=204") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/204-02391360", "AMPUSER=204") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/204-02391360", "AMPUSERCIDNAME=Andy Gibson") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/204-02391360", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/204-02391360", "AMPUSERCID=204") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/204-02391360", "CALLERID(all)="Andy Gibson" <204>") in new stack
    -- Executing [s@macro-user-callerid:9] Set("SIP/204-02391360", "REALCALLERIDNUM=204") in new stack
    -- Executing [s@macro-user-callerid:10] ExecIf("SIP/204-02391360", "0|Set|CHANNEL(language)=") in new stack
    -- Executing [s@macro-user-callerid:11] GotoIf("SIP/204-02391360", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,20)
    -- Executing [s@macro-user-callerid:20] NoOp("SIP/204-02391360", "Using CallerID "Andy Gibson" <204>") in new stack
    -- Executing [96132730204@queuewtc_rulematch:2] Set("SIP/204-02391360", "__ROUTENAME=9_outside") in new stack
    -- Executing [96132730204@queuewtc_rulematch:3] Set("SIP/204-02391360", "_NODEST=") in new stack
    -- Executing [96132730204@queuewtc_rulematch:4] Macro("SIP/204-02391360", "record-enable|204|OUT|") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/204-02391360", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] AGI("SIP/204-02391360", "recordingcheck|20090715-094745|1247665665.675") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20090715-094745|1247665665.675: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing [s@macro-record-enable:5] MacroExit("SIP/204-02391360", "") in new stack
    -- Executing [96132730204@queuewtc_rulematch:5] Macro("SIP/204-02391360", "dialout-trunk|2|6132730204||") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/204-02391360", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] AGI("SIP/204-02391360", "checkperms.agi") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/checkperms.agi
  checkperms.agi: Starting checkperms.agi
       >  checkperms.agi: SQL Debug: SELECT allowed,faildest FROM routepermissions WHERE exten='204' and routename='9_outside'
  ==  checkperms.agi: Access to route granted
    -- AGI Script checkperms.agi completed, returning 0
    -- Executing [s@macro-dialout-trunk:3] GosubIf("SIP/204-02391360", "0?sub-pincheck|s|1") in new stack
    -- Executing [s@macro-dialout-trunk:4] GotoIf("SIP/204-02391360", "0?disabletrunk|1") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/204-02391360", "DIAL_NUMBER=6132730204") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/204-02391360", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:7] Set("SIP/204-02391360", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:8] GotoIf("SIP/204-02391360", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,10)
    -- Executing [s@macro-dialout-trunk:10] GotoIf("SIP/204-02391360", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:11] Set("SIP/204-02391360", "DIAL_TRUNK_OPTIONS=T") in new stack
    -- Executing [s@macro-dialout-trunk:12] Macro("SIP/204-02391360", "outbound-callerid|2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/204-02391360", "0|SetCallerPres|") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/204-02391360", "0|Set|REALCALLERIDNUM=204") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/204-02391360", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/204-02391360", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/204-02391360", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/204-02391360", "TRUNKOUTCID=6135079994") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/204-02391360", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/204-02391360", "1|Set|CALLERID(all)=6135079994") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/204-02391360", "0|Set|CALLERID(all)=") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/204-02391360", "0|SetCallerPres|prohib_passed_screen") in new stack
    -- Executing [s@macro-dialout-trunk:13] ExecIf("SIP/204-02391360", "1|AGI|fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
       >  fixlocalprefix: Using pattern 9|NXXNXXXXXX
       >  fixlocalprefix: Using pattern 9|1NXXNXXXXXX
       >  fixlocalprefix: Using pattern 911
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/204-02391360", "OUTNUM=96132730204") in new stack
    -- Executing [s@macro-dialout-trunk:15] Set("SIP/204-02391360", "custom=SIP/Metaswitch") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("SIP/204-02391360", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)T") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("SIP/204-02391360", "dialout-trunk-predial-hook|") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/204-02391360", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/204-02391360", "0?bypass|1") in new stack
    -- Executing [s@macro-dialout-trunk:19] GotoIf("SIP/204-02391360", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:20] Dial("SIP/204-02391360", "SIP/Metaswitch/96132730204|300|T") in new stack
    -- Called Metaswitch/96132730204
    -- SIP/Metaswitch-02396570 is making progress passing it to SIP/204-02391360
    -- SIP/Metaswitch-02396570 is ringing
  == Spawn extension (macro-dialout-trunk, s, 20) exited non-zero on 'SIP/204-02391360' in macro 'dialout-trunk'
  == Spawn extension (queuewtc_rulematch, 96132730204, 5) exited non-zero on 'SIP/204-02391360'
    -- Executing [h@macro-dialout-trunk:1] Macro("SIP/204-02391360", "hangupcall|") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/204-02391360", "vw") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("SIP/204-02391360", "") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("SIP/204-02391360", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s@macro-hangupcall:6] GotoIf("SIP/204-02391360", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] GotoIf("SIP/204-02391360", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s@macro-hangupcall:11] Hangup("SIP/204-02391360", "") in new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/204-02391360' in macro 'hangupcall'
  == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/204-02391360'


marcos

  • Loway
  • Full Member
  • *
  • Posts: 138
  • Karma: 3
    • View Profile
Re: Tracking outbound calls from an inbound queue
« Reply #1 on: July 16, 2009, 09:54:07 »
Hi

QueueMetrics uses a "trick" to track outbound calls. The trick is based on a fake queue that you have to define in your Trixbox/FreePBX machine. This queue is used only for agents login/logout purposes but no calls have to be routed through it.
To phisically place the calls, a particular extension pattern is defined in the file extensions_queuemetrics.conf. A special local extension, also, is used by QueueMetrics to perform outbound calls throught the "Dial" pushbutton each agent can find on their live page.

You have to include the provided extensions_queuemetrics.conf file in your dialplan and modify it in order to be able to place an outbound call and to have it correctly tracked by QueueMetrics. I'll suggest to follow the steps you can find on "Chapter 3. Running an outbound callcenter" provided into the file at http://www.queuemetrics.com/download/QM_Trixbox_32.pdf

Regards,
Marco Signorini.

qmax

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 0
  • Asterisk-11.7.0-ubuntu, Queuemetrics-15.10.1-tgz
    • View Profile
    • Email
Re: Tracking outbound calls from an inbound queue
« Reply #2 on: July 21, 2009, 15:10:48 »
AFAIK,
queue has to be registered in asterisk only if
agents use CallbackLogin, as trigered by buttons on agent live page.
this command - CallBackLogin is depricated in asterisk-1.4 and removed in asteris-1.6

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Tracking outbound calls from an inbound queue
« Reply #3 on: August 17, 2009, 10:43:31 »
The queue must exist (or Asterisk does not know what to do!) but the agent configuration can be fully dynamic. This may or may not be what you are looking for.