|
|
For the preparation tasks and configuration examples, refer to the "Preparing for Asynchronous DDR" chapter in the Dial Solutions Configuration Guide.
script-name | Name of the chat script. |
expect-send | Pairs of information elements: an item to expect and an item to send in response. |
No chat scripts are defined.
Global configuration
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.
A suggested chat script naming convention is as follows:
vendor-type-modulationIf you follow this convention, the syntax of the chat-script command becomes the following:
chat-script vendor-type-modulation expect-sendFor example, if you have a Telebit T3000 modem that uses V.32bis modulation, you would name your chat script as follows:
telebit-t3000-v32bisThe 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.
The escape sequences used in chat scripts are listed in Table 117.
| 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. |
Sample supported expect-send pairs are described in Table 118.
| 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.
If you use the expect-send pair ABORT SINK instead of ABORT ERROR, the system terminates abnormally when it encounters SINK instead of ERROR.
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.
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
You can use the master indexes or search online to find documentation of related commands.
dialer map
script dialer
regexp |
No chat script is defined.
Line configuration
This command first appeared in Cisco IOS Release 10.3.
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.*
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
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Mon Apr 26 16:16:48 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.