Skip to content

Instantly share code, notes, and snippets.

@a-a
Last active August 31, 2018 16:49
Show Gist options
  • Save a-a/16f6b8f3c55c63d9c964447fda9be2dd to your computer and use it in GitHub Desktop.
Save a-a/16f6b8f3c55c63d9c964447fda9be2dd to your computer and use it in GitHub Desktop.
Script to configure Cisco IAD2432-24FXS to switch 24 telephone ports locally.
#! /bin/bash
# Script to generate skeleton config for Cisco IAD2432-24FXS allowing it to switch 24 telephone ports locally. Extensions numbered 201-224. Apply this on top of a base (fresh from reset state) config to get phones to talk to each other.
for i in `seq 1 24`;
do
echo "voice-port 2/$(echo $(($i-1)))" #port 2/0
echo "ren 3"
echo "cptone gb"
echo "station-id number $(echo $(($i+200)))" #station-id 201
echo "exit"
done
for i in `seq 1 24`;
do
echo "dial-peer voice $i pots" #dial-peer 1
echo "destination-pattern $(echo $(($i+200)))" #destination pattern 201
echo "port 2/$(echo $(($i-1)))" #port 2/0
echo "exit"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment