cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1419
Views
0
Helpful
2
Replies

HELP Needed: scheduled EEM script to find which VG224 voice-ports are in "REM_ONHOOK_PEN", and then bounce them

Hi,

 EEM newbie here, so please go easy on me ;)

 

I have several VG224's that randomly get the state "REM_ONHOOK_PEN" and when you pickup the analog phone attached to that VG224 port, you dont hear a dialtone. We opened a TAC case, sent debugs to them too, but so far they just said upgrade IOS from 15.x.M7 to M9, but the issue persists.. still nothing solid

 

So far our fix was either:

- go into CUCM and push and "apply config" and it bounces the port and it starts to work again.

- CLI into the afflicted VG224 and manually shut/no shut the port

 

What I am needing help with is if anyone can provide a script to:

- every hour (or 4 hours, or 8 hours), EEM script wakes up (time can be configurable)

- do a "sh stcapp dev sum | include REM_ONHOOK_PEN"

- get all the ports (awk?) that have this state (ex. voice-port 2/0, 2/1, 2/9)

- go into a foreach loop to reset ONLY the ports that was identified with REM_ONHOOK_PEN :

    enable

    config t

    voice-port X/Y

    shut

    no shut

    exit

- exit the loop

- wait for 60 minutes (or whatever the sleep time above was) and repeat the process again.

 

 

this is what the CLI output looks like with port in "locked" state.. see port 2/0 and 2/2

 

VG224-GW#sh stcapp dev sum        
Total Devices:           24
Total Calls in Progress: 0
Total Call Legs in Use:  0

Port       Device          Device   Call          Dev     Directory   Dev
Identifier Name            State    State         Type    Number      Cntl
---------- --------------- -------- ------------- ------- ----------- ----
2/0        AN7D4FAE4C4C400 IS       REM_ONHOOK_PENALG     5432        CCM
2/1        AN7D4FAE4C4C401 IS       IDLE          ALG     5430        CCM
2/2        AN7D4FAE4C4C402 IS       REM_ONHOOK_PENALG     5431        CCM
2/3        AN7D4FAE4C4C403 OOS      UNREGISTERED  ALG                 UNKN
2/4        AN7D4FAE4C4C404 OOS      UNREGISTERED  ALG                 UNKN
2/5        AN7D4FAE4C4C405 OOS      UNREGISTERED  ALG                 UNKN
2/6        AN7D4FAE4C4C406 OOS      UNREGISTERED  ALG                 UNKN
2/7        AN7D4FAE4C4C407 OOS      UNREGISTERED  ALG                 UNKN

Thanks for looking into this!

 

 

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

This applet should work.

 

event manager applet reset-voice-port

 event timer watchdog time 3600

 action 001 cli command "enable"

 action 002 cli command "config t"

 action 003 cli command "sh stcapp dev sum | include REM_ONHOOK_PEN"

 action 004 foreach line $_cli_result "\n"

 action 005  regexp "^([0-9]+/[0-9]+) .*REM_ONHOOK_PEN" $line match vport

 action 006  if $_regexp_result eq 1

 action 007   cli command "voice-port $vport"

 action 008   cli command "shut"

 action 009   cli command "no shut"

 action 010  end

 action 011 end

 action 012 cli command "end"

Very late (3 years) update...

 

We found the culprit. It was our Cisco Prime Collaboration Assurance. It ran a check-up script to randomly dial our internal 4-digit extension phones and it was not programmed to bypass the range assigned for the VG224's and when the script ran and "tested" those numbers.. it caused the VG224 ports to "lock up".

 

We discovered it by looking at wiresharks to the VG224's and found that our Prime Collab Assurance box "connect" to the VG224 and runs the test at a specific schedule and shortly after that the ports lock up. :D

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: