03-14-2024 08:45 AM
I am looking to improve upon the EEM script I have written below to reset voice-ports that are in a parked state. As of now I have the following 2 applets written for each and every voice port on the router, 0/[0-3]/[0-3]:[0-23] .
I am not having much luck simplifying this down using nested loop statement and/or regex to loop through each voice port .
Would someone mind pointing me in the right direction. Thank you!
event manager applet PARK_MONITOR_0/0/0:0
description MONITOR HOOT PORT 0/0/0:0 FOR PARK STATUS
event timer watchdog time 300 maxrun 65
action 1.0 cli command "enable"
action 1.2 cli command "show voice call summ | include 0/0/0:0"
action 1.3 regexp "ONHOOK" "$_cli_result"
action 1.4 if $_regexp_result eq "1"
action 1.5 cli command "event manager run HOOT_RESET_0/0/0:0"
action 1.6 end
event manager applet HOOT_RESET_0/0/0:0
description AUTOMATED HOOT PORT 0/0/0:0 TOGGLE BITS FOR PARK_MONITOR_0/0/0:0
event none
action 1.0 cli command "enable"
action 1.1 cli command "config t"
action 1.2 cli command "voice-port 0/0/0:0"
action 1.3 cli command "define Rx-bits seize 0000"
action 1.4 cli command "define Rx-bits seize 1111"
action 1.5 cli command "exit"
action 1.6 syslog priority notifications msg "HOOT 0/0/0:0 has been reset by EEM" facility "EEM-FAC"
03-14-2024 09:07 AM
check below thread definish port range and checking each port and do the reset :
03-14-2024 09:10 AM
The first EEM use watchdog the second one the even is none meaning it need to run manually
MHM
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