Полезная информация


Table of Contents

Asynchronous DDR
Preparation Commands

Asynchronous DDR
Preparation Commands

This chapter describes the commands required in the preparation steps to be completed before you configure DDR on asynchronous serial interfaces on the router.

For the preparation tasks and configuration examples, refer to the "Preparing for Asynchronous DDR" chapter in the Dial Solutions Configuration Guide.


To create a script that will place a call over a modem, use the chat-script global configuration command. To disable the specified chat script, use the no form of this command.

chat-script script-name expect-send
no chat-script script-name expect-send

Syntax Description


Name of the chat script.


Pairs of information elements: an item to expect and an item to send in response.


No chat scripts are defined.

Command Mode

Global configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 10.0.

Chat scripts are used in dial-on-demand routing (DDR) to give commands to dial a modem and commands to log on to remote systems. The defined script will be used to place a call over a modem.

Some characteristics of chat scripts are as follows:

We recommend that one chat script (a "modem" chat script) be written for placing a call and another chat script (a "system" or "login" chat script) be written to log on to remote systems, where required.

Suggested Chat Script Naming Conventions

A suggested chat script naming convention is as follows:


If you follow this convention, the syntax of the chat-script command becomes the following:

chat-script vendor-type-modulation expect-send

For example, if you have a Telebit T3000 modem that uses V.32bis modulation, you would name your chat script as follows:


The chat-script command could become the following:

chat-script telebit-t3000-v32bis ABORT ERROR ABORT BUSY ABORT "NO ANSWER" "" "AT H" OK 

For example, you could have script names like the following:

Adhering to this naming convention allows you to use partial chat script names with regular expressions to specify a range of chat scripts that can be used. This capability is particularly useful for dialer rotary groups and is explained further in the next section.

Chat scripts are in the form expect-send, where the send string following the hyphen (-) is executed if the preceding expect string fails. Each send string is followed by a return unless it ends with the escape sequence \c. The sequence ^x is translated into the appropriate control character, and the sequence \x is translated into x if \x is not one of the special sequences listed in Table 117.

See the book entitled Managing uucp and Usenet by Tim O'Reilly and Grace Todino for more information about chat scripts.

Escape Sequences

The escape sequences used in chat scripts are listed in Table 117.

Table 117: Chat Script Escape Sequences
Escape Sequence Description

" "

Expect a null string.


Send an end-of-transmission character.


Cause a BREAK. This sequence is sometimes simulated with line speed changes and null characters. May not work on all systems.


Suppress new line at the end of the send string.


Delay for 2 seconds.


Insert a BREAK.


Send a newline or linefeed character.


Pause for 1/4 second.


Send a return.


Send a space character.


Send a table character.


Send a backslash (\) character.


Replaced by phone number.


Reserved, not yet used.

Expect-Send Pairs

Sample supported expect-send pairs are described in Table 118.

Table 118: Sample Supported Expect-Send Pairs    
Expect and Send Pair Function

ABORT string

Designates a string whose presence in the input indicates that the chat script has failed.


Sets the time to wait for input, in seconds. The default is 5 seconds.

For example, if a modem reports BUSY when the number dialed is busy, you can indicate that you want the attempt stopped at this point by including ABORT BUSY in your chat script.

Alternate Handlers

If you use the expect-send pair ABORT SINK instead of ABORT ERROR, the system terminates abnormally when it encounters SINK instead of ERROR.

Missed Characters

After the connection is established and you press the Return key, you must often press Return a second time before the prompt appears.

For example, you might include the following as part of your chat script:


This part of the script specifies that, after the connection is established, you want ssword to be displayed. If it is not displayed, you must press Return again after the timeout passes.


The following example shows the chat-script command being used to create a chat script named t3000:


Related Commands

You can use the master indexes or search online to find documentation of related commands.

dialer map
script dialer

script dialer

To specify a default modem chat script, use the script dialer line configuration command. Use the no form of this command to disable this feature.

script dialer regexp
no script dialer

Syntax Description


Specifies the set of modem scripts that might be executed. The first script that matches the argument regexp will be used.


No chat script is defined.

Command Mode

Line configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

This command is used by DDR modules to provide modem dialing commands and commands to log in to remote systems.

The argument regexp is used to specify the name of the modem script that is to be executed. The first script that matches the argument in this command and the dialer map command will be used. For more information about regular expressions, refer to the "Regular Expressions" appendix in this manual.

If you adhere to the naming convention recommended for chat scripts (see the chat-script command), the modem lines (the argument regexp in the script dialer command) will be set to one of the following regular expressions to match patterns, depending on the kind of modem you have:

In the dialer map command, you can specify the modulation but leave the type of modem unspecified, as in .*-v32bis.


The following example shows line chat scripts being specified for lines connected to Telebit and US  Robotics modems:

! Some lines have telebit modems
line 1 6
script dialer telebit.*
! Some lines have US robotics modems
line 7 12
script dialer usr.*

Related Commands

You can use the master indexes or search online to find documentation of related commands.

dialer map modem-script system-script
dialer map name modem-script system-script
script activation

script connection
script reset
script startup

Copyright 1989-1998 © Cisco Systems Inc.