Skip to content
This text file shall document what I have done to configure the cisco 3845 ISR, as it accomplishes a number of functions in the network. Aside from being a packet router, it also functions as a phone switch (both analog and TDM) and as a terminal server. In the packet routing domain, it supports a wide variety of interfaces including but not limited to ethernet, T1 as data, asynchronous serial, and token ring. It supports a wide variety of packet protocols such as IP, DECnet, X.25, frame relay and others.
Due to the sheer number of purposes the ISR can serve in a network, it is important to document configuration changes made over time which can become riddled with idiosyncracies and workarounds to make the ISR work in a particular role.
The configuration noted in these notes is based on Cisco IOS C3845-ADVENTERPRISEK9_SNA-M version 15.1(4)M12a. Some parts may be based on IOS 12 running on a 2511.
TODO put stuff here about basic commands. enable, configure, 'no'. Help with '?'. 'write' command.
Also ^V to insert the '?' character into the config.
The 3845 and 2511 have a typical cisco pinout RJ45 for it's console port, default 9600 baud 8N1 no flow control.
On a newly defaulted system, IOS will automatically create a number of sections in the configuration based on the hardware present in the unit as well as some default options.
To default a system, delete startup-config and reboot, assuming you have enable access:
Router>enable Router#delete nvram:startup-config some confirmation follows Router#reload
On older IOS like the 2511, the command 'write erase' will do the trick.
You can view the configs by first enabling and running the 'show running-config' command:
Router>enable Router#sh run configuration text follows Router#
On older IOS versions, you may have to specify ip classless to allow subnets that don't match the traditional class A/B/C network scheme.
Assigning an IP (and subnet mask) to an interface is fairly straightforward.
Router(config)#interface GigabitEthernet 0/0 Router(config-if)#ip address 172.23.255.2 255.255.255.252 Router(config-if)#no shut
To set up IP routing, you first have to enable it.
For example, adding a default route via 172.23.255.1:
Router(config)#ip route 0.0.0.0 0.0.0.0 172.23.255.1
We can also add routes directly to interfaces:
cisco3845(config)#ip route 172.23.3.0 255.255.255.0 Serial0/2/1:1
RIP is a rather old and simple routing protocol. Of course, that means it's most likely to be supported on the old decrepit devices and operating systems we all know and love.
You can add a network to advertise on RIP as follows:
cisco2511(config)#router rip cisco2511(config-router)#network 172.23.0.0
Unfortunately, RIP only allows you to specify classful subnets on the cisco :( (well, it'll convert it into a classful one even if you put a classless subnet in)
And you can choose the RIP version too. Version 2 supports classless subnet advertising, so that's a pretty good reason to use it.
The passive-interface command may be useful for interfaces that should not send/receive RIP updates, even though the networks are advertised on other interfaces.
cisco2511(config-router)#passive-interface ethernet 0
you can add a BGP neighbor as follows:
cisco3845(config)#router bgp 64563 cisco3845(config-router)#neighbor 172.23.255.1 remote-as 64563 ! VyOS
This may not result in routes being redistributed to the neighbor, but this will cause the neighbor's routes to be picked up by the cisco.
The ISR line can support some layer 2 network encapsulations, like 802.1q (VLANs) on ethernet, or HDLC and PPP on synchronous serial interfaces, among others. The encapsulations supported depend on the interface which they are applied to (e.g. Serial, Async, etc.):
Interfaces labeled as Serial on the cisco are generally some kind of synchronous serial. Asynchronous serial interfaces are labeled as Async instead.
Synchronous serial interfaces support a wide variety of encapsulations:
cisco3845(config)#interface Serial0/2/1:1 cisco3845(config-if)#encapsulation ? bstun Block Serial tunneling (BSTUN) frame-relay Frame Relay networks hdlc Serial HDLC synchronous lapb LAPB (X.25 Level 2) ppp Point-to-Point protocol sdlc SDLC sdlc-primary SDLC (primary) sdlc-secondary SDLC (secondary) smds Switched Megabit Data Service (SMDS) stun Serial tunneling (STUN) x25 X.25 cisco3845(config-if)#interface Async 4/0 cisco3845(config-if)#encapsulation ? bstun Block Serial tunneling (BSTUN) ppp Point-to-Point protocol slip Serial Line IP
Each encapsulation has it's own set of parameters to be configured.
PPP (point to point protocol) is often used as the layer 2 protocol on serial links and even occasionally ethernet (in the form of PPPoE). PPP supports a wide variety of features useful for static point to point links as well as dialup or temporary ones. It includes it's own automatic address selection mechanism for IP networks and also supports encapsulation a variety of other layer 3 protocols.
Below is an example of a basic static configuration, in this case used in conjunction with a router card in an Adit 600 channel bank as the far end device:
cisco3845(config)#interface Serial0/2/1:1 cisco3845(config-if)#description garage Adit 600 router card cisco3845(config-if)#ip unnumbered GigabitEthernet0/0 cisco3845(config-if)#encapsulation ppp
Quite a simple configuration. PPP will usually take care of detecting the address of the far end during it's link negotiations and IOS will automatically add the route for the single IP endpoint at the other side. In this case, since the Adit 600 router card is it's own router, we would do best to either set up a routing protocol or static routes for the subnets managed by the adit. These could either list the Adit's IP as the next hop, or list the PPP interface itself.
Frame relay is a protocol that is able to provide many virtual circuits using a packet oriented protocol over point to point links. Many protocols can be supported on those virtual circuits, and the cisco also has the ability to act as a frame relay router of a sort and simple switch those circuits through.
Virtual circuits are referred to by DLCI number. DLCI numbers need not be consistent everywhere in the frame relay network as it is possible to connect one DLCI on one link to a completely differen DLCI on another link.
As a very simple example, the following is a link to an Adit 600 channel bank using frame relay to carry IP management traffic. The Adit supports only a very simple IP connection utilizing RFC1490 over DLCI 16, and additionally does not support LMI which would allow some level of automatic configuration:
cisco3845(config)#interface Serial0/2/1:23 cisco3845(config-if)# description garage Adit 600 ipds0 management cisco3845(config-if)# ip address 172.23.255.17 255.255.255.252 cisco3845(config-if)# encapsulation frame-relay IETF cisco3845(config-if)# no keepalive ! the adit doesn't do LMI so maybe we need this cisco3845(config-if)# frame-relay map ip 172.23.255.18 16 IETF ! manually map the far end with the adit's IP cisco3845(config-if)# frame-relay interface-dlci 16 ! Adit uses DLCI 16
Because of the
frame-relay map ip line, IOS will automatically create a route for the far end of the link.
To enable the ssh server, you have to generate some crypto keys. In order to do that, cisco wants you to set both a hostname and a domain. Personally, I don't feel that setting a domain makes sense all the time, but there is a way around it by using the 'label' parameter.
Additionally, SSH v2 requires at least a certain key size, something like 768 bits perhaps. 2048 is the maximum supported by the 3845. Using more bits probably slows down the key negotiation process, but it only take a few seconds, so no big deal.
Router(config)#crypto key generate rsa label hostnamehereorwhateverelse modulus 2048 some output here, long delay while key gens Router(config)#ip ssh version 2
At this point, SSH should be turned on, at least. However, without any users, there's nothing to authenticate against.
For creating a user, you want to use 'secret' and not 'password' as the former hashes and the latter is plaintext. Privilege 15 makes the user go straight into full privilege 'enable' mode.
Router(config)#username admin privilege 15 secret putyourpasswordinplaceofthistext
Lastly, we need to set up login with local auth on the VTY terminal lines, which are the virtual terminals that the SSH server uses.
Router(config)#line vty 0 4 Router(config-line)#login local
After that, you should be able to log in over SSH using the user account that was created.
As an extension to the ssh server, the ISR can also support scp for transferring files.
cisco3845(config)#ip scp server enable
Files can then be transfered using an scp utility similar to as follows:
scp firstname.lastname@example.org:nvram://startup-config ./junk/
For the TDM side of the MICA, see the T1/E1 configs.
In order for the modems to accept calls, the serial lines must be configured for modem InOut mode or similar.
cisco3845(config)#line 4/0 4/23 cisco3845(config-line)#modem InOut
For combination T1/E1 cards, you must first select whether the card is to be a T1 or E1 type. This is not necessary on cards that are only one fixed type. If the card type is changing, a reboot will be required. Be sure to save the config before rebooting. No reboot is necessary if the card type was not previously configured.
cisco3845(config)#card type t1 0 3 cisco3845(config)#card type t1 2
IOS will automatically create the controller entries afterwards:
controller T1 0/3/0 cablelength long 0db ! controller T1 0/3/1 cablelength long 0db ! controller T1 2/0 cablelength long 0db
T1 and E1 are synchronous digital trunks utilizing TDM. As such, clocking is rather important to the proper functioning particularly when used for voice. Clocking gets more advanced than this, but at a minimum you must specify that the cards participate in clocking for use as voice devices.
cisco3845(config)#network-clock-participate wic 3 cisco3845(config)#network-clock-participate slot 2
Different card models have different default parameters. It's generally a good idea to run through all of the paramaters available and ensure they are set properly rather than assuming linecode, framing, etc. will be correct. 0/3/1 is set to use the ISR's internal clock, providing clock to the line. 2/0 is set to get clock *from* the line.
Most of the time, the thing 'serving' the T1 provides clock, while the device on the other end uses the line clock. Whatever the case, one end must provide clocking and the other end must synchronize to the line. A decent bet is that if a device has no option to explicitely provide clocking, it most likely only supports using the line clock.
cisco3845(config)#controller T1 0/3/1 cisco3845(config-controller)#clock source internal cisco3845(config-controller)#framing esf cisco3845(config-controller)#linecode b8zs cisco3845(config-controller)#cablelength short 110ft cisco3845(config-controller)#exit cisco3845(config)#controller t1 2/0 cisco3845(config-controller)#clock source line cisco3845(config-controller)#framing esf cisco3845(config-controller)#linecode b8zs cisco3845(config-controller)#cablelength short 110ft cisco3845(config-controller)#exit
Configuration for T1 data on a channelized T1 controller involves setting up a channel-group for all of the channels used for data on that particular T1. We can also divide up the T1 between voice, and even multiple data streams.
As an example, here is the configuration for a pair of data links on the same T1 to an Adit 600 channel bank. In this case, 1 channel is reserved for a TDM cross connect, 22 channels are to be used for general data usage, and the last channel is used for a dedicated management link:
cisco3845(config)#controller t1 0/2/1 cisco3845(config-controller)#tdm-group 0 timeslots 1 type fxo loop-start cisco3845(config-controller)#channel-group 1 timeslots 2-23 cisco3845(config-controller)#channel-group 23 timeslots 24
This configuration results in two new Serial interfaces being created,
Serial 0/2/1:1 for the first
Serial0/2/1:23 for the second
T1 DSU/CSU cards do not do voice, and as such do not have a 'controller' section. Instead, they are used for Serial interfaces only, and all their configuration is done within that section.
The configurating for framing, clocking, linecode, line buildout, etc. are configured using the service-module command:
cisco3845(config)#interface Serial 1/0/0 cisco3845(config-if)#service-module t1 cablelength short 110ft cisco3845(config-if)#service-module t1 clock source internal cisco3845(config-if)#service-module t1 data-coding normal cisco3845(config-if)#service-module t1 framing esf cisco3845(config-if)#service-module t1 linecode b8zs cisco3845(config-if)#service-module t1 timeslots all speed 64 cisco3845(config-if)#no shut
Translations are a way to have the cisco perform processing on called and calling numbers beyond the usual basic 'forward-digits' type of settings. The translation-rules (a set of regex statements) are included in translation-profiles which are in turn included on dial-peers on an incoming or outgoing basis. Outgoing translations only take effect when the dial-peer is used as the outgoing dialpeer in a call, and incoming translations only take effect when the dial-peer is used as the incoming dial-peer in a call.
For example, rule 100 matches the first 4 digits from a number and replaces it with nothing. This is used to strip a prefix from the called number.
Rule 200 matches an (internal) 4 digit extension beginning with a digit 2-9. It is replaced with a prefix followed by the extension number that matched. This is used to process an internal calling number into a more meaningful one for external presentation.
voice translation-rule 100 rule 1 /^..../ // ! voice translation-rule 200 rule 1 /^\([2-9]...$\)/ /563\1/ ! ! voice translation-profile scdp-outbound-7d translate calling 200 translate called 100 dial-peer voice 800 voip description trmg h323 scdp translation-profile outgoing scdp-outbound-7d preference 1 destination-pattern 122287.... session target ipv4:172.27.127.1 codec clear-channel bytes 80
To do any ISDN, you must select a switch type for ISDN 'flavor' or style. Note that this is *just* a default and can be overridden on any particular PRI.
NI2 is a good bet for most devices, though some older devices may only support pre-standard switch types, or may have presets for more specific switch types. Some of the other presets are really close to NI2 anyway. QSIG is also good for tie-lines between PBXes since it supports a number of extra features that don't always make sense for a PSTN connection.
cisco3845(config)#isdn switch-type primary-5ess
Once the switch type and clock participation are configured, the PRI groups can get added to the controllers.
cisco3845(config)#controller T1 0/3/1 cisco3845(config-controller)#pri-group timeslots 1-24 cisco3845(config-controller)#exit cisco3845(config)#controller t1 2/0 cisco3845(config-controller)#pri-group timeslots 1-24 cisco3845(config-controller)#exit
Adding the PRI groups will create the serial interface and voice port for each pri-group. Note that 0/3/1:23 in this example is a VWIC2-2MFT-T1/E1 while 2/0 is a NM-1CE1T1-PRI which provides the T1 interface for a MICA NM. The NM-1CE1T1-PRI does not support voice traffic and as such does not get a voice-port.
interface Serial0/3/1:23 no ip address encapsulation hdlc isdn switch-type primary-5ess isdn incoming-voice voice no cdp enable ! interface Serial2/0:23 no ip address encapsulation hdlc isdn switch-type primary-5ess no cdp enable ! voice-port 0/3/1:23 !
Once the pri-groups have been added, the interfaces need to be configured. One side of a PRI must be configured to emulate the network while the other side should act as the CPE.
cisco3845(config)#interface Serial 0/3/1:23 ! this example is emulating the network, to serve another device cisco3845(config-if)#isdn protocol-emulate network cisco3845(config-if)#isdn map address .* plan isdn type national cisco3845(config-if)#isdn send-alerting
Configuration of a PRI for a MICA is slightly different. The important point is isdn incoming-voice modem.
cisco3845(config)#interface Serial 2/0:23 ! this example for NM-1CE1T1-PRI or similar only, for use with MICA cisco3845(config-if)#isdn incoming-voice modem cisco3845(config-if)#isdn map address .* plan isdn type national cisco3845(config-if)#isdn send-alerting
The voice port for a PRI doesn't tend to need much config. Not clear if this is necessary, but:
cisco3845(config)#voice-port 0/3/1:23 cisco3845(config-voiceport)#no non-linear cisco3845(config-voiceport)#no vad cisco3845(config-voiceport)#no comfort-noise
For a trunk like a PRI, there are some slightly different parameters from a single-line destination like FXS. For the MICA, which does not discriminate on destination numbers, we can forward 0 digits. On other trunks, the forward digits parameter determines how many digits to send along to the far switch.
cisco3845(config)#dial-peer voice 100 pots cisco3845(config-dial-peer)#destination-pattern 9000 cisco3845(config-dial-peer)#supplementary-service pass-through cisco3845(config-dial-peer)#direct-inward-dial cisco3845(config-dial-peer)#port 0/3/1:23 cisco3845(config-dial-peer)#forward-digits 0
The MICA modems generally appear as a bunch of serial lines, and are more or less configured as such. See other notes on configuring serial lines.
However, there are some MICA specific steps to configure the modems themselves.
cisco3845(config)#modem country mica t1-default
If connections to the MICA are carried over VoIP, the fax detection seems to just perfectly kill the autonegotiation sequence when it switches the VoIP settings. Of course that forces the modems down to 2400 baud max. So we turn off the fax stuff to prevent this.
cisco3845(conf-voi-serv)#fax protocol none
The following section applies specifically to the VIC2-2BRI-NT/TE interface card. While other BRI modules exist, their configuration may be different. Additionally there are several BRI modules that can't be used for voice purposes and are data-only devices.
These cards can be configured for trunk usage, or to support ISDN BRI telephones.
For connecting BRI stations to the VIC2-2BRI-NT/TE, you will need a BRI crossover cable or adapter.
The ISDN BRI interface needs to be shut down for various configuration changes. For driving phone sets, the interface should of course emulate the network. This is set with the isdn protocol-emulate and isdn layer1-emulate commands. Additionally, the BRI interface can be set to provide power to ISDN devices with the line-power command. The ISDN switch type should be set as appropriate. Overlap receiving will need to be turned on for dialing that is not en-bloc. For whatever reason, isdn incoming-voice voice needs to be set as well. Lastly, the configured spids need to match the ISDN set as well.
cisco3845(config)#interface BRI0/2/0 cisco3845(config-if)#shut cisco3845(config-if)#isdn protocol-emulate network cisco3845(config-if)#isdn layer1-emulate network cisco3845(config-if)#line-power cisco3845(config-if)#isdn switch-type basic-ni cisco3845(config-if)#isdn overlap-receiving cisco3845(config-if)#isdn incoming-voice voice cisco3845(config-if)#isdn spid1 22256394020000 cisco3845(config-if)#no shut
I'll also note that a Tone Commander ISDN set in particular hangs up trying to detect switch type. The only workaround I've found for this issue is to shut the interface, wait for the tone commander to show the 5ESS switch type, then no shut the interface. This works at least with the basic-ni switch type.
Some configuration needs to be done to enable VoIP.
One important point on certain IOS devices is that ip routing must be enabled to make VoIP work. I don't know why this is, but it cost me many hours on an IAD2432 that had 1 way audio issues only to find this tiny error.
Then there are various aspects of the VoIP service that need configuration
cisco3845(config)#voice service voip cisco3845(conf-voi-serv)#allow-connections h323 to sip cisco3845(conf-voi-serv)#allow-connections sip to h323 cisco3845(conf-voi-serv)#allow-connections sip to sip cisco3845(conf-voi-serv)#allow-connections h323 to h323 cisco3845(conf-voi-serv)#redirect ip2ip cisco3845(conf-voi-serv)#signaling forward unconditional cisco3845(conf-voi-serv)#sip cisco3845(conf-serv-sip)#bind control source-interface GigabitEthernet 0/0 cisco3845(conf-serv-sip)#bind media source-interface GigabitEthernet 0/0 cisco3845(conf-serv-sip)#bearer-capability clear-channel audio cisco3845(config)#voice class codec 1 cisco3845(config-class)#codec preference 1 g711ulaw
Another good thing to note is that IOS doesn't seem to let you actually turn off VAD. You can tell it to turn off VAD, but it won't do it. The workaround is to set the timeout really high.
cisco3845(config)#voice vad-time 65536
Here is an example dial-peer for SIP
dial-peer voice 100 voip preference 10 destination-pattern .+T session protocol sipv2 session target ipv4:192.168.2.6 session transport udp dtmf-relay rtp-nte codec g711ulaw no vad
And another for H323
dial-peer voice 800 voip description trmg h323 scdp translation-profile outgoing scdp-outbound-7d preference 1 destination-pattern 122287.... session target ipv4:172.27.127.1 codec clear-channel bytes 80
Note the codec here is clear-channel. Generally, this should only be used for connections that don't carry human-heard audio. Can be useful sometimes for data (either via modem/fax modem or as a raw DS0). The clear-channel setting can cause the ISR to interpret the audio weird and do some odd transcoding.
One cool thing we can do with VoIP is to establish what amount to virtual DS0s using nailed-up VoIP calls between two ISRs. It seems that any two voice-ports can be used for this. The first step is to establish VoIP trunking between the two ISRs as above (H323, as I don't know that SIP supports this).
Once that's done, the 'connection trunk xxxx' option will be used on one voice-port and 'connection trunk xxxx answer-mode' on the voice port on the other end. Below is an example to cross connect a T1 CAS DS0 from one ISR to another with loopstart signalling. While this example involves a CAS T1 on both ISRs, it is also possible to carry a data or signalling channel such as a PRI D channel (using the clear-channel codec), or link any two compatible voice-ports.
On the first ISR:
controller T1 0/2/0 ds0-group 1 timeslots 2 type fxo-loop-start description Meridian line-side T1 voice-port 0/2/0:1 output attenuation 0 timeouts call-disconnect 3 connection trunk 8718000 dial-peer voice 900 pots destination-pattern 5632000 port 0/2/0:1
And on the second:
controller T1 0/0/0 ds0-group 6 timeslots 7 type fxs-loop-start description Adit T1 voice-port 0/0/0:6 output attenuation 0 timeouts call-disconnect 3 connection trunk 5632000 answer-mode dial-peer voice 900 pots destination-pattern 8718000 port 0/0/0:6
Note than any translations present on dialpeers must be taken into account when determining the called and calling numbers to match in the connection trunks.
Useful References: Configuring and Troubleshooting Transparent CCS | Configuring Connection Trunk for VoIP Gateways
Some potentially relevant settings on the voice-port
voice-port 3/0/2 no battery-reversal no vad no comfort-noise caller-id enable ring frequency 20
example analog dial-peer:
dial-peer voice 1 pots huntstop destination-pattern 9001 port 3/0/0
huntstop is useful to specify often times. If the line is busy, the cisco will hunt to the next matching dialpeer. This can sometimes produce undesired behavior if there are catch-all type dial peers used to catch calls that don't match other dial peers. Using huntstop prevents the call from going to unexpected places.
Some potentially relevant settings on the voice-port
voice-port 0/0/0 no battery-reversal no comfort-noise dial-type dtmf ring number 10
There does not appear to be a way to prevent the FXO port from answering entirely, and 10 is the maximum number of rings configurable. If the FXO port isn't setup to connect to some sort of destination, it'll give reorder when it answers.
Use 'forward-digits' to control what digits are sent to the FXO to be dialed. For example, here is a 'trunk code' type dial peer which sends no digits and allows the user complete control of the line:
dial-peer voice 202 pots description PSTN destination-pattern 6100 port 0/0/0 forward-digits 0 huntstop
Conversely, a dial peer that matches 1+10 digit dialing and dials the number on the FXO interface:
dial-peer voice 200 pots description PSTN destination-pattern 1.......... port 0/0/0 forward-digits all huntstop
The ISR lines support IVR applications written in TCL. These can be useful to add features to the ISR that don't normally exist.
There are three parts to a TCL IVR: the script itself, the definition for the application, and the dial-peer(s).
The script itself must be written to conform with the IVR API that Cisco exposes for the purpose. Once it is written, it can simply be placed on the filesystem of the CF card. There are other ways to pull in the script file, but I'll leave that as an exercise for the reader for now (in general, the cisco IOS platoform supports a few different file access methods including some network based ones like TFTP).
For the purposes of and example for this section, we'll use a simple script to play a media file. The TCL script file will be called playback.tcl and is contained in this package of some example scripts I've made and modified that I've found useful. We will be placing scripts in the root of the CF card to keep things simple, but you can create directory structures to keep things organized.
As far as audio files for prompts go, you can put any generic audio file anywhere in storage (or access via other methods) so long as you refer to it correctly.
However, the TCL IVR scripting has some amount of multi-language support and that includes some functions that allow readback of numbers, characters, times, dates, etc. The organization for these files depends on how the language support is configured, but in general it involves prefixing a file name with a language prefix (like 'en' for english) and referring to a specific location parameter to find the files. Some files are used by the built-in functions such as digit readback which uses the files 'en_zero.au', 'en_one.au', etc.
I've included some of the necessary audio files in the examples package showing the organization I decided to use.
And lastly, if you are having trouble figuring out what file the system is looking for, you may want to enable media debug with 'debug voice application media state'. This can result in a lot of output, but you should see some entries like the following:
*Sep 24 21:03:21.311: //-1//DPM :/du_get_vpPromptNameExt: name=_two.au *Sep 24 21:03:21.311: //-1//DPM :/du_get_vpPromptNameExt: name=_three.au *Sep 24 21:03:21.311: //-1//DPM :/du_get_vpPromptNameExt: name=_zero.au *Sep 24 21:03:21.311: //-1//DPM :/du_get_vpPromptNameExt: name=_zero.au
By using these messages and others, you can troubleshoot which prompts you might be missing and fill them in.
Adding the definition for the application is done as follows:
cisco3845(config)#application cisco3845(config-app)#service bowlofhats flash:/playback.tcl cisco3845(config-app-param)#*Sep 24 20:09:02.903: //-1//HIFS:/hifs_ifs_cb: hifs ifs file read succeeded. size=851, url=fl *Sep 24 20:09:02.907: //-1//HIFS:/hifs_free_idata: hifs_free_idata: 0x7067E764 *Sep 24 20:09:02.907: //-1//HIFS:/hifs_hold_idata: hifs_hold_idata: 0x7067E764 cisco3845(config-app-param)#param playback-file flash:/bowlofhats.au Warning: parameter playback-file has not been registered under bowlofhats namespace cisco3845(config-app-param)#exit cisco3845(config-app)#exit cisco3845(config)#
This defines an application named 'bowlofhats' that uses the TCL script from the CF card (flash:/) named playback.tcl. We also set up a parameter called 'playback-file' set to the file name we want to play.
If you get a warning about the parameter not existing in the namespace, but you're sure that it does, you can probably safely ignore it.
Scripts that make use of some of the built-in readback functionality of the TCL API need some additional language configuration:
cisco3845(config)#application cisco3845(config-app)#service anac flash:/anac.tcl cisco3845(config-app-param)# *Sep 24 20:46:30.879: //-1//HIFS:/hifs_ifs_cb: hifs ifs file read succeeded. size=541, url=fl *Sep 24 20:46:30.879: //-1//HIFS:/hifs_free_idata: hifs_free_idata: 0x7067E230 *Sep 24 20:46:30.879: //-1//HIFS:/hifs_hold_idata: hifs_hold_idata: 0x7067E230 cisco3845(config-app-param)#paramspace english location flash:/media/en/ cisco3845(config-app-param)#paramspace english index 1 cisco3845(config-app-param)#exit cisco3845(config-app)#exit cisco3845(config)#
There are two ways to set up a dial-peer for an IVR service. The first way is to match on an inbound dial-peer using 'incoming called-number.'
cisco3845(config)#dial-peer voice 1500 pots cisco3845(config-dial-peer)#service bowlofhats cisco3845(config-dial-peer)#incoming called-number 4287 cisco3845(config-dial-peer)#
However, this will only match on calls that come in on trunks, basically, because it has to match the on an inbound call that has dialed certain digits. Specifically, this can't really be accomplished for calls that come in on FXS ports and other overlap-dialing type scenarios. The solution, then, is to instead use an outbound dial-peer which has to be constructed somewhat differently. The IVR script also has some differences, and so for this reason the announcement.tcl script has been crafted to work with outbound dial-peers.
cisco3845(config)#dial-peer voice 1500 voip cisco3845(config-dial-peer)#service bowlofhats out-bound cisco3845(config-dial-peer)#destination-pattern 4287 cisco3845(config-dial-peer)#session target loopback:rtp cisco3845(config-dial-peer)#exit cisco3845(config)#
In this case, we set the service up as out-bound and match on a destination-pattern. In order for the dial-peer to be valid, we must have SOME destination, and the service itself doesn't count. For that reason, we set it up as a voip dial-peer and provide the session target as loopback:rtp, but this does not actually get used.
We're also supposed to be able to set parameters in the dial-peer. However, I can't get this to work with out-bound services, and I haven't actually tried normal ones. Modifying the peers from above, we can set the welcome-prompt parameter to any file we want. You may need to shut and no shut the dial-peer to restart the IVR script.
cisco3845(config)#dial-peer voice 1500 cisco3845(config-dial-peer)#paramspace bowlofhats welcome-prompt flash:/rickroll.au Warning: parameter welcome-prompt has not been registered under announcement namespace cisco3845(config-dial-peer)#exit cisco3845(config)#
When the application is first configured (or when IOS first boots and loads the configuration), IOS will load the TCL script into memory. Similarly, when audio files are played, they will be cached in memory.
At times, during development especially, it will be necessary to force a reload of the TCL script or audio files which have changed. There are two commands to accomplish these tasks.
cisco3845#call application voice load bowlofhats cisco3845# *Sep 24 20:30:59.051: //-1//HIFS:/hifs_ifs_cb: hifs ifs file read succeeded. size=849, url=fl *Sep 24 20:30:59.051: //-1//HIFS:/hifs_free_idata: hifs_free_idata: 0x7067E3EC *Sep 24 20:30:59.051: //-1//HIFS:/hifs_hold_idata: hifs_hold_idata: 0x7067E3EC cisco3845# cisco3845#audio-prompt load flash:/bowlofhats.au Reload of flash:/bowlofhats.au successful cisco3845#
Between T1s, you can instruct the cisco ISR to bridge two channels without touching any of the information within them. This only works between T1s that have compatible framing, since ESF technically supports more signalling bits when doing bitrobbing and cannot directly be coupled to SF T1s.
For each T1 with channels to be cross connected, one or more tdm-groups must be created in the controller for those channels.
cisco3845(config)#controller T1 0/2/0 cisco3845(config-controller)#tdm-group 0 timeslots 1 type fxs loop-start cisco3845(config-controller)#exit cisco3845(config)#controller T1 0/2/1 cisco3845(config-controller)# tdm-group 0 timeslots 1 type fxo loop-start cisco3845(config-controller)#exit
Two tdm-groups can be connected with the 'connect' command entered at the top level of the IOS configuration.
cisco3845(config)#connect adit-meridian T1 0/2/0 0 T1 0/2/1 0 cisco3845(config-tdm-conn)#exit