Amanda Work Group Manual
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 151 KR( file_or_box [, recording_info]) Command that makes a recording and stores it as either a file or a message for the specified mailbox. file_or_boxA string or variable indicating where the recording is to be stored. It contains either a mailbox indicating whose message it is or a valid DOS file name. Use the complete path to the file unless the file is in C:\AMANDA. recording_infoA number from 0 to 3 indicating whether the caller hears a beep (to start recording) and the post record menu. The default is 1. 0 No beep; no post record menu. 1 Beep; no post record menu. 2 Beep; post record menu. 3 No beep; post record menu. Examples: KR(212)makes the recorded response a new message for mailbox 212.KR(C:\\MSG.VOX)stores the response in the MSG.VOX file in the root directory. In both cases, the caller hears the beep for recording but no post record menu. N OTE: When using the KR() command, be sure to ask the caller to leave a message. A suggested example is: P(G1)KR(212)Greeting 1 says, “Please leave a message at the tone. Finish by pressing # or hanging up.” Failure: Invalid mailbox Unable to create file KS[( errorlevel)] Command that starts a system shutdown immediately. errorlevelOptional. Specifies the exit code (a DOS errorlevel) at which the system exits. The default exit code (errorlevel) is zero. This command is used only in Extension fields. Example: KS(3) immediately shuts down the system, exiting with the errorlevel set to 3. The errorlevel can be used by another program or a DOS batch file to determine what action should be taken next. Failure: Does not fail KT(G n[, digit])Command for rotary training. Amanda plays the specified greeting. The greeting should tell the caller to press or dial a digit. If the caller presses that DTMF digit, Amanda sets the port to detect only DTMF digits and proceeds. If the caller dials that rotary digit, Amanda learns it and sets the port to detect only rotary digits. This feature requires Brooktrouts Vantage VPS voice board with Rotary on Board. G nThe greeting (n is replaced by 1-7) to indicate which greeting is to be played. digit(Optional) The digit to be pressed or dialed. The default is 0. Example:KT(G3,1) plays greeting 3 for rotary training. The greeting must ask the caller to press or dial the digit 3. Failure: Does not fail Alphabetical Token Reference (Continued) Token SyntaxDescription
152 Installing [email protected]/Windows KV( file, field, value) Command that finds and deletes the first record in the specified file that has the specified value in the specified field. 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. valueA string or variable that contains the data to be compared with the contents of the specified field. Example:KV(C:\\LISTS\\PHONE.LST,4,STEVE BRUCE) searches for the first record in the PHONE.LST file that contains the value STEVE BRUCE in field 4. If found, the entire record is deleted. If not found, no record is deleted (but the command is still successful). Failure: The file is read-only Insufficient disk space to save file Invalid field Invalid file File is not the correct format (text file containing comma-separated fields and carriage return/linefeed separated records or .DBF file) KW[( rings[,P|V])]Command that waits the specified number of rings for an answer. If an answer is detected, the system dials dl_connect and frees the port. If there is no answer or the line is busy, the system dials dl_rnaret or dl_bsyret, respectively, and then processes the next token. ringsThe number of rings to wait. P Specifies a pager answer. V Specifies a voice answer. Example: KW(3,V) waits three rings for a voice answer before either connecting the caller or treating the call as a ring no answer or busy call. Failure: Does not fail L( file) Command that immediately changes the system prompts to use the specified Amanda system language file. This changes the system prompts, but the greetings of the individual mailboxes might need to be recorded by the users in the new language. fileA string or variable containing the name of a valid Amanda system language file (minus the .IDX extension and the DOS path). Amanda knows that the system language file names end in .IDX and are located in the Amanda directory. Examples: L(ENGLISH) changes the prompts to those found in ENGLISH.IDX (because your system has a Brooktrout voice board) in the C:\AMANDA directory. L(MEXICAN) changes the prompts to those found in MEXICAN.IDX (because your system has a Brooktrout voice board) in the C:\AMANDA directory. Failure: Does not fail (If you specify a file that doesn’t exist or is not a prompt file, Amanda uses the current prompt file.) Alphabetical Token Reference (Continued) Token SyntaxDescription
Chapter 10: Programming Amanda 153 LEN[ string] Assumes the value of the total number of characters within a string or digits within a number. stringAny string, number, or variable. N OTE: The brackets in this syntax are bold. The brackets are a required part of the syntax whenever you use LEN. Be careful not to confuse them with the non-bold brackets that indicate that the syntax within the brackets is optional. Example: LEN[7145551212] assumes the value 10. I(LEN[%S1],=,4,%S1) checks the length of the DTMF entry stored in %S1 because all extensions have 4 digits. If %S1 contains a mailbox, Amanda goes to that mailbox. See the I() command for more information. Failure: Does not fail %M[( mailbox)] Command that returns the total number of messages for the specified or current mailbox. Each port has its own %M. mailboxOptional. A valid mailbox or a variable containing a mailbox. The default is the current mailbox. Example: %M(321) contains the number of messages stored for mailbox 321. Failure: Invalid mailbox M( greeting [# mailbox], repetition, delay ) When Amanda processes this command, the system plays the specified greeting and waits for a single DTMF digit to be pressed by the caller. Amanda immediately finds the matching menu selection and continues processing at the specified mailbox. This eliminates the normal delay for determining that a DTMF entry has been completed. greetingOne of the seven mailbox greetings (G1–G7). This greeting should be a menu from which the caller is to make a selection. mailboxOptional. Any valid mailbox. The default is the current mailbox. repetitionThe number of times to play the greeting. delayThe amount of time (in tenths of seconds) to wait before repeating the greeting. This command is used only in Extension fields. Examples: M(G1,2,20) Amanda plays Greeting 1 twice, pausing for two seconds before repeating it. If the caller presses a DTMF digit, Amanda stops the greeting and uses the caller’s digit to process the menu. If the caller makes no selection at all, Amanda continues processing at the next token. If the caller makes an invalid selection, Amanda restarts the M() command. If the caller makes a valid selection (for example 5), Amanda immediately continues processing at the mailbox specified in the Menu field 5. M(G1#111,2,30) plays Greeting 1 from mailbox 111. If there is no response from the caller, Amanda plays Greeting 1 again after a 3 second pause. If there is still no response, Amanda executes the next token in the Extension field. Failure: Invalid mailbox %NSystem variable that contains the number of new messages for the current mailbox. Each port has its own %N. Example: P(%N,N) causes Amanda to say the number of new messages as a number. Alphabetical Token Reference (Continued) Token SyntaxDescription
154 Installing [email protected]/Windows N( file, field, value {, field, variable })Command that searches the specified file for all the records that match the specified value. This command changes the values in up to 8 fields in each matching record using the values stored in the specified variables. If no matching records are found, Amanda continues processing the next token. See also the V() 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 change. Each field is changed to the value of its corresponding variable. (.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. Example:N(C:\\LISTS\\PHONE.LST,1,RYAN GIGGS,3,%S1,2,%S2) finds all records in the file PHONE.LST that have RYAN GIGGS in the first field and replace the contents of field 2 with the value of %S2 and the contents of field 3 with the value of %S1. Numbers are used for the fields because PHONE.LST is a text file. Failure: Specified file does not exist Value of field not found within the file O( time) Command that makes Amanda go on-hook for the specified amount of time. Depending upon the value used, you can cause a hookflash or a hang-up. This is particularly useful for generating an intermediate hang-up condition during token processing without terminating the actual continued token processing. See also the H() command. timeA number in tenths of seconds or a variable containing that number. Example: O(20) causes Amanda to go on-hook for two seconds. Failure: Does not fail %PSystem variable that contains the previous mailbox, that is, the last mailbox accessed before the current mailbox. Each port has its own %P. See also %U (current mailbox). Example: While accessing mailbox 990, %U is 990. Then a caller enters 222 and is transferred to that extension. As mailbox 222 is accessed, %U becomes 222, and %P becomes 990. P[ repetition] ( date,D [, hangup]) Command that tells Amanda to say the specified number as a date. repetitionThe number of times to repeat the date. The default is 1. dateA number in either of the following formats: MMDDYY (which assumes the year 19YY,) or MMDDYYYY. For dates after 1999, you must use MMDDYYYY. Despite this format, the date is read in the order that most speakers of the prompt language (specified using the Setup utility) expect to hear it. If the year is the current year, Amanda does not read the year. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(06261994,D) causes Amanda to say June twenty-sixth, nineteen ninety-four Failure: Does not fail Alphabetical Token Reference (Continued) Token SyntaxDescription
Chapter 10: Programming Amanda 155 P[ repetition] ( amount, currency [, hangup]) Command that tells Amanda to say the specified number as an amount of money. repetitionThe number of times to repeat amount. The default is 1. amountA number from 0 to 999 million. currencyUse one of the following: $For dollars and cents. FFor francs and centimes. PFor pesos and centavos. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(06261994,$) cause Amanda to say Sixty-two thousand six hundred nineteen dollars and ninety-four cents The monetary terms are always available, regardless of the system language. Failure: Does not fail P[ repetition] ( number,N [, hangup]) Command that tells Amanda to say the absolute value of the number. repetitionThe number of times to repeat absolute value. The default is 1. numberA number or variable representing a number from 0 to 999 million. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. N OTE: Use a condition to test whether the number is positive or negative. Use a greeting that says “negative” or “minus” to handle negative numbers. Examples: Suppose that %S1 contains -1234 and G1 contains the recording “negative,” then I(%S1,>,0,1001)P(G1)P(%S1,N) causes Amanda to say “negative one thousand two hundred thirty-four”. (mailbox 1001’s Extension field would not include the greeting—just the command, P(%S1,N)) P(06261994,N) causes Amanda to say “Six million two hundred sixty-one thousand nine hundred ninety- four.” Failure: Does not fail P[ repetition] ( time,T [, hangup]) Command that tells Amanda to say the specified number as a time of day. repetitionThe number of times to repeat the contents of the port variable. The default is 1. timeA number or variable containing a number that specifies a time in the 24-hour HHMM format. However, Amanda says the time in a 12-hour format, followed by A.M. or P.M. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(1826,T) causes Amanda to say “Six, twenty-six P.M.” Failure: Does not fail Alphabetical Token Reference (Continued) Token SyntaxDescription
156 Installing [email protected]/Windows P[ repetition] (A, string [, hangup]) Command that tells Amanda to say the characters in the specified string. For a space, Amanda says the word “space”. repetitionThe number of times to repeat the contents of the string. The default is 1. stringA string of letters from the alphabet and spaces. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(A,GEORGE BEST) causes Amanda to say “G,” “E,” “O,” “R,” “G,” “E,” “space,” “B,” “E,” “S,” “T.” Failure: Does not fail P[ repetition](D) Command that tells Amanda to say the percentage of remaining disk space. repetitionThe number of times to repeat the percentage of disk space. The default is 1. Examples: P(D) causes Amanda to say “The percentage of free disk space is” followed by the percentage as a number, e.g., forty-two. Failure: Does not fail P[ repetition] ( greeting [, mailbox [, hangup]]) Command that tells Amanda to play the specified greeting for the specified or current mailbox. repetitionThe number of times to repeat the greeting. The default is 1. greetingOne of the seven mailbox greetings (G1–G7). mailboxOptional. Any valid mailbox or a variable containing a mailbox. The default is the current mailbox. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(G1) causes Amanda to play Greeting 1 for the current mailbox. Failure: Invalid mailbox P[ repetition] (M[, mailbox [, hangup]]) Command that tells Amanda to say the total number of messages for the specified or current mailbox. Using this command cancels any pending Notify actions for the specified message automatically. When this command plays a message that is marked with Receipt Verification, the verification message’s From field contains the mailbox which executed this command. repetitionThe number of times to repeat the number of messages. The default is 1. mailboxOptional. Any valid mailbox or a variable containing a mailbox. The default is the current mailbox. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(M,212) causes Amanda to say the total number of messages for mailbox 212. Failure: Invalid mailbox Alphabetical Token Reference (Continued) Token SyntaxDescription
Chapter 10: Programming Amanda 157 P[ repetition] (M n[, mailbox [, hangup]]) Command that tells Amanda to play the message with the specified number for the specified or current mailbox. repetitionThe number of times to repeat the message. The default is 1. nThe number of the message to be played. mailboxOptional. Any valid mailbox or a variable containing a mailbox. The default is the current mailbox. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P3(M1,212) causes Amanda to play message 1 for mailbox 212 three times. Failure: Invalid mailbox P[ repetition] (MN[,mailbox [, hangup]])Command that tells Amanda to play all new messages for the specified or current mailbox. repetitionThe number of times to repeat the message. The default is 1. mailboxOptional. Any valid mailbox or a variable containing a mailbox. The default is the current mailbox. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(MN) causes Amanda to play the new messages for the current mailbox. Failure: Invalid mailbox P[ repetition] (N[, mailbox [, hangup]]) Command that tells Amanda to play the Name/Extension recording of the specified or current mailbox. If there is no recording, nothing is played. See also P[repetition](U[,mailbox]). repetitionThe number of times to repeat the Name/Extension recording. The default is 1. mailboxOptional. Any valid mailbox or a variable containing a mailbox. The default is the current mailbox. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(N) causes Amanda to play the Name/Extension recording for the current mailbox. Failure: Invalid mailbox P[ repetition] ( DTMF) Command that tells Amanda to say a number as DTMF digits. This is usually used for repeating the number corresponding to the DTMF tones entered by a caller. repetitionThe number of times to repeat the DTMF digits. The default is 1. DTMFA number or variable containing a series of DTMF digits. Example:P(%S5) causes Amanda to say the DTMF digits in %S5. For example, if %S5 contains the number 411, Amanda says 4–1–1 instead of four hundred eleven. Failure: Does not fail Alphabetical Token Reference (Continued) Token SyntaxDescription
158 Installing [email protected]/Windows P[ repetition] ( prompt_no,V [, hangup]) Command that tells Amanda to look for the specified prompt number in the current system language file. Then Amanda plays the prompt associated with that number. repetitionThe number of times to repeat the prompt. The default is 1. prompt_noThe number or variable containing the number for the prompt. The current range is from 1 to 477. (For some languages, some of the prompt numbers reference blank messages.) hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P2(15,V) causes Amanda to play prompt number 15 twice. Failure: Does not fail P[ repetition](R) Command that tells Amanda to say the DTMF digits entered by a caller who requested relay paging notification. (These digits are stored in %R.) This command can be used in either field, but makes the most sense when used in a Notify Method field. repetitionThe number of times to repeat the DTMF digits. The default is 1. Example:P(R) causes Amanda to say the DTMF digits stored in the system variable %R. You can also use: P(%R) Failure: Does not fail P[ repetition] (U[, mailbox [, hangup]]) Command that tells Amanda to play the Name/Extension recording of the specified or current mailbox. If there is no recording, Amanda says “mailbox,” followed by the digits for the mailbox. See also P[repetition](N[,mailbox]). repetitionThe number of times to repeat the Name/Extension recording. The default is 1. mailboxOptional. Any valid mailbox or a variable containing a mailbox. The default is the current mailbox. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(U) causes Amanda to play the Name/Extension recording for the current mailbox. If it doesn’t exist, Amanda says the digits for the mailbox. Failure: Invalid mailbox P[ repetition](V) Command that tells Amanda to say the digits in the Variable field of the Notification record. repetitionThe number of times to repeat the contents of the Variable field. The default is 1. Example:P2(V) causes Amanda to say the digits in the Variable field twice. The following also works: P2(%V) Failure: Does not fail Alphabetical Token Reference (Continued) Token SyntaxDescription
Chapter 10: Programming Amanda 159 P[ repetition] (X, file [, hangup]) Command that tells Amanda to play a voice file. repetitionThe number of times to repeat the contents of the file. The default is 1. fileA string or variable containing the name of a voice file. Use the complete path to the file unless the file is in C:\AMANDA. The file can be one recorded using the KR() command, an Amanda message file, or a voice file copied to the Amanda system. However, the copied file must have the same sampling rate as Amanda voice files. The sampling rate is the value of the adpcm_nq system configuration option. This option’s default is 32 kilobytes. hangupOptional. The number 1 or 0 indicating how to process a hangup. The 1 means that the processing of this token ends. 0 means that the processing of this token ends, the string of tokens is aborted, and the channel hangs up so that it can wait for a new call. Example:P(X,C:\\SAMPLE.VOX) retrieves SAMPLE VOX from the root directory, and plays it. Failure: Does not fail Q({ greeting [# mailbox][,E]}) Command that allows you to ask a caller a series of questions and store all the caller’s responses as a single message for the current mailbox. Each question is recorded as a greeting which Amanda plays back with a tone. Then Amanda records a response and goes on to the next question. Up to 20 questions are allowed. To ask more than 7 questions (after using Greetings 1 to 7 for the current mailbox) you can use greetings from other mailboxes by specifying which mailbox’s greeting to access with a # sign followed by the mailbox, e.g., G7#123 would use greeting 7 from mailbox 123. You use the Q() command to create voice forms or implement some IVR applications. This command is used only in Extension fields. greetingOne of the seven mailbox greetings (G1–G7). mailboxOptional. Any valid mailbox. The default is the current mailbox. E Gives the caller the opportunity to edit (review, rerecord, append, or cancel) the previous group of answers. If additional token language processing is required after the caller has hung up, use the H token as part of the token string. Examples: Q(G1,G2,G3,G4,G5,G6,G7,G1#9000,G2#9000) causes Amanda to ask 9 questions recorded in the specified greetings, record 9 responses, and store the responses as one message for the current mailbox, regardless of what mailbox’s provide the greetings. Q(G1,G2,G3,E) records three answers from the caller and then gives the caller an opportunity to review those answers as if they were one message. When editing, a menu gives the caller the options of re-recording, appending to or canceling the answers of that group. Q(G1,G2,E,G3,G4,E) asks the caller two questions and then allows the caller to edit those answers. Once the caller presses 9 to save, Amanda asks the next two questions and then allows the caller to edit the second group of answers. NOTE: While editing, pressing 4 to cancel erases all the previous answers (not just those in the group being edited) and restarts the Q() command. Failure: Invalid mailbox Invalid greeting N OTE:Amanda can store a total of 65,536 voice message files. However, each of the up-to-20 questions in the Q() command count is stored in a separate voice mes- sage file, even though Amanda treats all the questions as one “message”. That means that a message total does not have to reach 65,536 to exceed the allow- able number of files for voice messages. For example, a message total of 3276 could use every file available for storing messages—if each of those “messag- es” contains 20 responses to the questions in a Q() command. Alphabetical Token Reference (Continued) Token SyntaxDescription
160 Installing [email protected]/Windows %RSystem variable (the relay variable) that contains the DTMF digits entered by the caller who requested relay paging notification. Each port has its own %R. This is primarily used to send up to 16 digits of information to a user’s pager/beeper. This token is used only in Notify Method fields. Example: 9,%VW(9,V)P(U)P(R) causes Amanda to call someone at home and say the telephone number and other information in the relay variable. R( greeting [# mailbox], variable [, timeout1 [, timeout2]]) Command that plays a greeting from the current or specified mailbox and stores the caller’s DTMF entry as a number in the specified variable. The greeting is interrupted as soon as the first DTMF tone is entered. If there is no DTMF entry or if the timeout occurs, the variable is set to the empty string. greetingOne of the seven mailbox greetings (G1–G7). mailboxOptional. Any valid mailbox. The default is the current mailbox. variableOne of the port or global variables. timeout1A number from 0 to 10500 that represents the time in tenths of seconds to wait for the first DTMF digit after playing the greeting. The default is 1.2 seconds. timeout2A number from 0 to 10500 that represents the time in tenths of seconds to wait between additional DTMF digits (after the first). The default is the value of the configuration option tmo_dtmf. Example:R(G1,%S6,20) stores a telephone number entered by a caller for later use. Greeting 1 is “Enter your telephone number, finish by pressing the # sign.” The caller’s entry is stored as a number in the port variable %S6. Amanda waits two seconds after the greeting before deciding that the caller is not going to enter a telephone number. R(G1#111,%S1) plays Greeting 1 of mailbox 111. The DTMF digits entered by the caller become the value of %S1. Failure: Invalid mailbox Invalid greeting %S0 %S1 %S2 %S3 %S4 %S5 %S6 %S7 %S8 %S9 %S10 %S11 %S12 %S13 %S14 %S15 %S16 %S17 %S18 %S19Each telephone port has its own set of 20 %S variables where you can store, modify, or retrieve information. One port’s %S1 is not the same as another port’s %S1. If Port 1 changes %S1, it does not change the value of Port 2’s %S1. Initially, each variable is equal to the empty string. Each variable can contain a string of up to 143 characters. See also %G0–%G9. NOTE: The [(), ](), and |() commands can be used only with %S0 through %S9. The variables %S10 through %S19 cannot be read from, written to, or appended to any DOS file. Example: +(%S0,5) adds five to the current value of %S0. =(%S12,714) assigns the area code 714 to %S12. I(%S12=714,555) causes Amanda to go to the Extension field for mailbox 555 because the condition is true (%S12 does equal 714). Failure: Invalid variable name (such as %S52) Alphabetical Token Reference (Continued) Token SyntaxDescription