11-12-2015 04:05 PM
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 .......
Solved! Go to Solution.
11-16-2015 11:13 AM
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
11-13-2015 10:30 AM
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?