Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - luiz@tribecapediatrics

Pages: 1 [2]
16
I put this project on the side for a while so I could get my head out of it and look at it again with fresh eyes.
I now have it outbound tracking working on our system. Agent can dial using the agent portal or by dial 7+AgentNumber+PhoneNumber.

This is what was wrong with the dial plan

Original dial plan:

Code: [Select]
exten => s,1,NoOp,Outbound call -> A:${QDIALER_AGENT} N:${QDIALER_NUMBER} Q:${QDIALER_QUEUE} Ch:${QDIALER_CHANNEL}
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},ENTERQUEUE,-,${QDIALER_NUMBER})
exten => s,n,Dial(${QDIALER_CHANNEL},30,gM(queuedial-answer^${UNIQUEID}^${GM}^${QDIALER_QUEUE}^${QDIALER_AGENT}^${ST}))
exten => s,n,Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)})

My Dial Plan:

Code: [Select]
exten => s,1,NoOp(Outbound call -> A:${QDIALER_AGENT} N:${QDIALER_NUMBER} Q:${QDIALER_QUEUE} Ch:${QDIALER_CHANNEL})
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},ENTERQUEUE,-,${QDIALER_NUMBER})
exten => s,n,Dial(${QDIALER_CHANNEL},30,gM(queuedial-answer^${UNIQUEID}^${GM}^${QDIALER_QUEUE}^${QDIALER_AGENT}^${ST}))
exten => s,n,Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)})

The NoOp line had a comma after the NoOp operation, changed to a open parenthesis and got it all to work.

Thank you for all the help.



17
Yes, I can not get this to work.

18
I see it. This is what the CLI outputs.

Code: [Select]
[root@localhost ~]# asterisk -rx 'dialplan show qm-queuedial'
[ Context 'qm-queuedial' created by 'pbx_config' ]
  'h' =>            1. NoOp( "Call exiting: status ${GLOBAL(${GM})} answered at: ${GLOBAL(${GM}ans)} DS: ${DIALSTATUS}"  ) [pbx_config]
                    2. Goto(case-${GLOBAL(${GM})})                [pbx_config]
                    3. Hangup()                                   [pbx_config]
     [case-U]       4. Set(WT=$[${EPOCH} - ${ST}])                [pbx_config]
                    5. Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},ABANDON,1,1,${WT}) [pbx_config]
                    6. Hangup()                                   [pbx_config]
     [case-A]       7. Set(COMPLETE=${IF($["${CAUSECOMPLETE}" = "C"]?COMPLETECALLER:COMPLETEAGENT)}) [pbx_config]
                    8. Set(WT=$[${GLOBAL(${GM}ans)} - ${ST}])     [pbx_config]
                    9. Set(CT=$[${EPOCH} - ${GLOBAL(${GM}ans)}])  [pbx_config]
                    10. Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},${COMPLETE},${WT},${CT}) [pbx_config]
                    11. Hangup()                                  [pbx_config]
  's' =>            1. NoOp,Outbound call -> A:${QDIALER_AGENT} N:${QDIALER_NUMBER} Q:${QDIALER_QUEUE} Ch:${QDIALER_CHANNEL}() [pbx_config]
                    2. Set(CDR(accountcode)=QDIALAGI)             [pbx_config]
                    3. Set(ST=${EPOCH})                           [pbx_config]
                    4. Set(GM=QDV-${QDIALER_AGENT})               [pbx_config]
                    5. Set(GLOBAL(${GM})=U)                       [pbx_config]
                    6. Set(GLOBAL(${GM}ans)=0)                    [pbx_config]
                    7. Macro(queuelog,${ST},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},ENTERQUEUE,-,${QDIALER_NUMBER}) [pbx_config]
                    8. Dial(${QDIALER_CHANNEL},30,gM(queuedial-answer^${UNIQUEID}^${GM}^${QDIALER_QUEUE}^${QDIALER_AGENT}^${ST})) [pbx_config]
                    9. Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)}) [pbx_config]

-= 2 extensions (20 priorities) in 1 context. =-

19
Yes there is a [qm-queuedial] in the extensions_queuemetrics.conf. Do I need to include => [qm-queuedial] anywhere?

here is that part of the conf file.

Code: [Select]
[queuedial]
; this piece of dialplan is just a calling hook into the [qm-queuedial] context that actually does the
; outbound dialing - replace as needed - just fill in the same variables.
exten => _XXX.,1,Set(QDIALER_QUEUE=q-150)
exten => _XXX.,n,Set(QDIALER_NUMBER=${EXTEN:5})
exten => _XXX.,n,Set(QDIALER_AGENT=Agent/${EXTEN:0:5})
exten => _XXX.,n,Set(QDIALER_CHANNEL=SIP/parenting/${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)

;[queuedial]
; This piece of dialplan will let only logged on agents dial out
;exten => _XXX.,1,Set(QDIALER_QUEUE=q-150)
;exten => _XXX.,n,Set(QDIALER_NUMBER=${EXTEN:0})
;exten => _XXX.,n,Set(QDIALER_AGENT=Agent/${AGENTBYCALLERID_${CALLERID(num)}})
;exten => _XXX.,n,Set(QDIALER_CHANNEL=SIP/broadvox/${QDIALER_NUMBER})
;exten => _XXX.,n,Set(QueueName=${QDIALER_QUEUE})
;exten => _XXX.,n,MixMonitor(Q-${QDIALER_QUEUE}-${UNIQUEID}.WAV,b,)
;exten => _XXX.,n,GotoIf($[${LEN(${QDIALER_AGENT})} > 6]?qm-queuedial,s,1)
;exten => _XXX.,n,NoOp,Extension ${CALLERID(num)} is not logged on as agent.
;exten => _XXX.,n,Playback(agent-loggedoff)
;exten => _XXX.,n,Congestion

[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,Outbound call -> A:${QDIALER_AGENT} N:${QDIALER_NUMBER} Q:${QDIALER_QUEUE} Ch:${QDIALER_CHANNEL}
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},ENTERQUEUE,-,${QDIALER_NUMBER})
exten => s,n,Dial(${QDIALER_CHANNEL},30,gM(queuedial-answer^${UNIQUEID}^${GM}^${QDIALER_QUEUE}^${QDIALER_AGENT}^${ST}))
exten => s,n,Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)})

Thank you


20
I changed the QDIALER to (QDIALER_CHANNEL=SIP/parenting/${QDIALER_NUMBER}) and unfortunately still getting all circuit are busy now.
I have pasted the CLI output. I dont know where I am messing up.

Thank you

Code: [Select]
  == Extension Changed 215[ext-local] new state InUse for Notify User 312
    -- Executing [74610013479445555@from-internal:1] Macro("SIP/215-0000f712", "user-callerid,SKIPTTL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/215-0000f712", "AMPUSER=215") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/215-0000f712", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/215-0000f712", "1?Set(REALCALLERIDNUM=215)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/215-0000f712", "AMPUSER=215") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/215-0000f712", "AMPUSERCIDNAME=Hotdesk Agent") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/215-0000f712", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/215-0000f712", "AMPUSERCID=215") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/215-0000f712", "CALLERID(all)="Hotdesk Agent" <215>") in new stack
    -- Executing [s@macro-user-callerid:9] ExecIf("SIP/215-0000f712", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:10] GotoIf("SIP/215-0000f712", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,19)
    -- Executing [s@macro-user-callerid:19] NoOp("SIP/215-0000f712", "Using CallerID "Hotdesk Agent" <215>") in new stack
    -- Executing [74610013479445555@from-internal:2] Set("SIP/215-0000f712", "_NODEST=") in new stack
    -- Executing [74610013479445555@from-internal:3] Macro("SIP/215-0000f712", "record-enable,215,OUT,") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/215-0000f712", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] ExecIf("SIP/215-0000f712", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:5] GotoIf("SIP/215-0000f712", "0?Group:OUT") in new stack
    -- Goto (macro-record-enable,s,15)
    -- Executing [s@macro-record-enable:15] GotoIf("SIP/215-0000f712", "0?IN") in new stack
    -- Executing [s@macro-record-enable:16] ExecIf("SIP/215-0000f712", "1?MacroExit()") in new stack
    -- Executing [74610013479445555@from-internal:4] Macro("SIP/215-0000f712", "dialout-trunk,20,4610013479445555,,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/215-0000f712", "DIAL_TRUNK=20") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/215-0000f712", "0?sub-pincheck,s,1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/215-0000f712", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/215-0000f712", "DIAL_NUMBER=4610013479445555") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/215-0000f712", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/215-0000f712", "OUTBOUND_GROUP=OUT_20") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/215-0000f712", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/215-0000f712", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/215-0000f712", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/215-0000f712", "outbound-callerid,20") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/215-0000f712", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/215-0000f712", "0?Set(REALCALLERIDNUM=215)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/215-0000f712", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/215-0000f712", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/215-0000f712", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/215-0000f712", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/215-0000f712", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/215-0000f712", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/215-0000f712", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/215-0000f712", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/215-0000f712", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/215-0000f712", "0?AGI(fixlocalprefix)") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/215-0000f712", "OUTNUM=4610013479445555") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/215-0000f712", "custom=AMP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/215-0000f712", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/215-0000f712", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/215-0000f712", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/215-0000f712", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/215-0000f712", "1?customtrunk") in new stack
    -- Goto (macro-dialout-trunk,s,22)
    -- Executing [s@macro-dialout-trunk:22] Set("SIP/215-0000f712", "pre_num=AMP:Local/") in new stack
    -- Executing [s@macro-dialout-trunk:23] Set("SIP/215-0000f712", "the_num=OUTNUM") in new stack
    -- Executing [s@macro-dialout-trunk:24] Set("SIP/215-0000f712", "post_num=@queuedial/n") in new stack
    -- Executing [s@macro-dialout-trunk:25] GotoIf("SIP/215-0000f712", "1?outnum:skipoutnum") in new stack
    -- Goto (macro-dialout-trunk,s,26)
    -- Executing [s@macro-dialout-trunk:26] Set("SIP/215-0000f712", "the_num=4610013479445555") in new stack
    -- Executing [s@macro-dialout-trunk:27] Dial("SIP/215-0000f712", "Local/4610013479445555@queuedial/n,300,") in new stack
    -- Called 4610013479445555@queuedial/n
    -- Executing [4610013479445555@queuedial:1] Set("Local/4610013479445555@queuedial-223e;2", "QDIALER_QUEUE=q-150") in new stack
    -- Executing [4610013479445555@queuedial:2] Set("Local/4610013479445555@queuedial-223e;2", "QDIALER_NUMBER=13479445555") in new stack
    -- Executing [4610013479445555@queuedial:3] Set("Local/4610013479445555@queuedial-223e;2", "QDIALER_AGENT=Agent/46100") in new stack
    -- Executing [4610013479445555@queuedial:4] Set("Local/4610013479445555@queuedial-223e;2", "QDIALER_CHANNEL=SIP/parenting/13479445555") in new stack
    -- Executing [4610013479445555@queuedial:5] Set("Local/4610013479445555@queuedial-223e;2", "QueueName=q-150") in new stack
    -- Executing [4610013479445555@queuedial:6] MixMonitor("Local/4610013479445555@queuedial-223e;2", "Q-q-150-1340199786.130499.WAV|b|") in new stack
    -- Executing [4610013479445555@queuedial:7] Goto("Local/4610013479445555@queuedial-223e;2", "qm-queuedial,s,1") in new stack
  == Begin MixMonitor Recording Local/4610013479445555@queuedial-223e;2
    -- Goto (qm-queuedial,s,1)
  == Spawn extension (qm-queuedial, s, 1) exited non-zero on 'Local/4610013479445555@queuedial-223e;2'
    -- Executing [h@qm-queuedial:1] NoOp("Local/4610013479445555@queuedial-223e;2", " "Call exiting: status  answered at:  DS: "  ") in new stack
    -- Executing [h@qm-queuedial:2] Goto("Local/4610013479445555@queuedial-223e;2", "case-") in new stack
  == Spawn extension (qm-queuedial, h, 2) exited non-zero on 'Local/4610013479445555@queuedial-223e;2'
  == End MixMonitor Recording Local/4610013479445555@queuedial-223e;2
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:28] NoOp("SIP/215-0000f712", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0") in new stack
    -- Executing [s@macro-dialout-trunk:29] Goto("SIP/215-0000f712", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/215-0000f712", "RC=0") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/215-0000f712", "0,1") in new stack
    -- Goto (macro-dialout-trunk,0,1)
    -- Executing [0@macro-dialout-trunk:1] Goto("SIP/215-0000f712", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/215-0000f712", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,continue,3)
    -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/215-0000f712", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 0 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:4] Set("SIP/215-0000f712", "CALLERID(number)=215") in new stack
    -- Executing [74610013479445555@from-internal:5] Macro("SIP/215-0000f712", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("SIP/215-0000f712", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("SIP/215-0000f712", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("SIP/215-0000f712", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("SIP/215-0000f712", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
    -- <SIP/215-0000f712> Playing 'all-circuits-busy-now.gsm' (language 'en')

21
Neither of those too worked for me. I actually had set as Local/EXTEN:5@from-internal/n, so this could pick up any of my 2 trunks.

this is what i have in my extensions_queuemetrics.conf

[queuedial]
; this piece of dialplan is just a calling hook into the [qm-queuedial] context that actually does the
; outbound dialing - replace as needed - just fill in the same variables.
exten => _XXX.,1,Set(QDIALER_QUEUE=q-150)
exten => _XXX.,n,Set(QDIALER_NUMBER=${EXTEN:5})
exten => _XXX.,n,Set(QDIALER_AGENT=Agent/${EXTEN:0:5})
exten => _XXX.,n,Set(QDIALER_CHANNEL=SIP/${EXTEN:5})
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,Outbound call -> A:${QDIALER_AGENT} N:${QDIALER_NUMBER} Q:${QDIALER_QUEUE} Ch:${QDIALER_CHANNEL}
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},ENTERQUEUE,-,${QDIALER_NUMBER})
exten => s,n,Dial(${QDIALER_CHANNEL},30,gM(queuedial-answer^${UNIQUEID}^${GM}^${QDIALER_QUEUE}^${QDIALER_AGENT}^${ST}))
exten => s,n,Set(CAUSECOMPLETE=${IF($["${DIALSTATUS}" = "ANSWER"]?C)})

; Trapping call termination here
exten => h,1,NoOp( "Call exiting: status ${GLOBAL(${GM})} answered at: ${GLOBAL(${GM}ans)} DS: ${DIALSTATUS}"  )
exten => h,n,Goto(case-${GLOBAL(${GM})})
exten => h,n,Hangup()

; Call unanswered
exten => h,n(case-U),Set(WT=$[${EPOCH} - ${ST}])
exten => h,n,Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},ABANDON,1,1,${WT})
exten => h,n,Hangup()

; call answered: agent/callee hung
exten => h,n(case-A),Set(COMPLETE=${IF($["${CAUSECOMPLETE}" = "C"]?COMPLETECALLER:COMPLETEAGENT)})
exten => h,n,Set(WT=$[${GLOBAL(${GM}ans)} - ${ST}])
exten => h,n,Set(CT=$[${EPOCH} - ${GLOBAL(${GM}ans)}])
exten => h,n,Macro(queuelog,${EPOCH},${UNIQUEID},${QDIALER_QUEUE},${QDIALER_AGENT},${COMPLETE},${WT},${CT})
exten => h,n,Hangup()


[macro-queuedial-answer]
; Expecting $ARG1: uniqueid of the caller channel
;           $ARG2: global variable to store the answer results
;           $ARG3: queue name
;           $ARG4: agent name
;           $ARG5: enterqueue
;
exten => s,1,NoOp("Macro: queuedial-answer UID:${ARG1} GR:${ARG2} Q:${ARG3} A:${ARG4} E:${ARG5}")
exten => s,n,Set(NOW=${EPOCH})
exten => s,n,Set(WD=$[${NOW} - ${ARG5}])
exten => s,n,Macro(queuelog,${NOW},${ARG1},${ARG3},${ARG4},CONNECT,${WD})
exten => s,n,Set(GLOBAL(${ARG2})=A)
exten => s,n,Set(GLOBAL(${ARG2}ans)=${NOW})
exten => s,n,NoOp("Macro queuedial-answer terminating" )

[macro-queuelog]
; The advantage of using this macro is that you can choose whether to use the Shell version
; (where you have complete control of what gets written) or the Application version (where you
; do not need a shellout, so it's way faster).
;
; Expecting  $ARG1: Timestamp
;            $ARG2: Call-id
;            $ARG3: Queue
;            $ARG4: Agent
;            $ARG5: Verb
;            $ARG6: Param1
;            $ARG7: Param2
;            $ARG8: Param3
;
;exten => s,1,System( echo "${ARG1}|${ARG2}|${ARG3|${ARG4}|${ARG5}|${ARG6}|${ARG7}|${ARG8}" >> /var/log/asterisk/queue_log )
exten => s,1,QueueLog(${ARG3},${ARG2},${ARG4},${ARG5},${ARG6}|${ARG7}|${ARG8})



22
We are trying to setup qm to track our agent outgoing calls. We are running Elastix/freepbx, our agent ids are 5 digits long, and we created a custom trunk and outgoing route, when an agent diasl 74610013479445555, we get all circuits are busy now.

I've put the output of the cli below:

-- Executing [s@macro-dialout-trunk:26] Set("SIP/215-00002175", "the_num=4610013479445555") in new stack
    -- Executing [s@macro-dialout-trunk:27] Dial("SIP/215-00002175", "Local/4610013479445555@queuedial/n,300,") in new stack
    -- Called 4610013479445555@queuedial/n
    -- Executing [4610013479445555@queuedial:1] Set("Local/4610013479445555@queuedial-a270;2", "QDIALER_QUEUE=q-150") in new stack
    -- Executing [4610013479445555@queuedial:2] Set("Local/4610013479445555@queuedial-a270;2", "QDIALER_NUMBER=13479445555") in new stack
    -- Executing [4610013479445555@queuedial:3] Set("Local/4610013479445555@queuedial-a270;2", "QDIALER_AGENT=Agent/46100") in new stack
    -- Executing [4610013479445555@queuedial:4] Set("Local/4610013479445555@queuedial-a270;2", "QDIALER_CHANNEL=SIP/13479445555") in new stack
    -- Executing [4610013479445555@queuedial:5] Set("Local/4610013479445555@queuedial-a270;2", "QueueName=q-150") in new stack
    -- Executing [4610013479445555@queuedial:6] MixMonitor("Local/4610013479445555@queuedial-a270;2", "Q-q-150-1339437358.20774.WAV|b|") in new stack
    -- Executing [4610013479445555@queuedial:7] Goto("Local/4610013479445555@queuedial-a270;2", "qm-queuedial,s,1") in new stack
    -- Goto (qm-queuedial,s,1)
  == Spawn extension (qm-queuedial, s, 1) exited non-zero on 'Local/4610013479445555@queuedial-a270;2'
    -- Executing [h@qm-queuedial:1] NoOp("Local/4610013479445555@queuedial-a270;2", " "Call exiting: status  answered at:  DS: "  ") in new stack
    -- Executing [h@qm-queuedial:2] Goto("Local/4610013479445555@queuedial-a270;2", "case-") in new stack
  == Spawn extension (qm-queuedial, h, 2) exited non-zero on 'Local/4610013479445555@queuedial-a270;2'
  == Begin MixMonitor Recording Local/4610013479445555@queuedial-a270;2
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:28] NoOp("SIP/215-00002175", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 0") in new stack
    -- Executing [s@macro-dialout-trunk:29] Goto("SIP/215-00002175", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("SIP/215-00002175", "RC=0") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("SIP/215-00002175", "0,1") in new stack
    -- Goto (macro-dialout-trunk,0,1)
    -- Executing [0@macro-dialout-trunk:1] Goto("SIP/215-00002175", "continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/215-00002175", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,continue,3)
    -- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/215-00002175", "TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 0 - failing through to other trunks") in new stack
    -- Executing [continue@macro-dialout-trunk:4] Set("SIP/215-00002175", "CALLERID(number)=215") in new stack
    -- Executing [74610013479445555@from-internal:5] Macro("SIP/215-00002175", "outisbusy,") in new stack
    -- Executing [s@macro-outisbusy:1] Progress("SIP/215-00002175", "") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("SIP/215-00002175", "0?emergency,1") in new stack
    -- Executing [s@macro-outisbusy:3] GotoIf("SIP/215-00002175", "0?intracompany,1") in new stack
    -- Executing [s@macro-outisbusy:4] Playback("SIP/215-00002175", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
    -- <SIP/215-00002175> Playing 'all-circuits-busy-now.gsm' (language 'en')
  == End MixMonitor Recording Local/4610013479445555@queuedial-a270;2

Pages: 1 [2]