Page 4
12.2.2 The Notify Instance (Job Queue) Database ......144 12.2.3 The Notify Template Database ....... 147 12.3 Data Triggers .
Page 5
-box syntax; the box is simply given as a required parameter. The -box syntax is for options only. A fundamental theme in Amanda Portal is the notion of the box hierarchy and permissions related to the box hierarchy. Boxes create other boxes in an ancestral tree structure. Generally, unless specified otherwise, boxes only have permission to modify their box settings and the settings of their descendents.
Page 6
The Amanda Portal system consists of a core set of functionality, which defines basic building blocks from which a variety of call processing systems can be built. A variety of plug-in modules, in the form of Windows DLLs, can be installed which augment the functionality of the core. By using plug-in DLLs, a system can be configured to load only the code and features that it requires.
Page 7
A top-level mailbox’s parent is itself, since no mailbox created it, and such a box is referred to as a in this manual. Such a mailbox is given certain special privileges in Amanda Portal, similar to the “root” user on a Unix system. Unlike Unix, however, there can potentially be more than one top-level mailbox (a “forest”...
Page 8
Safe interpreters are simply regular interpreters with certain “unsafe” calls removed; that is, they are inter- preters where some unsafe code has already been “dejected.” All Tcl interpreters in Amanda Portal are of the “safe” variety, and as such, they have only the following standard Tcl commands: append, array, break,...
Page 9
This is a problem because set will see three arguments rather than the two it’s expecting (a variable to set and a value to set it to). Just as in Amanda/DOS, we can overcome this problem by using quotation marks to “hide”...
Page 10
The last command sets x to 5, not y. We have already seen an example of when we used $ to produce a literal dollar sign character in a string. Many of the backslash substitutions are the same as those in Amanda/DOS: Symbol Meaning...
Page 11
Tcl defines a number of built-in commands, and applications using Tcl can define additional built-in com- mands. Not surprisingly, Amanda Portaldefines quite a few application-specific commands which will be covered in the Amanda PortalProgramming class. So far, we’ve seen two kinds of substitutions which happen automatically to commands: variable and back- slash.
Page 12
(the element name). This is a very powerful mechanism, and associative arrays are used extensively in Amanda Portal. Array elements thus have two names: the name of the array plus the name of the element. The element name is enclosed in parentheses.
Page 13
The incr command is exactly like the + token in Amanda/DOS. It allows you to do an arithmetic addition to an existing numeric variable. The value added may be positive or negative, and it defaults to 1.
Page 14
The unset command always returns an empty string as its result: % set age(Tim) 37 % set age(Siamak) 36 % unset age The array command allows you to obtain information about a Tcl array. The general syntax is: array where is a special keyword for the array command.
Page 15
% expr (8+4) * 6.2 74.4 In addition to the usual binary operators +, -, *, and /, there are a number of other important unary and binary operators (and there are some less important ones which we won’t mention). There’s also %, which computes the remainder from a division (this is the “mod”...
Page 16
Logical is represented as &&. The expression a&&b is true (1) if both the expressions and are non-zero, and zero otherwise. Logical is represented as ||. The expression a||b is true (1) if of the expressions is true, and zero otherwise. As in C, these operators are : the second operand is not evaluated if the first shows the result of the whole thing.
Page 17
% set mylist {a b {c d e} f} a b {c d e} f % lindex $mylist 1 % lindex $mylist 2 c d e % set x {a b c d e} a b c d e % lindex $x 4 The llength function simply returns the number of elements in a list.
Page 18
% set x {22 12 9 97} 22 12 9 97 % lsort $x 12 22 9 97 % lsort -integer $x 9 12 22 97 % set sorted_list [lsort -integer $x] 9 12 22 97 The lappend command appends one or more values to a variable as list elements. It creates the variable if it doesn’t already exist.
Page 19
linsert linsert can be used to insert items into an existing list variable at a particular index. lrange lrange can be used to extract a range of items from a list (returning a new list). lreplace lreplace can be used to create a new list from and old list with a range of items replaced by a new set of items (not necessarily the same number of items).
Page 20
The eval command takes one or more arguments and concatenates them into one long string. It then evaluates (executes) this string as as a Tcl command. Let’s look at how we’d use eval in the previous example: % set mylist {a b c} a b c % set additional_items {d e f} d e f...
Page 21
This means you can write statements like: if {$x < 0} "set x 0" if {$x < 0} {set x 0; set y 7} if {$x < 0} { set x 0 set y 7 But you may write if {$x < 0} set x 0 The most common way to write if statements is like this: if {$x <...
Page 22
With the switch statement, you can write this more clearly: switch $x { a {incr t1} b {incr t2} c {incr t3} While while statement’s syntax is: while Here’s an example of reversing a list a, putting the result into list b: % set a {1 2 3 4 5 6} 1 2 3 4 5 6 % set b {}...
Page 23
To iterate variable i from 1 to 10, you would write for {set i 1} {$i <= 10} {incr i} { set array($i) "This is item $i" To reverse list a, putting the results in b: set b {} for {set i [expr [llength $a] - 1]} { $i >= 0} {incr i -1} { lappend b [lindex $a $i] The foreach statement is used very frequently in Tcl.
Page 24
This is, of course, the command name which will invoke the procedure. This is a list of the of the procedure. That is, it’s a list of the names by which this procedure will refer to its arguments. The number of arguments passed on the command line must normally match the number of arguments in the list.
Page 25
That means that the following two procedure definitions produce equivalent results. The first one is slightly slower, but it’s clearer to someone reading the code that it’s intended to return the sum of the two arguments. proc plus {a b} {return [expr $a + $b]} proc plus {a b} {expr $a + $b} Either way, you can use the new plus command as follows: % proc plus {a b} {expr $a + $b}...
Page 26
Here’s an example of a procedure accessing a global variable x. It accepts one argument a, adds it to the global variables x and y, and returns that result. % set x 4 % set y 5 % proc foo {a} { global x y return [expr $x + $a + $y] % foo 3...
Page 27
Notice that the variable foo is set to a new value by myproc: % proc myproc {a} { upvar $a myvar set myvar 4 % set foo 3 % myproc foo % set foo Notice in this example that we can pass a whole associative array as an argument: % proc array_size {a} { upvar $a myarray return [array size myarray]...
Page 28
Otherwise, the catch command returns as its value the error code, and will be set to the error message (string) which was returned from the Amanda Portal is designed to minimize the number of places that an application programmer will need to use catch.
Page 29
Like commands, but it returns a list of variables (those matching if it’s specified). Tcl originally did not support multithreading in any way. Because Amanda Portal has a need for multiple threads because so many things are happening at once, tAA added multithread safety to Tcl. Upcoming versions of Tcl will include Unicode support for multiple languages and multithread safety;...
Page 30
The multithreading that was added only allows one thread per interpreter. This is a good thing because the global variables errorCode and errorInfo are per interpreter and should not be shared between threads. Interpreters (and the threads which are tightly bound to them) are spawned off whenever a new “task” needs to be executed.
Page 31
We can get around this problem by noticing two things: variables are scoped and behavior can be attached to variables (through triggers) when variables are deleted. Therefore, to solve this problem, we instead create both a variable and a procedure when we create an LS, VP or MMO handle. The variable has a deletion trigger attached to it.
Page 32
1. set r $v1 # Regular variable gets MMO handle. 2. set v1 $r # MMO handle set to regular variable. 3. set v1 $v2 # MMO handle = MMO handle. Figure 1.1: Different assignment scenarios. Now suppose we want to play an MMO handle on this VP device. I’ll assume we have an MMO handle stored in the variable mmo var which references the command mmo0 (MMO handles work just VP handles).
Page 33
“write” trigger which doesn’t allow assignment.) The Tcl code that defines the behavior of Amanda is called the Telephone User Interface or TUI. Tcl gives the TUI great flexibility and extensibility and is Amanda Portal’s trump card. There are basically two ways we could have structured the control flow in Amanda when doing a “task”:...
Page 34
1, . . . ” login menu login menu “You have 1 new “To set your main menu main menu message. . . ” options, press. . . ” play msg set options Figure 1.2: Flow control in Amanda Portal...
Page 35
Tcl call. In Amanda Portal, it is often useful to start off one or more threads asynchronously and then do other things while waiting for the threads to finish. If you start off more than one thread, you may wish to wait and be notified when a thread either finishes or needs to notify you about an event that occurred.
Page 36
Certain function names in a DLL are recognized as being special and are called at certain times by the Amanda Portal system. For example, when you log in to a box, a special function is called in the DLL (interp login). This function can inject new privileged commands into the interpreter that only logged in users can use (the injection model).
Page 37
Tcl code if you want different behavior in the TUI. For example, you may have the rule that if calls come in on lines 1–3, we call the Tcl function amanda voicemail and if the call comes in on lines 4–5 we call the Tcl function amanda forward.
Page 38
get resource stats This function returns information on resource allocation. The array returned contains the following indices: Total resources of this type that exist. total defined Total resources of this type that are currently available. current available Maximum resources of this type that have ever been used at once. (This max ever used is not the maximum number of resources that have ever been used at different times.
Page 39
group name. grab res [-timeout ] [-unit ] [-port ] [-group ] [-specific type ] [-min ] [-max ] [-ascending] [-descending] This function attempts to allocate a resource of type If successful, the selected unit’s control function will be installed in the interpreter and assigned to The value of can be any of the values returned by the list resource types or the resources with group function.
Page 40
The grab command is a convenience function which allocates a network device from of type The default is to allocate from type port in descending order. The device handle (Tcl variable) will be called which defaults to net. A DSP resource will then be attached to called (defaulting to vp).
Page 41
Amanda Portal has a two-dimensional security model. One dimension is “who” or the identity of the user and the second dimension is “what” or what they can do. (Other systems often have a third dimension “where”). The “who” dimension is the box number. When you log in, you are assigned that number. The “what”...
Page 42
Because privilege state is internal, there is no way to give yourself more privileges than you already have. You have to modify privileges through the calls built into Amanda and these calls only let you manipulate privileges in predefined ways.
Page 43
This privilege allows you to kill all the threads of a specific user or an individual KILL thread running on behalf of a user. This privilege allows you to move messages from one box to another MESSAGE MOVE (move msgs to box). This privilege allows you to get status updates of tracing, ports, resources, and MONITOR system.
Page 44
NOTNONNEG BOXNOTEXIST PERMDENIED INVALIDVALUE get privilege value [-box ] [-use db] [ ]. . . This function returns the value of the privileges for the given box. You can only inspect your privileges or descendent box privileges. If you inspect the privileges of your own box, the state associated with the interpreter is used.
Page 45
INVALIDVALUE get privilege keys [-box ] [-use db] This function lists all the privileges for the current box or the box given. If you retrieve the privileges of your own box, the state associated with the interpreter is used. If you retrieve the privileges of another box, the privileges are looked up in the privilege database.
Page 46
logout Logout of a box. Messages may be expunged if EXPUNGE LOGOUT is set for the box. This command exists only if you are logged in. verify sac This function verifies the is the correct password for KILLED...
Page 47
Figure 3.1 shows Amanda hooked up to a phone switch. A number of outside lines come into the phone switch. Amanda is hooked up to a number of phone switch lines and may be handling more than one call at a time on these different lines. Phones are also connected to the switch. In figure 3.1 these are referenced by the users “Tim”...
Page 48
“blind-transfers.” With blind-transfers, Amanda can simply transfer a call to another extension and drop the line. Once the line is dropped, Amanda can use it for other calls, such as a new incoming call from the outside. If the person does not answer the phone or the extension is busy, the switch automatically routes the call back to Amanda’s hunt group and integration information tells Amanda that...
Page 49
When blind transfers are not possible, Amanda must to a “supervised transfer.” With a supervised transfer, Amanda must keep the line open and listen if the person picks up the line or is busy. The port cannot be used for other purposes such as incoming calls during this time, so this form of transfer is less desirable.
Page 50
Each user in Amanda has one or more boxes (usually one). This box stores a variety of messages and each message can have a number of MMOs in it. The messages in boxes are arranged in folders (see page 70).
Page 51
To get around this, we allow the Amanda system administrator to set the default password in the clone box to something he knows. This prevents outside users from breaking into the system.
Page 52
PERMDENIED SYSBOXFULL BOXEXISTS BOXNOTEXIST delete box [ ]. . . Delete boxes. The boxes must be leaf nodes. If a box deleted is a guest box, then the immediate parent of the box has its BOXES LEFT count incremented. BOXLOGGEDIN NOTNONNEG PERMDENIED BOXHASCHILD...
Page 53
This command returns the next box (numerically) in the system after If -1 is given for the box, return the first box. NOTINTEGER OUTOFRANGE User gave negative number besides -1. previous box This command returns the previous box allocated in the system before box. If -1 is given for the box, return the last box.
Page 54
get root [-box Returns the top most box in the box tree containing the current box or the box given. There may be a forest of box trees. If you are not logged in, you must give the -box option. NOTNONNEG BOXNOTEXIST BREQNLOGIN...
Page 55
read-only deleteable read-write non-deleteable ancestor-read-write Figure 4.1: Box Settings Attributes NOTNONNEG BOXNOTEXIST PERMDENIED Each box has a number of settings that apply to it. Some of the settings are built into the system and some have special semantics when they are set. You can also add new settings to a box if you wish. If you do, the interpretation of those settings is up to the Tcl code you write.
Page 56
NOTNONNEG KEYNOTEXIST BOXNOTEXIST BREQNLOGIN INVALIDVALUE set box setting [-deleteability deleteable non-deleteable] [-mutability read-only read-write ancestor-read-write] [-box ]. . . Set the value of box settings . If the key doesn’t exist, it is created. You can only change the settings on your box or a descendent box. Only the superbox for the tree of the box in question can set a setting to non-deleteable and only a superbox can delete a non-deleteable box setting.
Page 57
Delete the settings from the indicated box. If the mutability is read-only, only the superbox can delete the setting. If the mutability is read-write, you or any of your ancestors can delete the setting. If the setting is ancestor-read-write, then only your proper ancestors can delete the setting. Only the superbox for the tree in question can delete deleteable settings.
Page 58
BREQNLOGIN INVALIDVALUE Currently, the built-in box settings are as follows. Each key is non-deleteable. bool Controls how Amanda says the date if it is ABBREV DATES read-write today or yesterday. If true, say “today” or “yesterday.” If false, say the date. Default: true.
Page 59
If read messages exist for longer than these EXPUNGE DAYS read-write number of days, delete them. bool Expunge the deleted messages on logout. EXPUNGE LOGOUT read-write Extension the phone is on. May also contain EXTENSION read-write Amanda@Work.Group-style tokens. Need EXTENSION privilege to modify.
Page 60
Maximum number of seconds that a person’s GREET LENGTH ancestor-read-write greeting can be. This is enforced in the Tcl code only; therefore, if a person uses the telnet interface, they can access the MMO Lookup Table directly and get past this restriction. This is not critical though.
Page 61
Maximum number of messages allowed for this MAX MESSAGES ancestor-read-write mailbox. If this values is 0 then an infinite number of messages can be stored. The RECORD MSGS attribute take precedence over this attribute. You’ll need the RECORD MSGS privilege to change this value. Maximum length of message in seconds.
Page 62
Time that statistical information started for STAT EPOCH read-only this box. This value is modified by the reset box stats call. You must have the RESET STATS privilege to use the reset box stats call. Folder number for new urgent messages. (See URGENT FOLDER read-write also NEW FOLDER.)
Page 63
This command tells the system that a caller who visited this mailbox is chaining to another box or has hung up; in either case, he is leaving this box, so the system should record the duration value in the CALLS SECS setting.
Page 64
, they are reference counted). If the system dies ungracefully, Amanda Portal runs an MMO integrity check program at startup to see if there are any MMOs stored on disk that don’t have any references to them. If there are, they are deleted or moved to a recovery box. To move them to a recovery box, you need to set the recovery box (recovery box) and folder # (recovery folder) in the Configuration Database.
Page 65
Every type of MMO has the following member functions: read only This function determines whether an MMO handle is read-only or read-write. forwardable This function determines whether an MMO handle can be forwarded to a user or not. MMO is forwardable. MMO is not forwardable.
Page 66
An audio MMO. audio A fax MMO. A textual MMO. text The type is unknown. Until an MMO is assigned to after creation, its unknown type is unknown. You can reassign a new value to a writable MMO and give it a different type. length This function returns the length of the MMO.
Page 67
Mu-law. mulaw A-law. alaw Wave. Header specifies format. wave Wave file known to be 8-bit mulaw. wave8 Wave file known to be 16-bit linear. wave16 Wave file known to contain audio in MS GSM format (GSM 6.10). wavegsm MS GSM format. G.721 adpcm.
Page 68
. . . append fax This function can be used to append FAX-format MMOs together. This can be useful, for example, when you have several documents that are to be sent to the same recipient in the same FAX transmission. may be either a FAX-format MMO or it may be an empty (typeless) MMO.
Page 69
This function copies the into the current mmo using the specified append to This function appends the into the current mmo. The format of both mmos must be the same. The following calls are specific to textual MMOs. That is, they exist as member functions of textual MMOs, but not of other MMOs.
Page 70
. This function uses the printto shell extension. By default, is used to print text and html files. Tiff files, however, do not print well with the default Microsoft viewer. We recommend using Amanda Messenger to print tiff files. has no content.
Page 71
You then forward these two MMOs to somebody else as a new message. When the recipient listens to the message, Amanda announces that the current message contains a fax and then plays the voice portion. The recipient can then receive the fax over the same phone line, send it to a printer, etc., by selecting the appropriate option from the voice menu.
Page 72
To simulate the Amanda@Work.Group functionality using this scheme, we can simply stick all messages in folder 0 and use the normal/urgent and read/unread flags to determine the message status. For non- Amanda@Work.Group behavior, we can stick urgent messages in one folder and normal messages in another folder.
Page 73
This function returns the next message in the current folder. You can get the next message accord- ing to a variety of criteria. These criteria are specified by the -urgent/-normal, -read/-unread and -deleted/-undeleted flags. Normally, if you give no flags, then the next message is received no matter what its attributes are.
Page 74
This is an internally created number for the message that is unique within msg id the Amanda system. The system generates this value. Caller id for the message. If no caller id received, it is not set. caller id This is a boolean value (0 or 1) which indicates whether the message’s...
Page 75
This function is the same as get next msg except it goes backward instead of forwards within a folder. If the user is positioned prior to the first message in the folder (as after change folder), then get prev msg will wrap to the last message in the folder, regardless of whether the -wrap argument is used.
Page 76
NOTNONNEG OUTOFRANGE MSGNOTEXIST expunge This function permanently deletes all the messages marked as deleted in all the folders. It also sets the folder to 0 and sets the message cursor to before the first message. get folder stats This function returns information about each message in the current folder. 46 {urgent 1 read 0 ...} 3 {urgent 0 read 1 deleted 0 ...} ...
Page 77
get box stats [-box This function returns information about all the messages in a box, regardless of which folder they are in. It is used to get summary information about a box. If -box is not specified, then information about the currently-logged-in box is returned;...
Page 78
This function is use to set which mailbox messages are being currently accessed. The default is that you can only access the messages of your own mailbox. Once set for another then you just use the same tcl message commands as if they where your own message of your mailbox. To start accessing yoru own messages again, just call this function again by passing in your mailbox.
Page 79
send msg [-urgent] [-private] [-receipt] [-subject ] [-relay ] [-mmos [-at ] [-fcc ] [-caller id ] [-expire ] [-expire absolute] [ ]. . . Send a message to a list of recipients. Recipients can be boxes or mailing lists with the syntax as described above.
Page 80
INVRECIPIENT INVALIDTIME NOTNONNEG OUTOFRANGE CMDNOTEXIST CMDNOTHANDLE UNKNOWNTYPE MMONOTFORW forward msg [-receipt] [-at ] [-urgent] [-private] [-subject ] [-mmos ] [-fcc ] [-expire ] [-expire absolute] ]. . . Forwards a message to the recipients listed. The MMOs in are prepended to the original message MMO list.
Page 81
MMOs are stored internally on disk as files. The types of these files vary depending on whether the MMO is a voice file, text file, . Also, access to MMOs is restricted by the “kernel interface” of Amanda (the calls built in). If access were not restricted, anybody could listen to anybody else’s messages.
Page 82
The MMO Lookup Table is a persistent MMO storage area for MMOs. It stores such things as a person’s greeting, the names they assign to folders, . Entries in this table can be public or private. Public entries can be accessed ( , get an in memory handle) by anyone, while private entries can only be accessed by the owner of the box.
Page 83
NOTNONNEG You are not allowed to access the MMO. See lookup mmo attr for access PERMDENIED rights. BOXNOTEXIST BREQNLOGIN INVALIDVALUE lookup mmo attr [-box ]. . . Lookup information in the MMO table about everything the MMO. is a field to look up. The permission restrictions are the same as for lookup mmo.
Page 84
lookup mmo keys [-box Lookup all the keys in the MMO table for the current box. If -box is given, lookup the keys for the given box instead. In this case, the access rights if the MMO is checked. If access is granted then the key is listed. If a pattern is given, the keys returned must start with that pattern.
Page 85
Deletes the keys from the current box or the given box. Ancestral permission relationships apply. NOTNONNEG BOXNOTEXIST KEYNOTEXIST PERMDENIED INVALIDVALUE Announcements are messages that are sent out to a group. Unlike messages, announcements are owned throughout its life time by the one who created the announcement. Where as in messages, once it is receive the recipient owns the message.
Page 86
The function creates a new announcement. The category states the general subject of the announcement. The begin time and end time defines when the announcement can be listened to. A recipient can not get an announcment outside of these times. The recip type list is a list if names that the application defines as to who gets the announcment.
Page 87
owner delete announcement The function deletes an existing announcement. The states which announcement to delete. The id of the announcement to edit is invalid. INVALIDID Not allowed to delete an announcement. PERMDENIED The configuration parameter is invalid. BOXNOTEXIST CONFNOTEXIST get announcement The function gets an existing announcement.
Page 88
CONFNOTEXIST INVALIDVALUE recip heard announcement The function marks that this mailbox heard the announcement. The id of the announcement to mark heard is invalid. INVALIDID recip list announcement [-recip type list ] [-category The function gets a list of existing announcement this mailbox can receive. The filters the an- nouncements for only those recipient types.
Page 89
The id of the announcement is invalid. INVALIDID The announcement has not been heard by the mailbox. The announcement has been heard by the mailbox. Published MMOs are MMOs that are made public to the world. Anyone can publish a MMO, being logged in is not required.
Page 90
is invalid KEYNOTFOUND list published mmos Get a list of Published MMOs that you have access to. What is returned is a list of that can be used by the get published mmo function to get the actual mmo. The returned list can be empty. A list of published mmo unique keys...
Page 91
Voice devices and to a lesser extent fax and internet devices form the heart of Amanda Portal. Currently, the only voice boards supported by Amanda Portal are a certain set of Dialogic boards which support the SCBus and a certain set of Rhetorex boards. In addition, the Dialogic GammaLink SCBus fax resource boards are supported.
Page 92
In the object-oriented approach, there is one command for each object and the name of the command is the name of the object. (In our implementation, a variable and the command name are bound together.) The first argument to the command specifies the command to execute. For example, you would say “$vp play $mmo”...
Page 93
If you have a VP resource, you may not wish to keep typing . . . $vp handle play all the time. Instead it might be nice just to say . . . play and use $vp handle as the default VP device. The built-in make local command creates a new command for each function that the handle passed as its argument supports.
Page 94
Returns the serial number of the indicated board. This function is available only when the Dialogic DLL has been loaded with the system and when the logged-in mailbox has the MONITOR privilege. NOTINTEGER INVALIDVALUE Each of the T1, LS, VP, and Fax commands can get internal errors generated by the Dialogic driver. If this is the case, a Tcl exception will be raised with an errorCode corresponding to the format BOARDERROR and the Tcl result will be set to the board error message.
Page 95
This function seizes a line for an outgoing call. Call this before you make an outgoing call. On an analog line, this simply goes off hook and verifies that loop current is present. On a digital device such as a T1 line, the seize operation is verified digitally by the far end.
Page 96
If -timeout is given, time out after the given number of milliseconds if the VP device isn’t available. -timeout TIMEOUT RESALLOC2BIG vp NOTNONNEG wait off Wait for the other side to hang up. On an analog line, this function waits for loop current to drop. Some phone switches do not drop loop current when the far end hangs up, so take care in using this function in this situation—it will not return if reorder tone is detected.
Page 97
wait ring This function is implemented by analog ports only. It causes the port to wait for ring voltage to be detected on the line. On a digital port, use the wait on command to accomplish the equivalent function. The system must receive n rings rings before the wait is satisfied, if this PBX parameter has been specified for this port.
Page 98
This function sets the text on the screen for the associated port. You can set either field or both at once. This routine won’t return an BOARDERROR errorCode because it doesn’t call the device driver functions. flashhook Do a flashhook. In some environments, with some analog boards, this function actually does an Earth Recall function on the board (set during driver installation for some voice boards).
Page 99
VP devices can perform long-term operations like playing a recording. Because of this, their operations may be interrupted by the detection of an exceptional condition, such as detection of certain incoming tones like a Fax CNG tone or TDD initiation tone, which indicate that special call processing is in order. We may also detect that the other party has hung up.
Page 100
Success. No operation is currently in progress. NOOPINPROGRESS resume Resume playing or recording. This command should only be executed after you have stopped an asynchronous operation. NOOPINPROGRESS stop Stop playing or recording on the specified device. This command differs from the pause command in that you cannot resume.
Page 101
You tried to skip during a record operation. NOMEANING result [-timeout Returns the result of an asynchronous operation, such as a play, record, or get digits operation. Normally, it waits forever for the result. If the -timeout command is given, only wait for the specified amount of time. Return result is operation dependent.
Page 102
Repeats the playback for times. The default is to play the MMOs once. -times When playback is repeated using -times, then playback will pause -delay between each repetition. The default is zero. Pause if the user presses Resume if the user presses -pause .
Page 103
The options listed mean the same thing as the play command with the exception of the following:...
Page 104
Play finished or -async was given and there was no error. was pressed. A stop command was issued. STOPPED NOTNONNEG HANGUP FAX INITIATION FAX ANSWER TONE play prompt [-async] [-clear] [-term ] [-noretain] ]. . . Play the prompts. Prompts are prerecorded phrases in a file which is opened by the load prompt set command described below.
Page 105
Record at a normal or high rate if normal or high is given. The -rate normal high wave16 actual rate is taken from the rate normal and rate high settings in the Configuration Database. MMOs in the wave16 format are used by speech recognition, and they can be included in Internet e-mail messages with the send smtp mail command.
Page 106
pcpm [-rings ] [-async] [-after] Perform “programmed call progress monitoring”; that is, listen for certain types of tones and return the result found. Example tones are busy signal, the fax answer tone, . -async works the same as the in the play command.
Page 107
The options -dialtone, -busy, etc., cause a corresponding standard tone to be played. The use of these flags overrides the -freq1 and -freq2 flags. NOTNONNEG HANGUP FAX INITIATION FAX ANSWER TONE load prompt set Loads a prompt file into memory as specified by The directory location and extension should not be specified, just the name.
Page 108
HANGUP FAX INITIATION FAX ANSWER TONE set digit type mf dtmf This function changes the type of digits that the driver is to listen for. It does not flush any digits which may already be in the hardware or software digit buffer. [-clear] [-async] [-maxtime...
Page 109
HANGUP FAX INITIATION TONE dial [-mf -pulse -dtmf] [ ]. . . This function dials the string given. If multiple strings are given, they are concatenated together without intervening whitespace. The options tell how to dial. The default is -dtmf. INVALIDVALUE load tones Load the tones from the specified...
Page 110
NOTFOUND RHETSTD VOX OPEN RHETSTD RECORD MMONOTWRITABLE init fax This function works only on a GlobalCall-based VP handles. If the underlying board supports DSP-based faxing, and if a fax resource is available, then this function returns 1. Otherwise, it returns 0. Once this function has returned 1 for a given VP handle, then that VP device can execute the send fax or receive fax commands which are described on page 113.
Page 111
MULTQATTACH BOXNOTEXIST list enqueued ports This function is used to list the port numbers of the ports listening for commands from the current logged in mailbox. hangup|transfer|voicemail|hold [-grt ] [-box send port msg This function is used to send a command message to the specified .
Page 112
on-hook or off-hook state box logged into port if someone is logged in. Number of calls taken on port. calls taken Route information for port. route info Time last call was taken on port in GMT. last call time NOTNONNEG PORTNOTEXIST get ports in use Returns a Tcl list of the ports currently off-hook.
Page 113
* name to digits This function takes one or more names and returns a corresponding list of keypad encodings of those names, using the standard American keypad mapping of letters to digits.
Page 114
Amanda Portal supports Dialogic’s GammaLink fax resource boards via the gamma plug-in module. These boards are the CP/4-SC, CP-6/SC, and CP-12/SC, which provide 4, 6, and 12 fax resources, respectively. Boards can be combined to provide up to 60 fax resources in one system.
Page 115
Sends a fax on the given fax device. If -cover is given, use the given text for a cover page. You can send text, textual MMOs, or fax (TIFF/F format) MMOs from the fax device. When sending a fax, the “csid” (the phone number the fax is considered sent from) is retrieved from the fax driver.
Page 116
If that recipient then tries to reply to the message, the SMTP server code exists so that Amanda Portal can receive the reply and store it in the user’s mailbox. Currently, we recognize MIME and VPIM version 1.0 messages containing voice (in various formats) and fax (TIFF-F) enclosures as well as plain text.
Page 117
Send e-mail to the indicated If -host isn’t specified, then the mail is posted through the host specified by the smtp host parameter in the Configuration Database. You can give a subject line with -subject, whose MMO argument must contain plain ASCII text to conform to RFC-822. The default is not to set a subject.
Page 118
Returns two quantities: the number of undeleted messages on the server and the total number of bytes they represent. undeleted count undeleted bytes CONNBROKEN list [ Returns a list of the message numbers and their size in bytes. If is given, only the message number and size for the message given are returned.
Page 119
get msg Returns the message given by NOTNONNEG MSGNOTEXIST CONNBROKEN get msg top Returns the top lines of a message. All the message headers are returned followed by body lines. NOTNONNEG MSGNOTEXIST CONNBROKEN delete msg Delete the message indicated by .
Page 120
MSGNOTEXIST CONNBROKEN undelete msgs Mark deleted messages as undeleted on the POP server. CONNBROKEN quit Remove all messages marked for deletion and close TCP connection. Simply unseting the variable will drop the connection to the server without “expunging” any deleted messages there, in accordance with the latest POP3 RFC.
Page 121
If the mail message contains audio MIME parts, they will be extracted as audio MMOs. If the message contains textual MIME parts, they will be extracted as textual MMOs. Success. Couldn’t parse the text. PARSEERROR...
Page 122
The serial ports on a computer are a limited resource that is controlled by the resource manager much like the limited VP and LS devices. Amanda Portal can use serial ports, for instance, to integrate with certain types of phone switches (see chapter 14).
Page 123
INVALIDVALUE parity [ Sets the parity to which must be one of odd, even, mark, space, or none, or returns the current setting. INVALIDVALUE binary [ Sets whether the port ignores null characters or returns the current setting. When reading strings with the read function, this parameter should be set to “true.”...
Page 124
INVALIDVALUE stop bits [ Sets the number of stop bits to which must be one of 1, 1.5, or 2, or returns the current setting. INVALIDVALUE data bits [ Sets the number of data bits to which must be from 4 to 8, or returns the current setting. NOTNONNEG INVALIDVALUE gets [-timeout...
Page 125
Return a single character from the input stream. Default timeout is infinite. TIMEOUT Null character read. Non-null character read. NOTNONNEG write Write the string to the serial port. read Read a string of max characters from the serial port. NOTNONNEG...
Page 126
In addition to the COPY TO privilege, the regular ancestor relationship restrictions in Amanda Portal apply, so you cannot modify the copy to of a non-descendant even if you have the privilege.
Page 127
BOXNOTEXIST PERMDENIED Only received if using the copy to key. Values for this key must be box NOTNONNEG numbers. INVALIDVALUE delete lmapping [-box ]. . . Delete a set of values from a list mapping. This only deletes the values given and leaves the other values in the list.
Page 128
This gets all the lists that this belongs to. If is specified then just the lists of that mailbox is searched. INVALIDVALUE set lmapping [-box ]. . . This sets the value of the list mapping to the indicated values. Old previous values deleted.
Page 129
get global [name...] This function returns an a-list of the global variables, or keys, and their values. If no names are specified, then all defined global variables are returned, and otherwise, only the requested ones are returned. The specified key is not currently defined. INVALIDKEY increment global [-by ] name...
Page 130
This function can be called only by interpreters executing with the GLOBAL MONITOR privilege. The specified key is not currently defined. INVALIDKEY When you call into a phone system, you may not know a person’s extension. Instead, you may only know a person’s name.
Page 131
Creates a new trie mapping with the name . Initially the map has no keys. You must have the CREATE TMAPPING privilege to execute this call. MAPEXISTS PERMDENIED destroy tmapping Destroy a trie mapping database. All the entries and the map itself are destroyed. You must have the CREATE TMAPPING privilege to execute this call.
Page 132
isn’t alphanumeric. 411 map only. INVALIDKEY Received when you try to insert a non-numeric value into the 411 map. INVALIDVALUE PERMDENIED MAPNOTEXIST 411 trie mapping database only. BOXNOTEXIST . . . delete tmapping Delete the entry containing the associated . If maps into two “internal keys,”...
Page 133
query tmapping [-alphanumeric] Query the trie mapping database and try to find a match. The alphanumeric and numeric portions of the tree are known to the system. Normally this function only searches the numeric portion of the tree. If you want search the alphanumeric portion of the tree, use the -alphanumeric option.
Page 134
The Configuration Database persistently stores configuration information in four distinct categories: Parameters that are global to the system. Parameters that are specific to a port on a board. Parameters that are specific to an extension in the system. Parameters that are specific to a certain type of PBX in the system. The last three types of parameters require some type of to identify the port, extension or PBX in question.
Page 135
Each of the categories of parameters are separate except for the port and pbx databases. If a key does not exist in the port database, the pbx database is checked for the parameter value. To determine which pbx settings to check for, the special setting pbx is checked in the port database to determine the id of the pbx database entry to check.
Page 136
This function takes and returns parameters using the long form rather than the short form as in the previous function. That is, you can pass in “n rings 19” and “n rings *” and get back two values if there are two different values for these keys in the database.
Page 137
This function deletes a set of parameters from the system. All s should be given in long form. You must have the CONFIGURATION privilege to execute this call. KEYNOTEXIST PERMDENIED Each parameter name has help text associated with it. The help text describes what the key means and is displayed on the screen to the user when he is looking at a certain key in the Configuration Database.
Page 138
PERMDENIED For a list of all the parameters recognized by the system, see “The Amanda Portal Administration Guide.”...
Page 139
There are three kinds of triggers in Amanda Portal: those that fire when a certain time is reached, those that fire when a certain condition is met, and those that fire when some data changes. These are known as autoschedules, notify records, and dtriggers (data triggers). Autoschedules are basically used for time related events like causing any phone calls to go to your voice mail after 5PM.
Page 140
This command can be used to create or modify autoschedule records for the current mailbox or for another box by specifying - . The pairs consist of one or more of the following fields in the database: INITTIME This field specifies the first time that the autoschedule record should be executed. The time is specified as a coordinated universal time value.
Page 141
PERMDENIED NOTBOOLEAN FIELDNOTEXIST INVALIDVALUE INVALID DURATION schedule get [- Retrieves the indicated schedule for the current or indicated mailbox number (must be a decendant). Returns the information in an associative array if a variable name is indicated, else as an a-list of parameter and value pairs as the value of the function.
Page 142
schedule copy [-no notify] Copies all the schedules from one box to another box. This will ignore existing schedules in the can be any valid mailbox number, while the must be the logged in box or a child of the logged in box. Specify -no notify to suppress notifying of the new schedules; this is useful for faster processing when creating specifies the currently logged-in mailbox, then that box must have its schedule lock attribute off...
Page 143
Finally, the job queue can also manage the outbound calling operations so that they are executed only within restricted time periods. You can specify this by the day of the week, the time of the day, and/or the date. When a job would otherwise be executed but it is restricted from doing so by the day, date, and/or time, then it is automatically rescheduled to run at the first opportunity in the future when all the conditions for execution will be met.
Page 144
The notify instance is also tied to the notify record which started it by the message’s number and by the notify record’s id. When the message which caused a normal or urgent notify to fire is marked deleted or heard, then any remaining outstanding notify instances for that message will be deleted automatically by searching the notify instance database for the corresponding notify record id.
Page 145
Checks all the notify records of the current mailbox for a record of . If there are any, then they are fired off being passed the notify schedule [-box...
Page 146
This command schedules a job for automatic processing, which is typically an outbound call. It is also used internally by the notification record subsystem described above. The arguments have the following meanings: The notify will be placed in the specified box. Must have the NOTIFY ANY BOX privilege. The template name specifies which notify template (see section 12.2.3) contains the Tcl code to be executed by this job.
Page 147
NOTNONNEG NOTNONNEG NOTNONNEG NOTNONNEG NOTINTEGER NOTINTEGER notify list [ Notify instances are permanent until they have been stopped by their maximum number of successes or failures, or they are deleted by the notify delete function or by a message pickup (or the deletion of the owning mailbox).
Page 148
IDNOTEXIST PERMDENIED template set The template set command allows a user to define or redefine notify templates. There is no set limit on the number of templates, except that template names are constrained to be no more than 16 characters, case insensitive.
Page 149
This command is defined only if the logged-in user has the CTRIGGER CODE privilege. template list This command can be used to enumerate the existing notify templates. template get The template get command loads into the calling interpreter. This results in defining a function called notify with one argument, as described above.
Page 150
INVALIDKEY Amanda clients connect to the Amanda Portal server and allow you to send and receive voice mail through your computer rather than through your telephone. These clients also monitor different kinds of status information in the server. Whenever some data changes on the server, these clients need to be updated with the changes.
Page 151
Send me info about box setting changes on port dtrigger id “id1” 5000. (Port 5000 call opened.) result box changed (port 5000) Send me info about lmapping changes on port 3000. (Port 3000 opened.) Send me info about autoschedule record changes on port 3000.
Page 152
Another command, invoke dtrigger is called when the trigger is actually fired. It performs the actual work of contacting the client and delivering the information about the event which happened. Two other functions are used only for monitoring the system (observing port changes, capturing trace information, etc.). The rea- son they are separate is that they must be at a very low level in the system to avoid “feedback loops”...
Page 153
PERMDENIED HWRONGTYPE NOTINTEGER monitor list Enumerates all the monitors that have been created by not deleted by this interpreter. monitor delete This function deletes a monitor by its The specified monitor must exist and have been created by this interpreter. NOTNONNEG IDNOTEXIST add trigger request...
Page 154
NOTNONNEG delete trigger request Deletes a previously-established low-level data trigger of type If no trigger of that type exists, no indication is given to the caller. add dtrigger...
Page 155
Tell the server to start sending changes related to back to the client on port . If is not currently opened, it is opened up first. This command is only valid (and in fact only injected) in interpreters over a TCP/IP connection. You needn’t give the IP address to send the data to because it can be figured out by inspecting the IP address the request came in on.
Page 156
delete dtrigger Deletes the dtrigger identified by . The information being sent by this dtrigger is no longer sent to the client. If this is the last dtrigger on the port, the port is closed. IDNOTEXIST invoke dtrigger When the server sends data back to the client, it sends back a command like name is the same as the name given in the add dtrigger command.
Page 157
Setting has been deleted on ]. . . box creation add delete The child boxes given have been either created or deleted with relation to ]. . . ttrigger A new ttrigger for the specified box has been added. is the id of the new ttrigger added. delete [ ].
Page 158
Each of the s have been added or deleted from the for the specified box. lmapping The lmapping key has been set to the values in ]. . . tmapping add delete The set of values for the given have been added to or deleted from the database. add delete [ ].
Page 159
]. . . message The message specified by has changed. It’s new attributes are given by the pairs. is the internal message number returned by get next msg. You can only monitor your own box with the message type. expunge [ ].
Page 160
The system is shutting down. The system may take a while to shut down or may be shut down immediately. This call doesn’t differentiate between the two. ]. . . call queue view add call A new call, identified by , has entered the .
Page 161
]. . . call queue set queue A queue attributes has been changed. The key/value pairs have the same values as that given by the queue info command (see page 181). call queue expunge queue The queue has been removed. ].
Page 162
A agent’s status has changed. call queue view delete agent mailbox The agent identified by has left the ]. . . call queue stats Real-time statistics update for the...
Page 163
The system maintains an area on disk where you can store persistent Tcl procedures. Anybody with the EDIT PMETHOD privilege (which will normally be limited to administrators) can use the store proc command to store or modify a procedure in this persistent pool. Anybody can access and source the procedures in this persistent pool.
Page 164
PERMDENIED PROCNAMETOOLONG proc info body args procs [ Depending on the argument list, return different information. If body is specified, return the body of the procedure. If args is specified, return the argument list of the procedure. If procs is specified, return the name of all the procedures in the persistent procedure database.
Page 165
Integration and the need for it were discussed in Chapter 3. To simplify parsing integration information that comes back from the various phone switches, tAA came up with the concept of “patterns.” Patterns are strings of characters—some characters with special meaning—that are matched with the information that came back from the phone switch.
Page 166
NOMATCH This call came to Amanda because and extension was busy. BUSY This call came to Amanda because an extension didn’t answer within a NOANSWER set number of rings. A call to an extension was ring-no-answer, based on the number of rings programming in the phone switch for that extension.
Page 167
Ring-no-answer. The extension “rrr” did not answer after some number of rings which is programmed into the phone switch (this is independent of the RNA field in the voice mailbox settings of Amanda). Sets the CalledMailbox variable in the interpreter.
When integration information comes in, it may not come into Amanda in lock step with the call coming to Amanda. Therefore, Amanda has a window within which the integration information must be received before it is considered valid.
The features and commands described in this chapter are available only if the CallQueue2 DLL is loaded with the system. The identity of a user in Amanda Portal is closely associated with a box. You must log into a box to be known to the system. Each user ( , box owner) may wish to have a queue of people waiting to call him.
Page 170
If we are using a PBX, the agent must indicate to the system that he has hung up because the PBX doesn’t notify Amanda Portal. The agent may do this by hitting a button on the screen of the Call Queue Agent application.
Page 171
When you add an agent to queue, you can specify additional “privileges” that that agent has. They are not privileges in the traditional global sense; rather, they are privileges that are specific to the queue model and are not set through the traditional privilege mechanism. You can specify 1.
Page 172
Agents that could handle call leave. Call variable returns NO MORE AGENTS. Enter call queue. Call # Call trans- Play the specified greeting back to the returned. fered caller. VOICEMAIL. Call Waiting Call queue long. In Queue QUEUE TIMEOUT returned and call Call position change.
Page 173
The queue manager can send updates to the callers about their position with in queue. There are three settings to choose from for the QUEUE REPORT POS: never, position, or time. If never is set then the callers will not get any updates. The callers can still ask for themselves where they are at in the queue. If position is set then the callers will be notified every time the callers position changes.
Page 174
This function create a queue for the user’s box or one of his descendent boxes if the -queue option is given. is a box number. You must have the CREATE QUEUE privilege to create a queue for a box. is a list of extended fields that will be displayed on the screen when the calls are displayed. They are user defined.
Page 175
PERMDENIED INVALID QUEUE INVALID COLUMN set queue setting [-queue ]. . . Sets different settings for a queue. You need the CREATE QUEUE privilege to set settings on a queue. The extended fields of the can be set along with the known settings as follows: If a call sits in the queue longer than , it is automatically max wait...
Page 176
This function adds the users of each to the list of boxes that are allowed to handle calls for the box currently logged in. You need the CREATE QUEUE privilege to set settings on a queue. It does not indicate that the should start receiving calls for the queue, just that they are allowed to receive calls if they wish.
Page 177
Set the wrapup time in seconds. If set to zero, there is no wrapup time. wrapup The default is infinite amount of wrapup time. If an agent wants to only receive calls at their discretion, they can either set themselves unavailable and then make themselves available when they want to receive the next call or if they have the “disposition”...
Page 178
PERMDENIED INVALID QUEUE get agent setting [-queue ]. . . This function returns agents enabled on a queue and the settings for each of those agents. set agent settings PERMDENIED INVALID QUEUE INVALID AGENT disable agent [-queue ]. . . This function disables the s from the list of boxes allowed to receive calls from the queue.
Page 179
The following commands fall into two categories: those intended for agents (listed first) and those intended for callers. Both create a handle in the form of a Tcl variable. For clarity, the agent’s handle on the queue will be called while a caller’s handle will be called attach to queue This function attaches an agent to a queue.
Page 180
Disposes of a call specified by , as the agents sees fit. The agent must have the disposition privilege to use this command. The agent can either transfer, voicemail, or hold the call to either a . If greeting is specified then of either the queue mailbox or if specified the is played back to the caller.
Page 181
Returns the result of the implicit wait operation. When this agent’s status changes, then the result will become available. If nowait is specified then this will return immediately, otherwise this agent will wait until a result is sent. available [-agent Tells the system that the agent is available or unavailable to take the next call.
Page 182
STATUS ERROR accept call Accept or reject a call being sent to you. You must have the “rejection” privilege to use this call. The agent is notified of a potential incoming call with a the accept call dtrigger described on page 154. After receipt of the dtrigger, a dialog box is posted on the screen and the agent can accept or reject the incoming call using this member function.
Page 183
Queue timeout. max wait Average time a call is waiting in the queue. avg wait time Average time a call is waiting in the queue per position change wait time per call (dequeue rate). Whether or not the queue requires a wrapup of the call. require wrapup This is a list of extension fields that were given when the queue extended fields...
Page 184
This function returns the agent’s position. As agents are assigned to calls, the positions of the remaining available agents are decremented until they reach position 0, at which point they are eligible to be assigned to a call. If an agent is not available to take a call then -1 is returned. call info This command returns all the information about the calls in a queue.
Page 185
stats Returns the current statistics of the queue, since the queue manager started its session (not since inception.) The current number of attached agents. attached The current number of available agents. available The current number of agents busy working on a call. busy The current number of attached unavailable agents.
Page 186
The -by option allows you to specify how the data should be grouped. The default is -by hour. Grouping the data -by day means by day of week, whereas -by daily means by the day of the month. Weeks are 7-day periods starting on a Sunday.
Page 187
Since the agent didn’t answer, it is assumed he is unavailable but forgot to inform the Amanda system of this fact. The -even if no agents option allows the call to enter a queue even when there are no agents attached to the queue.
Page 188
This tests the if there are any agents currently attached. transferable Determines whether a call will be transferred to an agent when it reaches the top of the queue. If is true, the call will be transferred. If is false, it will not be transferred. Setting this to false also prevents an agent from disposing of the call in any way if the agent has the “disposition”...
Page 189
Queue timeout. max wait Average time a call is waiting in the queue. avg wait time Average time a call is waiting in the queue per position change wait time per call (dequeue rate). Whether or not the queue requires a wrapup of the call. require wrapup This is a list of extension fields that were given when the queue was created.
Page 190
Notifies the queue manager the type of TRANSFER METHOD the caller is using to connect to an agent. Certain types of transfer methods can allow Amanda Portalto automatically detect when a hangup condition occurrs, thus allowing the queue manager to automatically go into wrapup mode for the agent.
Page 191
event Returns the event handle to wait on the hold time This function indicates that the agent has put this call on hold for the indicated number of This information is recorded in the queue statistics database for the agent (not for the call). agent redirect This function indicates that the agent is redirecting this call (transferring it).
Page 192
Amanda Portal needs the ability to talk to third-party databases to retrieve information. For example, suppose that technical support tracking information is stored in a third party database. Amanda Portal may need to query this database to find out information on a user’s support call. This integration is done through the Open Database Connectivity or ODBC standard.
Page 193
SQLERROR ... connect odbc [-user ] [-password ] [-timeout ] [-exclusive] Connect to using (if needed) and return a handle in . If -exclusive is given, then create a new connection to the database that will be broken when the variable is deleted; otherwise, share connections if possible.
Page 194
data type size significant digits precision radix nullable description sql [-async] Execute the SQL statement and return the results. For UPDATE, INSERT, and DELETE statements, the value returned as row count is either the number of rows affected by the request or -1 if the number of affected rows is not available. For other statements and functions, the driver define this value.
Page 195
call [-result] procedure name [ ]... The call command allows the user to invoke a stored procedure in the database. Stored procedures may return a value (as a function) or they may simply perform some operation, possibly returning values via output parameters (as a procedure).
Page 196
rollback Rollback a transaction previously started with begin. fetch Fetch a row and return it. can be next, prev or an integer specifying the absolute row in the resultset. Some databases only support next. NODATA fetch info Returns information about the result set that will be returned by the fetch command. size data type nullable significant digits get isolation...
Page 197
set isolation This function sets the transaction isolation level for this database connection to one of the four possible levels, read uncommitted, read committed, repeatable read, and serializable.
Page 198
Here are some miscellaneous functions that don’t seem to fit anywhere else. trace out [ ] This function returns approximately the last lines from the trace file, if the system is currently writing to a trace file. If there are fewer than lines in the file, or if the file has “wrapped around,”...
Page 199
This command is defined only for mailboxes with the SHUTDOWN privilege. If run without the now argument, a normal shutdown is begun, which takes up to tmo shutdown seconds (a parameter from the Configuration Database, usually set to 60 seconds). The command shutdown now will cause a very quick shutdown (equivalent to pressing “Exit Now”...
Page 200
NOTNONNEG spawn Start a new thread and run the script in the new thread. The new thread runs as the person logged in if the person is logged in. enable debugger Turns on or off the Tcl debugger within the current interpreter. It makes the debug window pop up. It must be called at the top of the call stack and TclDebug.dll must be loaded (use the dlls setting in the Configuration Database).
Page 201
Some of the tokens in Amanda@Work.Group cannot be implemented in Amanda Portal because they would violate security. For example, in Amanda Portal you can read from and write from the disk arbitrarily. Under Amanda@Work.Group this was acceptable using tokens because only the system adminstrator could set up tokens.
The 10 global variables. %G0, %G1, %G2, %G3, %G4, %G5, %G6, %G7, %G8, %G9 Causes a chain to the specified box. In Amanda Portal, it simply raises an exception with the error code CHAIN . The TUI then catches this code and takes the appropriate action.
Page 203
Receive a fax file and sends it to the specified . The arguments are ignored. K<( [, Command that shifts the values of the %S variables to the left or right. is a number from 0 to 20. When positive, shift left. When negative, shift right.
Page 204
Amanda should wait for the first character and also between characters for the character to be received on the serial port. Expands to the number of seconds that the current call has been active.
Page 205
Converts an integer time value returned by clock seconds or clock scan to human-readable form. If the -format option is present, the next argument is a string that describes how the date and time are to be formatted. Field descriptors consist of a % followed by a field descriptor value. All other characters are copied to the result.
Page 206
NOTNONNEG NOTBOOLEAN INVALIDVALUE uptime Returns the number of seconds since Amanda Portal was brought up. is yesterday...
Page 207
Given a Coordinated Universal Time value (the number of seconds since January 1st, 1970, GMT), return true (1) if that time occurred sometime during the previous day, and otherwise return false (0). NOTNONNEG is today Given a Coordinated Universal Time value (the number of seconds since January 1st, 1970, GMT), return true (1) if that time occurred sometime during the current day, and otherwise return false (0).
Page 208
THREADNOTEXIST PERMDENIED There are a couple of functions for logging information to files or the console. They are as follows: wlog [ ]. . . Write a log message to the Amanda log file. wtrace [ ]. . .
Page 209
Write a trace message to the Amanda trace file. The following command is loaded only if you load the Speech Recognition DLL (AmaSapi5). compile grammar Compiles . If an error occurs, return an error indication in the usual way. Otherwise, store the compiled grammar into the specified...
Page 210
Recognize speech against the grammar. The grammar identified by must have been previously compiled with compile grammar. The return value will be the same as for the record member function if the operation is interrupted in some way (timed out, stopped, caller pressed a digit, etc.). Otherwise, it returns an a-list of information detailing what phrase was recognized (by command number), the confidence level of the recognition (from -100 to +100), and any strings embedded in the grammar itself (for which care should be taken that they will appear to be an a-list).
Page 211
The return values and errors are the same as for the play member function. You can also set the configuration parameter sr wait. This parameter in milliseconds will wait this long for buffers to be read in. If no buffers have been read in in this amount of time then this function will stop recognizing and return a result.
Page 212
The -useragent argument allows you to specify the value value of the User-Agent header in the HTTP request. The default is Amanda. The -proxyhost argument allows you to specify a proxy host through which the query should be posted.
Page 213
Amanda provides commands such as http geturl or POP commands for accessing specific types of servers. Sometimes, however, it is necessary for Amanda to connect to another computer in a specialized way. The TCP Client Connection feature allows you to do this.
Page 214
This command causes the system to do a |recv()— operation on the handle. There are several options to the receive function. If the receive is performed asynchronously, then the command will return immediately. Subsequently, you may use the stop and result functions to access the results of the receive. The -max option sets the maximum number of characters to wait for.
Page 215
Open a connection to an indavo box. The is the TCP/IP address of the Indavo box. The the variable that represents the connection object and has the commands that follow this command. ALREADY CONNECTED FAIL LOAD PARAM ILINK FAIL CONNECT ILINK VERSION OLD ILINK CORRUPT save...
Page 216
ILINK INVALID GROUP ILINK GROUP RANGE FAIL GET PARAM ]. . . get ring group This gets the of a ring group. A ring group is a group of extension ports. The is 1 based, ranging from 1 to 6. If no fields are specified then all fields are returned. can be any of the following: phone, rna, busy, and ext list.
Page 217
ILINK INVALID PORT ILINK PORT RANGE FAIL GET PARAM delete port This clears out an extension port. The is 1 based, ranging from 1 to 12. This is just a special form of set port that sets everything to 0 or empty. Must call save after all the set have been called.
Page 218
Some modules require COM to be activated. Currently AmaSAPI5 is the only such module. In the future there may be others. COM needs to be initialized and uninitialized in a consistent manor within a particular connection instance to Amanda (thread). The following function within the core of Amanda will control that.
Page 219
When an exception occurs, the error code and error message are initimately tied together. With the exception of USAGE and BOARDERROR error codes, the error message will always be the same. The parameters in each error code may vary though, even for the same error code. You need to look at the documentation for the API function to see the exact value returned.
Page 220
FILEOPENFAIL File open failure. FORWNOTSTORE Cannot store non-forwardable MMOs. FUNCNAMETOOLONG Function name too long. GBOXLIMIT Maximum number of child mailboxes reached. GRAMMARCOMPILEERR Grammar compile error. GRAMMARNOTEXIST Grammar does not exist. HANGUP A hangup was detected. HOSTNOTEXIST Host does not exist. HREADONLY Handle is read-only.
Page 221
NONAUDIOMMO Not an audio MMO. NONFAXMMO Not a fax MMO. NONTEXTMMO Not a textual MMO. NOOPINPROGRESS No operation in progress. NOQUERY No active query. NOTHREAD No thread running. NOTALIST Not an a-list. NOTATTOPFRAME Not at the top Tcl frame. NOTBOOLEAN Not a boolean.
disconnect, 94 get msg, 118 dispose, 178 get msg top, 118 dsp attach, 94 get next msg, 71 dup mmo, 69 get odbc sources, 191 get param, 134 enable agent, 174 get param by long, 134 enable com, 217 get param help keys, 136 enable debugger, 199 get param help text, 136 enqueue call, 185...
Page 224
delete msg, 118 list resource types, 36 fetch, 195 list tmapping databases, 132 fetch info, 195 lists, 9 flow in, 122 llength, 16 flow out, 122 load prompt set, 106 get isolation, 195 load tones, 108 get msg, 118 Logging Events, 207 get msg top, 118 login, 44 getc, 123...
Need help?
Do you have a question about the Amanda Portal and is the answer not in the manual?
Questions and answers