cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
1468
Views
0
Helpful
2
Replies

EEM Script to stop SIP service if a network route disappears from the routing table

Piotr Puchalski
Cisco Employee
Cisco Employee

Trying to run this on an ASR 1001-x with 3.13 code. It seemed to behave properly in the lab, but not on customer's router:

 

event manager applet WebEx_DOWN
 event routing network 62.109.194.64/26 type remove
 action 1.0 syslog msg "WebEx Route Lost - Disabling CUBE Service"
 action 2.0 cli command "enable"
 action 3.0 cli command "config t"
 action 4.0 cli command "voice service voip"
 action 5.0 cli command "sip"
 action 6.0 cli command "call service stop"
 action 7.0 cli command "end"
event manager applet WebEx_UP
 event routing network 62.109.194.64/26 type add
 action 1.0 syslog msg "WebEx Route Added - Enabling CUBE Service"
 action 2.0 cli command "enable"
 action 3.0 cli command "config t"
 action 4.0 cli command "voice service voip"
 action 5.0 cli command "sip"
 action 6.0 cli command "no call service stop"
 action 7.0 cli command "end"

 

When the route disappeared, there was a line in the syslog "WebEx Route Lost - Disabling CUBE Service", but the service was not stopped. I had to stop it myself. I then let it sit. Once the route reappeared, the message "WebEx Route Added - Enabling CUBE Service" showed up, but SIP did not start. Any ideas?

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

If you have AAA command authz enabled, then make sure you've configured "event manager session cli username USER", where USER is a name authorized to run all of the CLI commands in your applets.

 

If you still don't see the behavior you want, enable "debug event manager action cli" to see what the results of the CLI commands are.

View solution in original post

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

If you have AAA command authz enabled, then make sure you've configured "event manager session cli username USER", where USER is a name authorized to run all of the CLI commands in your applets.

 

If you still don't see the behavior you want, enable "debug event manager action cli" to see what the results of the CLI commands are.

Thanks Joe, I found another way to do it - authorization bypass, but I like your solution better. Much appreciated!