Cisco 4331 - Inactive Analogue Line Alerts
Company: System Technician 2
- Some analogue lines would constantly go down without notice, so I was tasked to find a no-cost solution for this problem. There are devices which can do this quite easily, however they are not cost efficient for 50 sites, so I did a good deal of research, and this is what I came up with.
- For the test calls, you need a number that people will not be calling, as you must create a dial plan for it on the voice router and force it out the FXO port(s). For a second port I just added a 1 to the front, which POTS would still accept for connecting a call. Otherwise, the red text shows the variables you have to enter that are specific to the site/router.
event manager environment _mail_smtp EMAIL_SERVER_NAME | |
event manager environment _mail_rcpt2 PRIMARY_EMAIL | |
event manager environment _mail_rcpt2 SECONDARY_EMAIL | |
event manager environment _mail_domain YOUR_DOMAIN | |
event manager environment _info_routername NAME_OF_DEVICE | |
event manager applet DESCRIPTIVE_APPLET_NAME_PORT_1 | |
action 10 cli command "enable" | |
action 20 cli command "csim start EXTERNAL_TEST_NUMBER_TO_CALL" | |
action 32 if $_regexp_result eq "1" | |
action 33 mail server "$_mail_smtp" to "$_mail_rcpt1 $_mail_rcpt2" from "$_info_routername@$_mail_domain" subject "$_info_routername voice-port 0/1/0 down" body "$_cli_result" | |
action 34 snmp-trap strdata "Voice-port 0/1/0 Failed" | |
action 40 end | |
event manager applet DESCRIPTIVE_APPLET_NAME_PORT_2 | |
action 10 cli command "enable" | |
action 20 cli command "csim start EXTERNAL_TEST_NUMBER_TO_CALL" | |
action 30 regexp "[0-9]+.*failed = 1" "$_cli_result" | |
action 31 puts "$_regexp_result" | |
action 32 if $_regexp_result eq "1" | |
action 33 mail server "$_mail_smtp" to "$_mail_rcpt1 $_mail_rcpt2" from "$_info_routername@$_mail_domain" subject "$_info_routername voice-port 0/1/1 down" body "$_cli_result" | |
action 34 snmp-trap strdata "Voice-port 0/1/1 Failed" | |
action 40 end |