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

EEM script to notify if a transcoder is invoked on a 4431 CUBE

pguibord
Level 1
Level 1

Cisco TAC does not support EEM. Below is the verbiage from the ticket. Can someone please assit?

 

My EEM script has parts that at are recycled from existing working scripts and part that I lifted from Cisco's website. Ultimately I want to send an email notification (from the working script) if the output in the "show sccp connection" contains the verbiage xcode. Right now I am testing it if a conference bridge is established (conf) and the script is not working. Once I get it working it will be used to see if a transcoder (xcode) is established. Attached to the ticket is the full CUBE config and version but this is the EEM script:

event manager environment _email_server 10.100.50.60
event manager environment _info_routername rtr01-liv-sbc@aaalife.com
event manager environment _email_from rtr01-liv-sbc@aaalife.com
event manager environment _email_to wan-outage@aaalife.com
event manager session cli username "netadmin"
event manager applet xcode_trace authorization bypass
event timer watchdog time 15
action 0001 cli command "enable"
action 0002 cli command "term exec prompt timestamp"
action 0003 cli command "term length 0"
action 0010 cli command "show sccp connection | in conf"
action 0020 regexp ".*(conf).*" "$_cli_result"
action 0030 if $_regexp_result ge "1"
action 0040 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Xcode established on rtr01-liv-sbc" body "$_cli_result"
action 0041 syslog msg "Xcode established alert has been sent to email server"
action 0042 cli command "exit"
action 0043 cli command "end"


This is the output of the show sccp connection when a conference bridge is established:

rtr01-liv-sbc#sh sccp conn
rtr01-liv-sbc#sh sccp connections
sess_id conn_id stype mode codec sport rport ripaddr conn_id_tx dtmf_method

33699121 33702041 conf sendrecv g711u 11486 21206 192.168.149.62 none
33699121 50432977 conf sendrecv g711u 11484 24802 192.168.149.62 none
33699121 33702039 conf sendrecv g711u 11482 26156 172.25.250.3 none

Total number of active session(s) 1, and connection(s) 3

1 Accepted Solution

Accepted Solutions

Dan Frey
Cisco Employee
Cisco Employee

Try using this in place of what your current policy has starting at 0030.   

 

action 0030 if $_regexp_result eq "1"
action 0040 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Xcode established on rtr01-liv-sbc" body "$_cli_result"
action 0041 syslog msg "Xcode established alert has been sent to email server"
action 0042 else
action 0043 syslog msg "regex did not match"

action 0044 end

 

View solution in original post

2 Replies 2

Dan Frey
Cisco Employee
Cisco Employee

Try using this in place of what your current policy has starting at 0030.   

 

action 0030 if $_regexp_result eq "1"
action 0040 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Xcode established on rtr01-liv-sbc" body "$_cli_result"
action 0041 syslog msg "Xcode established alert has been sent to email server"
action 0042 else
action 0043 syslog msg "regex did not match"

action 0044 end

 

That worked Daniel! Thank you.

 

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: