cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1421
Views
5
Helpful
6
Replies

EMM Script to monitor voice calls longer than 100 seconds.

levpham
Cisco Employee
Cisco Employee

Hi Team,

Customer would like to be notified when calls are longer than 100 seconds.  The 2 scripts below aren't working.  The email notification part is working fine.  It is the "if" statement that isn't.  Please help.  Thanks in advance.

event manager applet Long_Call
event none
action 1.1 cli command "enable"
action 1.2 cli command "show isdn active"
action 1.3 regexp "Seconds" "$_cli_result"
action 1.4 if $_regexp_result gt "100"
action 2.0 mail server.......

...

event manager applet Long_Call
 event timer watchdog name Timer time 60
 action 1.0 cli pattern "show isdn active" sync yes
 action 1.2 cli command "enable"
 action 1.3 cli command "show isdn active"
 action 1.4 if ^SecondsUsed gt "100" goto 2.0 
 action 1.5 end
action 2.0 mail server .......

1 Accepted Solution

Accepted Solutions

Try this one.

event manager applet Long_Call
event none
action 010 cli command "enable"
action 020 cli command "show isdn active"

action 030 foreach result $_cli_result

action 040 regexp "[A-Za-z]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+" "$result" match seconds

action 050 if $seconds gt "100"

action 060 mail server "

action 070 end

action 080 end

View solution in original post

6 Replies 6

Dan Frey
Cisco Employee
Cisco Employee

What does "show isdn active" show when there are calls established?   Do you want an email for each call that is over 100 seconds or,    one email if one of XX number of calls goes over 100s?