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

cc/td/doc/product/software/ios120/12cgcr/dial_r
hometocprevnextglossaryfeedbacksearchhelp
PDF

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.

chat-script

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

script-name

Name of the chat script.

expect-send

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

Default

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:

vendor-type-modulation

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:

telebit-t3000-v32bis

The chat-script command could become the following:

chat-script telebit-t3000-v32bis ABORT ERROR ABORT BUSY ABORT "NO ANSWER" "" "AT H" OK 
"AT DT \T" DIALING \c TIMEOUT 30 CONNECT \c

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.

EOT

Send an end-of-transmission character.

BREAK

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

\c

Suppress new line at the end of the send string.

\d

Delay for 2 seconds.

\K

Insert a BREAK.

\n

Send a newline or linefeed character.

\p

Pause for 1/4 second.

\r

Send a return.

\s

Send a space character.

\t

Send a table character.

\\

Send a backslash (\) character.

\T

Replaced by phone number.

\q

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.

TIMEOUT time

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:

ssword:-/r-ssword

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.

Example

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

chat-script t3000 ABORT ERROR ABORT BUSY ABORT "NO ANSWER" "" "AT H" OK "AT DT \T" 
DIALING \c TIMEOUT 30 CONNECT \c

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

regexp

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

Default

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.

Example

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.

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

script connection
script reset
script startup
start-chat


hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1998 © Cisco Systems Inc.