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 - jhfitness

Pages: 1 [2]
16
General Asterisk configuration / Migrating QM to new server
« on: February 09, 2011, 15:33:06 »
We're gonna be setting up a fresh phone server (asterisk, same as before) and moving our QM with it. I've taken notes on the files I've manually edited outside the QM folders, and I think we can handle moving the database logs, but what config files do I need to make sure we don't lose the front-end customizations our employees have made (agents, queues, etc). Are we covered if we copy everything in webapps/queuemetrics-#/WEB-INF folder or should I look around for other things as well?

17
Got caller id working by setting

Code: [Select]
exten => s,n,Set(CALLERID(all)=<##########>)
right before Dial() on [qm-queuedial] as recommended in another topic. Had to reload the configuration, of course. Got it down to one integer as a regular ol' dial rule by hardcoding the prefix for QDIALER-QUEUE (we're only using one campaign, at least for now).

Thanks again.

18
Yes, FreePBX. Thank you! The custom trunk was what I was missing! My epiphany came when I looked at the generated code in my extensions_additional.conf file and realized that brackets are kind of like functions that get called, and my outbound route function was calling my trunk function without ever paying any attention to my [queuedial] "function"! Then like the instructions said it was just a matter of getting the QDIALER_CHANNEL variable to match what the Dial() function uses on calls through regular routes and trunks.

Anyway, the details aren't perfectly set up yet but I'm successfully getting calls through now with my prefix. However the caller ID showed up on my other phone as "Unknown" where it shows up with the number when I dial without the prefix, but I haven't looked into it yet (any quick ideas?). Also would like to get it working without having to dial the prefix, but I'm more confident that I can figure that out now that I've gotten this far... there are more docs and forum topics. Will post here if I have more questions.

Thanks again to both!

19
I made an outgoing route in PBX with dial pattern 340NXXNXXXXXX and tried to place a call dialing 340636xxxxxxx (actual number replaced). It seems like it matches the route now but it sends the whole number to the trunk without catching and stripping the 340. Maybe I need to include my file in a different place? (I've got the #include statement at the last line of extensions_custom.conf)

Code: [Select]
-- Executing [340636xxxxxxx@from-internal:1] Set("SIP/121-05c20810", "MOHCLASS=Web") in new stack
    -- Executing [340636xxxxxxx@from-internal:2] Macro("SIP/121-05c20810", "user-callerid|SKIPTTL|") in new stack
    -- Executing [340636xxxxxxx@from-internal:3] Set("SIP/121-05c20810", "_NODEST=") in new stack
    -- Executing [340636xxxxxxx@from-internal:4] Macro("SIP/121-05c20810", "record-enable|121|OUT|") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/121-05c20810", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] AGI("SIP/121-05c20810", "recordingcheck|20101223-082540|1293114340.67") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
  recordingcheck|20101223-082540|1293114340.67: Outbound recording not enabled
    -- AGI Script recordingcheck completed, returning 0
    -- Executing [s@macro-record-enable:5] MacroExit("SIP/121-05c20810", "") in new stack
    -- Executing [340636xxxxxxx@from-internal:5] Macro("SIP/121-05c20810", "dialout-trunk|1|340636xxxxxxx||") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/121-05c20810", "DIAL_TRUNK=1") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/121-05c20810", "0?sub-pincheck|s|1") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/121-05c20810", "0?disabletrunk|1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("SIP/121-05c20810", "DIAL_NUMBER=340636xxxxxxx") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("SIP/121-05c20810", "DIAL_TRUNK_OPTIONS=tr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("SIP/121-05c20810", "OUTBOUND_GROUP=OUT_1") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/121-05c20810", "0?nomax") in new stack
    -- Executing [s@macro-dialout-trunk:8] GotoIf("SIP/121-05c20810", "0?chanfull") in new stack
    -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/121-05c20810", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("SIP/121-05c20810", "DIAL_TRUNK_OPTIONS=") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("SIP/121-05c20810", "outbound-callerid|1") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/121-05c20810", "0|SetCallerPres|") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/121-05c20810", "0|Set|REALCALLERIDNUM=121") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/121-05c20810", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/121-05c20810", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/121-05c20810", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/121-05c20810", "TRUNKOUTCID=1636yyyyyyy") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/121-05c20810", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/121-05c20810", "1|Set|CALLERID(all)=1636yyyyyyy") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/121-05c20810", "0|Set|CALLERID(all)=") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/121-05c20810", "0|SetCallerPres|prohib_passed_screen") in new stack
    -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/121-05c20810", "1|AGI|fixlocalprefix") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
    -- AGI Script fixlocalprefix completed, returning 0
    -- Executing [s@macro-dialout-trunk:13] Set("SIP/121-05c20810", "OUTNUM=+340636xxxxxxx") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("SIP/121-05c20810", "custom=SIP/VP-SIPJFKA") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/121-05c20810", "1|Set|DIAL_TRUNK_OPTIONS=M(setmusic^Web)") in new stack
    -- Executing [s@macro-dialout-trunk:16] Macro("SIP/121-05c20810", "dialout-trunk-predial-hook|") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/121-05c20810", "") in new stack
    -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/121-05c20810", "0?bypass|1") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/121-05c20810", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:19] Dial("SIP/121-05c20810", "SIP/VP-SIPJFKA/+340636xxxxxxx|300|M(setmusic^Web)") in new stack
    -- Called VP-SIPJFKA/+340636xxxxxxx
    -- Got SIP response 503 "Service Unavailable" back from 64.61.93.190
    -- SIP/VP-SIPJFKA-05c220d0 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [s@macro-dialout-trunk:20] Goto("SIP/121-05c20810", "s-CONGESTION|1") in new stack
    -- Goto (macro-dialout-trunk,s-CONGESTION,1)
    -- Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf("SIP/121-05c20810", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,s-CONGESTION,3)
    -- Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp("SIP/121-05c20810", "TRUNK Dial failed due to CONGESTION - failing through to other trunks") in new stack
    -- Executing [340636xxxxxxx@from-internal:6] Macro("SIP/121-05c20810", "outisbusy|") in new stack
    -- Executing [s@macro-outisbusy:1] GotoIf("SIP/121-05c20810", "0?emergency|1") in new stack
    -- Executing [s@macro-outisbusy:2] GotoIf("SIP/121-05c20810", "0?intracompany|1") in new stack
    -- Executing [s@macro-outisbusy:3] Playback("SIP/121-05c20810", "all-circuits-busy-now&pls-try-call-later| noanswer") in new stack
    -- <SIP/121-05c20810> Playing 'all-circuits-busy-now' (language 'en')
    -- <SIP/121-05c20810> Playing 'pls-try-call-later' (language 'en')
    -- Executing [s@macro-outisbusy:4] Congestion("SIP/121-05c20810", "20") in new stack
  == Spawn extension (macro-outisbusy, s, 4) exited non-zero on 'SIP/121-05c20810' in macro 'outisbusy'
  == Spawn extension (macro-outisbusy, s, 4) exited non-zero on 'SIP/121-05c20810'

20
I've been browsing every help file and forum topic I can find but I can't figure out how to get Outbound call log working with our otherwise perfectly functioning system. I've got the extensions_queuemetrics.conf file with the following details:

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-${EXTEN:0:3})
exten => _XXX.,n,Set(QDIALER_NUMBER=${EXTEN:3})
exten => _XXX.,n,Set(QDIALER_AGENT=Agent/${CALLERID(num)})
exten => _XXX.,n,Set(QDIALER_CHANNEL=SIP/${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,Dial(${QDIALER_CHANNEL},300,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)i,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})

and I've it included in extensions_custom.conf

I made a queue in QM called "q-340" and I tried adding 340 when dialing out numbers but Asterisk doesn't want to complete the call, period:

Code: [Select]
-- Executing [3406365551234@from-internal:1] ResetCDR("SIP/118-05c00ae0", "") in new stack
    -- Executing [3406365551234@from-internal:2] NoCDR("SIP/118-05c00ae0", "") in new stack
    -- Executing [3406365551234@from-internal:3] Wait("SIP/118-05c00ae0", "1") in new stack
    -- Executing [3406365551234@from-internal:4] Playback("SIP/118-05c00ae0", "silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer") in new stack
    -- <SIP/118-05c00ae0> Playing 'silence/1' (language 'en')
    -- <SIP/118-05c00ae0> Playing 'cannot-complete-as-dialed' (language 'en')
    -- <SIP/118-05c00ae0> Playing 'check-number-dial-again' (language 'en')
    -- Executing [3406365551234@from-internal:5] Wait("SIP/118-05c00ae0", "1") in new stack
    -- Executing [3406365551234@from-internal:6] Congestion("SIP/118-05c00ae0", "20") in new stack
  == Spawn extension (from-internal, 3406365551234, 6) exited non-zero on 'SIP/118-05c00ae0'
    -- Executing [h@from-internal:1] Macro("SIP/118-05c00ae0", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/118-05c00ae0", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,4)
    -- Executing [s@macro-hangupcall:4] GotoIf("SIP/118-05c00ae0", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] GotoIf("SIP/118-05c00ae0", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] Hangup("SIP/118-05c00ae0", "") in new stack
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/118-05c00ae0' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/118-05c00ae0'

Do I need to define 340 somewhere else? How do I know that it's even reading my _XXX? Not sure where to start troubleshooting.

21
OK, so here's what I did. P001 was my only partition so I loaded the missing logs into a new partition, P002, except I forgot to do it in reverse time order so I went on P003:

Code: [Select]
./qloader.pl -h localhost -d queuemetrics -u queuemetrics -p (password) /var/log/asterisk/queue_log.5 P003 /var/log/asterisk/qloader.log
./qloader.pl -h localhost -d queuemetrics -u queuemetrics -p (password) /var/log/asterisk/queue_log.4 P003 /var/log/asterisk/qloader.log
./qloader.pl -h localhost -d queuemetrics -u queuemetrics -p (password) /var/log/asterisk/queue_log.2 P003 /var/log/asterisk/qloader.log

Then I went into mysql and changed the partition name.

Code: [Select]
update queue_log set partition='P001' where partition='P003';
Also, of course, deleting where partition was P002. Now all of my data shows up in P001 like I wanted.

Hope this can help someone else... Feel free to let me know if I've messed something up and should change something. Everything looks good though.

22
Actually, I got it to work once I passed the correct database connection parameters but the log says "Ignoring timestamps below XXXXXXXX" and everything is skipped.

I found another topic that says it won't accept data older than existing data and this seems to confirm that. Is there a quick temporary to override that or do I need to go the route of deleting the database records and importing my 5 logs one by one?

23
It is working now. Thanks.

24
I have data from the last couple of weeks going into the sql:P001 database. However I have some old logs such as queue_log.2, queue_log.4, etc, that I would like to manually dump into the database before they are rotated away.

I found this in the user manuals, is this what I want to do?

Quote
To test that the qloader script is working, try the following command:

./qloader.pl /var/log/asterisk/queue_log P02 /var/log/asterisk/qloader.log

This command will try uploading the contents of the file /var/log/asterisk/queue_log to partition P02 of the chosen database, writing its own log on /var/log/asterisk/qloader.log. When the program is running no output is written on stdout; if you want to know how the loading is going you have to consult its own log file.

but with /queue_log.X P001 ?

Thanks

25
I have a side question related to this. I've been browsing tutorials and forums as I configure our system, and earlier today I changed the following in /usr/local/qloader/qloader.pl

Quote
my $rewriteToAgent   = 1;   

My understanding was that would do the report rewriting. However, based on this topic I have just changed "default.rewriteLocalChannels=true" in configuration.properties.

I understand (somewhat) that the qloader is MySQL and the configuration.properties file is more directly related to QM and the user interface for the reports. Are both changes necessary for the rewriting? And do I need to restart anything manually for these changes to take effect?

26
Running QM 1.6.1.1

I've learned how to change the default log file in configuration.properties to come from the qloader database (sql:P001) and it's working on Custom Reports. But as far as I can tell Quick Activity Report is not pulling from the same file, and I can't figure out where to change the place it pulls data from (right now it appears to only be showing from dates that are in queue_log.1)

Also, the Agent Report doesn't show any data at all.

Pages: 1 [2]