Home > Amanda > Communications System > Amanda Work Group Manual

Amanda Work Group Manual

    Download as PDF Print this page Share this page

    Have a look at the manual Amanda Work Group Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 32 Amanda manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.

    							Chapter 10: Programming Amanda 161
    S(
    port,[
    string],
    [
    variable],
    [
    termination],
    [
    length],[
    timeou
    t]) Command that gives Amanda access to other computers via the serial ports. Amanda can 
    send a string to and/or receive a string from the remote computer. When receiving, 
    Amanda terminates the connection when the first of the following occurs:
     Amanda receives the specified termination string
     Amanda receives the maximum number of characters
     A timeout occurs
    When sending, Amanda terminates the connection after the string is sent.
    Before using this command, make sure the configuration settings for the physical serial 
    port have been defined.
    portThe number for or a variable containing the number for the logical serial port (1,2,3,4) 
    mapped onto a physical COM port by the configuration option serial_port1, 
    serial_port2, serial_port3, or serial_port4. 
    stringOptional. A string or variable containing the characters to send to the specified serial 
    port. It can contain alphanumeric characters as wells as variables and special 
    characters.
    The default is to send no string to the serial port.
    variableOptional. The port or global variable that stores the response. 
    The default is not to store a response.
    terminationOptional. A string or variable that defines the characters that, when read, stop Amanda 
    from reading the serial port. This can use the same special characters as string. The 
    default is \R\N, the carriage return/linefeed pair that usually end a line in a text file. 
    The terminating character, if any, does not become part of variable.
    lengthOptional. A number or a variable containing a number. Its absolute value defines the 
    maximum number of characters to receive over the serial port. The default is -143. Use 
    a positive value for length when you are receiving a packet of characters, you know 
    its exact size, and you want the command to fail if fewer characters are received. Use 
    a negative number otherwise.
    timeoutOptional. A number or variable that defines the maximum time, in seconds, that 
    Amanda should wait for the first character and also between characters being received 
    on the serial port. The default is the setting for the configuration option tmo_serial.
    Example:
    S(2,%S3,%S4,,,50)
    both sends and receives. The command uses COM port 2. %S3 stores the string to be 
    sent. %S4 stores the string that is received. Amanda waits a half second for the first 
    character and between characters.
    S(2,%S3)
    only sends. The command uses COM port 2. %S3 stores the string to be sent. This 
    command has non-standard syntax. Because all the parameters after the string to be sent 
    are not being used, this command does not need the additional commas.
    S(2,,%S4,,,50)
    only receives. The command uses COM port 2. %S4 stores the string that is received. 
    Amanda waits a half second for the first character and between characters.
    Failure:  Physical port not available
    Logical port not configured properly
    If a timeout stops Amanda from receiving information before the maximum number of 
    characters is received and the length is a positive number, Amanda considers the 
    command a failure.
    %TSystem variable that contains the current connect time, the number of seconds that the 
    current port/call has been active. Each port has its own %T.
    Examples:
    P(%T,N)
    causes Amanda to say the amount of connect time as a number. See the P() command for 
    more information.
    Alphabetical Token Reference (Continued) 
     Token SyntaxDescription 
    						
    							162 Installing [email protected]/Windows
    T(
    file,
    phone_no
    [,
    tokens]) Command that sends faxes to either a specified telephone number or to a connected call. 
    Before using this command, be sure at least one fax modem is installed and configured 
    on Amanda. 
    Before using this command, make sure the configuration settings for the physical serial 
    port have been defined. See “Serial Port Settings” on page 221.
    fileThe file name of the fax you wish to transmit. It can be any valid DOS file name. Use 
    the complete path to the file unless the file is in C:\AMANDA.
    phone_noThe telephone number (or a variable containing that number) for the fax device that 
    accepts the transmission. Use the empty string to make Amanda wait for a call to ring 
    into the fax port.
    tokensOptional. A string or variable that defines the actions Amanda takes to connect the call 
    to the fax port. For more information, please see the example for the J() command.
    This command is used only in Extension fields.
    Examples:
    T(C:/FAXES/NEWINFO.FAX,%G6)
    allows the user to request a fax and have the supplier of that fax send it to the provided 
    telephone number. This is commonly called a “two-call fax back”. NEWINFO.FAX is 
    the name of the file, and %G6 contains the fax telephone number. 
    T(C:/FAXES/NEWINFO.FAX,,%S5)
    allows the user to request a fax and have it sent as part of the current call. This is 
    commonly called a “one-call fax on demand”. NEWINFO.FAX is the name of the file, 
    and %S5 provides the tokens that connect the call to the FAX port. 
    Failure:  Fax modem not configured properly
    Physical port not available
    Logical port not configured properly
    %USystem variable that contains the current mailbox number. Each port has its own %U. See 
    also %P.
    U-
    ext_noCommand that performs partially supervised transfers. Amanda does not transfer the call 
    if the system detects a busy signal. To use the U token, the setting for Maximum Rings 
    for the mailbox must be set to 2.
    ext_noSeries of DTMF digits that indicate an extension number.
    This command is used only in Extension fields.
    Example:
    U-144
    causes Amanda to call extension 144 (if Amanda is processing a call). If the extension 
    rings, the system transfers the call and hangs up. If the extension is busy, Amanda lets 
    the caller know that.
    Failure:  Does not fail
    %VSystem variable that contains the value of the Variable field in the current Notification 
    record. Each port has its own %V.
    This token is used only in Notify Method fields.
    Example:
    If the only difference in a Notification template for mailboxes is the pager/beeper 
    telephone number that Amanda should call, %V can store that number.
    9,%VW(3,P)%U*%M*%N#
    causes Amanda to call the user and play the number of messages.
    Alphabetical Token Reference (Continued) 
     Token SyntaxDescription 
    						
    							Chapter 10: Programming Amanda 163
    V(
    file,
    field,
    value{,
    field,
    variable}[,
    n])Command that searches the specified file for the nth record that has the specified value 
    in the specified field. It retrieves values from up to 8 other fields in that record, putting 
    the retrieved values in the specified variables. See also the N() command.
    fileA string or variable containing a valid DOS file name for the text or .DBF file. Use the 
    complete path to the file unless the file is in C:\AMANDA. No line in the file should 
    exceed 143 characters. There is no limit to the number of lines in the file.
    fieldA number, string, or variable that indicates the number or name of a field. The first field 
    indicates what field to compare with value; the additional (up to 8) fields indicate what 
    fields to copy into the corresponding variables. (.DBF files have field names; text files 
    have field numbers.)
    valueA string or variable that contains the data to be compared with the contents of the 
    specified field. 
    variableOne of port or global variables.
    n(Optional) This parameter can be used only with ASCII files. A number indicating which 
    matching record to use. For example, if n is 3, the first two matching records are ignored 
    and data is taken from the third matching record.
    Amanda identifies n because, when it is used, there is an even number of parameters 
    instead of an odd number.
    Example:V(C:\\LISTS\\PHONE.LST,1,JOHN,3,%S1,2,%S2)
    searches the file PHONE.LST for the first record that has the value JOHN in field 1. If 
    the search is successful, the value in field 3 of that record is stored in %S1 and the value 
    in field 2 is stored in %S2. 
    Failure:  If no record is found
    Invalid file
    Invalid field
    %WSystem variable that contains the day of the week (1 is Sunday, and 7 is Saturday).
    Alphabetical Token Reference (Continued) 
     Token SyntaxDescription 
    						
    							164 Installing [email protected]/Windows
    W(
    n,[
    event
    [,
    mailbox]]) Command that tells Amanda to:
     Wait a number of tenths of seconds
     Wait for an event, such as a dial tone or another appropriate answer. If the 
    event does not occur, Amanda goes to the specified mailbox.
    nWithout an event parameter (P, V, or T), a number of tenths of seconds.
    For dial tone (T), the number of seconds.
    For pager (P) and voice (V), the number of rings to wait before continuing. If n is 0 for 
    pager or voice, the 0 is replaced with the value of rmt_rna, a configuration option that 
    you define using the Setup utility. Other than that, the minimum number of rings should 
    be 2. See “rmt_rna” on page 212.
    eventThe event that Amanda waits for:
    P
    A pager answer
    V
    A voice answer
    T
    The dial tone
    mailboxAny valid mailbox or a variable containing a mailbox. Specifies the mailbox to which 
    control should be transferred if the event does not occur.
    Examples:W(3)
    makes Amanda pause for 3 tenths of a secondW(3,P)
    makes Amanda wait up to three rings for a paging/beeping system to answer. Use this to 
    confirm that the paging company answered before playing the DTMF digits to be 
    displayed on the pager.
    W(4,V,111)
    makes Amanda wait up to four rings for a voice. If a voice is detected, processing 
    continues with the next token. Otherwise, control is transferred to mailbox 111.
    Failure:  Invalid mailbox
    Event does not occur and no mailbox is specified
    %XSystem variable that contains the codes needed to get the transfer dial tone on the current 
    port. Each port has its own %X. This is the setting of the dl_dtwait configuration option 
    (usually F-). See “Dial Code Parameter” on page 28.
    X[(
    file)] Command that creates the specified file or LIGHT.ON. Used in conjunction with the Y() and Z() 
    commands, this command can control Amanda’s processing of tokens.
    fileA string or variable containing a valid DOS file name for a text file. The default is to 
    create the file LIGHT.ON in the mailbox’s directory.
    Example:
    A user’s message waiting indicator toggles on and off. For the first message, Amanda should turn 
    the indicator on. The indicator should be left on for the second and later messages (until they are 
    all listened to). So you use:
    Z()
     to check whether the indicator is on or not (if LIGHT.ON exists, the indicator is on).
    X()
     to create the LIGHT.ON file when a message arrives and the indicator is not on.
    Y()
     to delete LIGHT.ON when the indicator is turned off because the user has listened to all 
    the messages.
    Failure:  
    Does not fail
    %YSystem variable that contains the current date in American format:  MMDDYYYY. 
    Example:
    P(%Y,D)
    causes Amanda to say the current date (contained in %Y) as a date.
    See the P() command for more information.
    Alphabetical Token Reference (Continued) 
     Token SyntaxDescription 
    						
    							Chapter 10: Programming Amanda 165
    Troubleshooting
    Check for the following mistakes:
    1. Did you start the string of tokens without @ when you wanted Amanda to perform a 
    hookflash or PCPM?
    2. Did you start the string of tokens with @ when Amanda should NOT perform a hook-
    flash or PCPM?
    3. If the tokens are in an Extension field, did you forget that both Do Not Disturb and 
    Call Screening must be OFF?
    4. Did you check the trace file for information about what went wrong?
    Y[(
    file)] Command that deletes the specified file or LIGHT.ON.
    fileA string or variable containing a valid DOS file name for a text file. The default is to 
    delete the file LIGHT.ON in the mailbox’s directory.
    Example:
    Y(C:\\AMANDA\\FOOBAR.TXT)
    causes Amanda to delete FOOBAR.TXT.
    See also the X() command. 
    Failure:  Does not fail
    %ZSystem variable that contains the current time in 24-hour format: HHMM. 
    Example:
    P(%Z,T)
    causes Amanda to say the current time (contained in %Z) as a time.
    See the P() command for more information.
    Z[(
    file)] Command that tests for the existence of the specified file or LIGHT.ON. If the file is 
    there, Amanda immediately stops processing the rest of the tokens for this mailbox. 
    Otherwise, the next token is executed.
    fileA string or variable containing a valid DOS file name for a text file. The default is to 
    delete the file LIGHT.ON in the mailbox’s directory.
    Example:
    Z()X()
    causes Amanda to check for LIGHT.ON. If it is not there, the X() command causes 
    Amanda to create it.
    See also the X() command.
    Failure:  Does not fail
    Alphabetical Token Reference (Continued) 
     Token SyntaxDescription 
    						
    							166 Installing [email protected]/Windows
    TIP:Remember that when a string of tokens in an Extension field fails, Aman-
    da goes to the mailbox specified in the Done Chain for that mailbox. If 
    you are testing a program and are not sure which strings of tokens fails, 
    use different mailboxes in the Done Chain fields to help you. For exam-
    ple, if you do not know which of two strings fails, you might put mailbox 
    4000 in one Done Chain and mailbox 4001 in the other. If you use 
    @P(G1, 
    your_personal_UserID) 
    in the Extension field for 4000 and use 
    @P(G2, 
    your_personal_UserID) 
    in the Extension field for 4001, then you know which string fails based 
    on which of your personal greetings Amanda plays. 
    						
    							Chapter 11:
    Programming Examples
    Overview
    This chapter contains programming examples for:
     System paging
     Switching and maintaining languages
     Retrieving order shipment information
     Allowing one and two-call faxbacks
     Using IVR and voice-form applications
    System Paging of a User for Special Callers
    This example illustrates inter-mixing tokens with Amanda’s standard call processing.
    Application
    This application creates a special mailbox (for example, 611) for family, friends, or special 
    customers. When callers access this mailbox, Amanda pages you over the telephone 
    paging system in your office. After letting you know that you have an important call, 
    Amanda transfers that call to your extension through a “backdoor” even if your regular 
    extension mailbox (for example, 111) might have its Do Not Disturb setting ON. 
    The steps required to implement this feature might be summarized as follows:
    1. Put the caller on hold.
    2. Access the telephone switching system paging feature.
    3. Say something such as “There is an important call for David.”
    4. Transfer the call to a “backdoor” mailbox that rings the extension.
    Translating to Amanda’s Tokens
    This could be translated into Amanda tokens as follows:
    1. Dial the code for putting the caller on Transfer Hold (which is normal processing if 
    the first character is not an @ sign).
    2. Dial the telephone switching system paging access code, for example, 33* (if that is 
    your system’s code for a system page.) 
    						
    							168 Installing [email protected]/Windows
    3. Play a greeting that you have already recorded such as “There is an important call for 
    David” using the P() token.
    4. Dial the code for retrieving the caller from Transfer Hold and then transfer the caller 
    to a “backdoor” mailbox that rings the extension. For example, to retrieve the caller 
    you use %X and to access the “backdoor” mailbox use the G() token.
    Result
    The final result might be:
    33*P(G1)%XG(6111)
    where G1 for the current mailbox has the “important call for David” recording and 
    mailbox 6111 transfers the call to the extension 111 by having 111 in its Extension field 
    with Do Not Disturb set to OFF and its Lock ON.
    Switching and Maintaining Languages
    This example illustrates how you can completely over-ride Amanda’s standard processing.
    Amanda has the ability to support multiple languages simultaneously on any port. The 
    only requirements are that you install an alternative language prompt file and you 
    configure the mailboxes to allow a caller to change to the alternate language. Additionally, 
    you can control which mailboxes a caller has access to when they select a specific 
    language.
    Application
    Let’s start by allowing a caller to select outgoing greetings in a different language. When a 
    call is answered by Amanda, processing begins at the Company Greeting mailbox (which 
    is 990 by default.) After the greeting is played, processing (by default) continues at 
    mailbox 991 which plays the caller Instructions. During either the Greeting (990) or the 
    Instructions (991) you can give the caller the option to press a digit to hear the Instructions 
    in a different language. When the caller enters the language digit, Amanda should then be 
    configured to access another mailbox that contains the proper Instructions using the Token 
    Programming Language.  
    						
    							Chapter 11: Programming Examples 169
    The following diagram helps illustrate this:
    This now gives your callers the option to hear their instructions in the language of their 
    choice (realize that you can have additional language selections as additional menu 
    choices). However, after the caller selects Spanish by pressing 1, when they access a 
    mailbox, Amanda still says in English, “Please hold while I try that extension.” We have 
    changed which language instructions a caller hears, but we still have not changed which 
    language system prompts the caller hears. To change the system prompts to another 
    language we must use tokens (and of course have installed the appropriate language 
    prompts).
    Using Amanda’s Tokens
    The token to change system prompts is L(). To change to the Mexican Spanish system 
    prompts, use L(MEXICAN) provided that the Mexican Spanish system prompts file 
    resides in the Amanda directory and is named MEXICAN.IDX (because your system has 
    a Brooktrout voice board). Argentinian Spanish is ARGENTIN.IDX.)
    To accomplish this, we could use another mailbox that changes the system prompts to 
    Mexican and then continues processing with the Spanish Caller Instructions as follows: 
    						
    							170 Installing [email protected]/Windows
    mailbox 980’s Extension field contains the tokens @L(MEXICAN)G(981) which causes 
    Amanda to:
    1. Not put the caller on transfer hold
    2. Change the system prompts to the file MEXICAN
    3. Continue processing at mailbox 981.
    N
    OTE:There are several ways this same activity could have been accomplished. 
    For example, instead of using the 
    G(981) token, mailbox’s RNA Chain 
    could have had 981 in it. (We use the RNA Chain, since Amanda returns 
    Ring No Answer after successfully performing the tokens in the Exten-
    sion field).
    Another Consideration
    This works for most situations. However, there is one final consideration. What happens if 
    the caller enters an invalid extension or choice? By definition, an invalid mailbox has no 
    Done Chain. As a result, Amanda defaults to using the Done Chain of the Company 
    Greeting mailbox on that port. 
    The following diagram illustrates this:
    The result is that a caller, who has selected Spanish and entered an invalid mailbox, 
    eventually ends up at the English Instruction mailbox! 
    To have callers always access the proper language Instruction mailbox, you can add a 
    control structure to Amanda. In this example, we might perform the following:
    1. If an alternate language is selected, remember which language was selected.
    2. Before playing the default Instruction mailbox, determine which language Instruction 
    mailbox should play and continue processing at that mailbox. 
    						
    All Amanda manuals Comments (0)

    Related Manuals for Amanda Work Group Manual