07-09-2014 12:33 PM
Hello,
I'd like to be able to have an email sent when all channels of all PRI's on a voice gateway/router are in use. Does anyone have any existing clever solutions for this that they wouldn't mind sharing?
Thanks in advance!
-Mike
07-12-2014 10:18 PM
How would you determine this manually?
07-30-2014 08:04 AM
This would show you manually what channels are being used for all PRI's on a router:
sh voice port summ
IN OUT
PORT CH SIG-TYPE ADMIN OPER STATUS STATUS EC
=============== == ============ ===== ==== ======== ======== ==
0/0/0:23 01 xcc-voice up dorm none none y
0/0/0:23 02 xcc-voice up dorm none none y
0/0/0:23 03 xcc-voice up dorm none none y
0/0/0:23 04 xcc-voice up dorm none none y
0/0/0:23 05 xcc-voice up dorm none none y
0/0/0:23 06 xcc-voice up dorm none none y
0/0/0:23 07 xcc-voice up dorm none none y
0/0/0:23 08 xcc-voice up dorm none none y
0/0/0:23 09 xcc-voice up dorm none none y
0/0/0:23 10 xcc-voice up dorm none none y
0/0/0:23 11 xcc-voice up dorm none none y
0/0/0:23 12 xcc-voice up dorm none none y
0/0/0:23 13 xcc-voice up dorm none none y
0/0/0:23 14 xcc-voice up dorm none none y
0/0/0:23 15 xcc-voice up dorm none none y
0/0/0:23 16 xcc-voice up dorm none none y
0/0/0:23 17 xcc-voice up dorm none none y
0/0/0:23 18 xcc-voice up dorm none none y
0/0/0:23 19 xcc-voice up dorm none none y
0/0/0:23 20 xcc-voice up dorm none none y
0/0/0:23 21 xcc-voice up dorm none none y
0/0/0:23 22 xcc-voice up dorm none none y
0/0/0:23 23 xcc-voice up dorm none none y
0/1/0:23 01 xcc-voice up dorm none none y
0/1/0:23 02 xcc-voice up up none none y
0/1/0:23 03 xcc-voice up up none none y
0/1/0:23 04 xcc-voice up dorm none none y
0/1/0:23 05 xcc-voice up up none none y
0/1/0:23 06 xcc-voice up up none none y
0/1/0:23 07 xcc-voice up up none none y
0/1/0:23 08 xcc-voice up dorm none none y
0/1/0:23 09 xcc-voice up up none none y
0/1/0:23 10 xcc-voice up up none none y
0/1/0:23 11 xcc-voice up up none none y
0/1/0:23 12 xcc-voice up up none none y
0/1/0:23 13 xcc-voice up dorm none none y
0/1/0:23 14 xcc-voice up up none none y
0/1/0:23 15 xcc-voice up up none none y
0/1/0:23 16 xcc-voice up up none none y
0/1/0:23 17 xcc-voice up up none none y
0/1/0:23 18 xcc-voice up dorm none none y
0/1/0:23 19 xcc-voice up up none none y
0/1/0:23 20 xcc-voice up up none none y
0/1/0:23 21 xcc-voice up up none none y
0/1/0:23 22 xcc-voice up up none none y
0/1/0:23 23 xcc-voice up up none none y
If they are admin up/oper up they are in use. Dorm means they are available and not currently being used. I'm sure there is a way to capture this output on an interval and parse it, but I don't know what that would be.
07-30-2014 09:59 AM
Of all the show commands for ISDN/PRI, that is one I've never used. Thanks for the info Carl.
07-30-2014 10:03 AM
I was the same way and managed to stumble upon the command myself a couple of years ago. No problem. Glad you found it helpful.
07-31-2014 07:53 AM
Ah, then perhaps something as simple as this would work:
event manager applet check-pri
event timer watchdog time 3600
action 001 cli command "enable"
action 002 cli command "show voice port summ | inc dorm"
action 003 foreach line $_cli_result "\n"
action 004 regexp "dorm" $line
action 005 if $_regexp_result eq 1
action 006 exit 0
action 007 end
action 008 end
action 009 mail from "user@example.com" to "user@example.com" subject "All PRI channels in use" body "All of the PRI channels are in use" server 10.1.1.1
07-31-2014 07:59 AM
So this basically looks for any lines that have "dorm" and if it matches, it exits the script? Doesn't that mean that if it comes across any channels that are actually in use then it is going to send the mail?
07-31-2014 08:08 AM
No. The first line that contains dorm will cause the policy to exit without sending the mail. If there are no dorm lines, it will send an email.
07-31-2014 08:11 AM
Gotcha. I missed the "| inc dorm" in the show line, which is why I was confused. Thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide