Author Topic: NuPoint Call Directory Call Flow Reports - Automated  (Read 5651 times)

Offline lundah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1230
  • Country: us
  • Karma: +66/-0
  • Senior Chief Grunt
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #15 on: January 16, 2024, 12:07:06 PM »
Note sure what happened to the rest of it. You need to put your shell commands in the


Offline lundah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1230
  • Country: us
  • Karma: +66/-0
  • Senior Chief Grunt
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #16 on: January 16, 2024, 12:10:37 PM »
Note sure what happened to the rest of it. You need to put your shell commands in the

Odd that something keeps eating my comment text. I

Offline lundah

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1230
  • Country: us
  • Karma: +66/-0
  • Senior Chief Grunt
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #17 on: January 18, 2024, 09:13:25 AM »
Ok, back from a few days off and on my regular machine. No idea why my comments were getting eaten when posting from my iPad, I tried different browsers, did a Preview before posting, no luck.

Based on the info in several KMS articles, it looks like everything in /etc/cron.daily is run during the NP nightly maintenance, I'm not sure on exactly how, but the /etc/crontab file specifically warns not to edit as it will get overwritten, so Mitel is doing something weird under the hood. To make things simple, just add your commands to the /etc/cron.daily/89NPMdaily file. Grab a copy of the original file first, of course. Open it up in vi or nano (ssh in, go to the /etc/cron.daily and "nano 89NPMdaily" or "vi 89NPMdaily"), add a comment line and then your shell commands, then save the file. Save a copy as well, as I would imagine this will get overwritten on an upgrade.

Offline ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5776
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #18 on: January 18, 2024, 09:37:11 AM »
So /etc/cron.daily is a directory, not a file.  It contains several scripts.
So my guess would be that anything in the directory will get executed daily.
I'll test that by putting in my script.

Ralph

Offline johnp

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2214
  • Country: us
  • Karma: +68/-0
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #19 on: January 19, 2024, 05:29:23 PM »
Check this out https://wiki.koozali.org/Cron_entry This tells how to make changes survive upgrades. This is based on Mitel Linux i.e e-smith

Offline johnp

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2214
  • Country: us
  • Karma: +68/-0
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #20 on: January 02, 2025, 09:55:52 AM »
Ralph, did you every get this working? If so do you have any instructions on doing this> I have someone asking for similar things. Thanks, John

Offline ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5776
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #21 on: January 08, 2025, 09:48:10 AM »
Ralph, did you every get this working? If so do you have any instructions on doing this> I have someone asking for similar things. Thanks, John

Yes, I did. 
Now.... you would think I could remember how I did it.
Here's today's output:
Quote
Xxml version="1.1" encoding="UTF-8" standalone="no" ?
 stats startDate="01/06/2025" startTime="07:01:53"
     totalSeconds 66
     numCalls 39
     internalCalls 30
     externalCalls 9
     hourlyTotals
         hour00 0
         hour01 0
         hour02 0
         hour03 0
         hour04 0
         hour05 0
         hour06 0
         hour07 6
         hour08 12
         hour09 1
         hour10 6
         hour11 3
         hour12 3
         hour13 4
         hour14 0
         hour15 3
         hour16 1
         hour17 0
         hour18 0
         hour19 0
         hour20 0
         hour21 0
         hour22 0
         hour23 0
   
     nodes
         001" name="Main Sched" type="Schedule"
             entryCount 39
             exitCounts
                 Off_Hours targetNodeName="After Hours Schedule" 0
                 On_Hours targetNodeName="Day Sched" 39
           
       
         002" name="Bld Txfer Aftr Hrs to Google Num [REDACTED]" type="Blind transfer"
             entryCount 0
           
       
         003" name="Bld Txfer [REDACTED] HlpDsk" type="Blind transfer"
             entryCount 39
           
       
         004" name="Day Sched" type="Schedule"
             entryCount 39
             exitCounts
                 Off_Hours targetNodeName="Bld Txfer Google Number [REDACTED]" 0
                 On_Hours targetNodeName="Bld Txfer [REDACTED] HlpDsk" 39
           
       
         005" name="Bld Txfer Google Number [REDACTED]" type="Blind transfer"
             entryCount 0
           
       
         006" name="After Hours Schedule" type="Schedule"
             entryCount 0
             exitCounts
                 Off_Hours targetNodeName="Bld Txfer Aftr Hrs to Google Num [REDACTED]" 0
                 On_Hours targetNodeName="Blind Xfer to [REDACTED]Key" 0
           
       
         007" name="Blind Xfer to [REDACTED] Key" type="Blind transfer"
             entryCount 0
           
       
   

Note: Created by /etc/cron.daily/send_stats.sh

The actual file to create the magic is a shell program.  /etc/cron.daily/send_stats.sh
It has to be in the /etc/cron.daily directory.



Quote
#!/bin/bash
#copy file to stats directory.
#cp /usr/vm/val5/CallFlows/mbox_[MBOX REDACTED]_stats.xml /usr/vm/val5/CallFlows/stats/"$(date +"%m-%d-%y")_CallStats.xml"


cat /usr/vm/val5/CallFlows/mbox_[MBOX REDACTED]_stats.xml | sed 's/<[^>]*\/>//g' | sed 's/<\/[^>]*>//g' | sed 's/[<>]/ /g' | sed 's/node id="//g' > /u$

#adding a note at end of file as a reminder where this shell script resides.
echo "Note: Created by /etc/cron.daily/send_stats.sh" >> /usr/vm/val5/CallFlows/stats/"$(date +"%m-%d-%y")_CallStats.xml"


#send the file via email
cat /usr/vm/val5/CallFlows/stats/"$(date +"%m-%d-%y")_CallStats.xml" | mailx -s "Helpdesk Stats" s[EMAIL REDACTED]

cat /usr/vm/val5/CallFlows/stats/"$(date +"%m-%d-%y")_CallStats.xml" | mailx -s "Helpdesk Stats" [EMAIL REDACTED]


#delete the original file after emailing. This resets the stats.
rm /usr/vm/val5/CallFlows/mbox_[MAILBOX]_stats.xml
« Last Edit: January 08, 2025, 09:52:03 AM by ralph »

Offline johnp

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2214
  • Country: us
  • Karma: +68/-0
    • View Profile
Re: NuPoint Call Directory Call Flow Reports - Automated
« Reply #22 on: January 14, 2025, 01:58:14 PM »
Thanks


 

Sitemap 1 2 3 4 5 6 7 8 9 10