×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

dial-peer busyout

Unanswered Question
Sep 22nd, 2014
User Badges:

Hi I'm new to EEM so please bare with me. I'm trying to get our CUBE to write to syslog when the dial-peer is busied out I this doesnt work but how do i get the applet to pick out the "busyout" from the output of the command? event manager applet CheckSIP-Trunk event timer watchdog time 60 action 1.0 cli command "enable" action 2.0 cli command "sh dial-peer voice | in options" action 3.0 if regexp $_cli_result eq busyout action 4.0 syslog priority critical msg "SIP status is not working. Please check service with Service Provider." action 5.0 end

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
shrikant.Nadiminti1 Tue, 12/13/2016 - 13:13
User Badges:

Hi Tony,


I could see in another forum that you finally found a way to monitor the dial-peer busy out through below EEM script.


event manager applet CheckSIP-Trunk
event timer watchdog time 60
action 2.0 cli command "sh dial-peer voice | in dial-peer action"
action 2.1 regexp "dial-peer action.*= ([a-z]+)," $_cli_result result result1
action 3.0 if $result1 eq "busyout"
action 3.1 syslog priority critical msg "SIP status is not working. Please check service with Service Provider."
action 3.4 end


can you explain below 3 commands with syntax, i would like to know what each command does.

action 2.0 cli command "sh dial-peer voice | in dial-peer action"
action 2.1 regexp "dial-peer action.*= ([a-z]+)," $_cli_result result result1
action 3.0 if $result1 eq "busyout"


tony loktu Wed, 12/14/2016 - 02:12
User Badges:

Hei Shrikant


In short:

action 2.0 cli command "sh dial-peer voice | in dial-peer action"
Runs the command "show dial-peer voice | include dial-peer action"


action 2.1 regexp "dial-peer action.*= ([a-z]+)," $_cli_result result result1
Runs regexp on the output and places it in a variable called result1

action 3.0 if $result1 eq "busyout"
compares the variable to "busyout"

And if it does, then send "SIP status is not working. Please check service with Service Provider." to syslog.

Did that make sense?

/Tony

Actions

This Discussion