MakeCall
Modem Manager
Description | This subroutine queues a call request. |
Returns | Numeric |
Related to: | CancelCall |
Format: ![]() |
\ModemManager\MakeCall(PhoneNumber, Baud, DataBits, StopBits, Parity [, CallTime, Tag, Workstation, MediaMode, Voice, UseLocal, Area, UserData, Service, Attempts, QTime, ID, InitString, UserName, Password, Domain, PPPFlags]); |
Usage | Script Only. |
Parameters |
PhoneNumber | ||||||||||||
Any text expression for the phone number to be called. If required, this may be the canonical international format. | ||||||||||||
Baud | ||||||||||||
Any numeric expression giving the baud rate to be used on the modem connection. The baud rate must be in the range of 0 to 115200, and must divide evenly into 115200 with no more than a 2.5% error. The value of "0" has special significance. This corresponds to the maximum baud rate available for the particular device. See Baud Rate. | ||||||||||||
DataBits | ||||||||||||
Any numeric expression giving the number of data bits per character to be used on the modem connection. DataBits must be 5, 6, 7, or 8. | ||||||||||||
StopBits | ||||||||||||
Any numeric expression giving the number of stop bits per character to be used on the modem connection. StopBits must be 1 or 2. | ||||||||||||
Parity | ||||||||||||
Any numeric expression giving the parity checking to be used on the modem connection. This may be one of:
|
CallTime |
A signed, numeric expression representing the time in seconds, relative to the current time, at which the call should be made. A negative value means that the call should be started as soon as possible. However, the call will be queued behind calls that specified a more negative time. If the value CurrentTime() is used here, then the call will go to the head of the queue. The default value for this parameter is "0" (i.e. now). |
Tag |
Any expression resolvable to the name of the tag making the call. The default is Caller(Self())\Name. Tag must be resolvable in the scope of Code, and must resolve to an object. That object must contain a variable called DataPort that will be used by the Modem Manager for call control and progress purposes. |
Workstation |
Any text expression identifying the computer on whose behalf the call is to be made. The call progress and results will be delivered to the DataPort variable in the object Code\Tag running in the application identified by the GUID of the application that originally called MakeCall() on the workstation identified by the Workstation parameter (but see also the Service parameter). This parameter defaults to the value \RPCManager\WkstnName on the machine that calls MakeCall(). |
MediaMode |
A valid numeric expression being a valid MediaMode constant. Use this when you require particular media properties (e.g. Voice) of a modem, and not all modems in the pool posses those properties. The default value selects any available modem. |
Voice |
If making an outgoing voice call, then this parameter specifies the text GUID of the voice to be used by the Text-to-Speech engine. |
UseLocal |
Normally, calls are queued for dispatch via one of the pool modems, which may be on a completely different machine. If you wish to use a local modem (e.g. a USB or PC Card modem on a laptop computer), then this parameter should be set to a numeric, non-zero value. It is necessary to also configure at least one modem as a local modem. |
Area |
The area parameter of modem tags may be used to create functional groupings. If this parameter is specified to MakeCall(), then only a modem that has the same area parameter will be used to make the call. If there is no such modem configured in the system, then the call will be unceremoniously canceled. |
UserData |
Opaque user-supplied data that is passed back to the user when the ModemControl plug-in is called. |
Service |
The parameter Workstation explains the normal rules for delivery of the call results. If this Service parameter is given, and is the text name of a driver service, then the call results will be delivered to the current server for that service, rather than the machine identified by the Workstation parameter. |
Attempts |
Count of attempts at this connection. This parameter should be INVALID or 0 initially. |
QTime |
The time that the call was originally requested. This parameter should be INVALID initially. It is used on subsequent attempts. |
ID |
If valid, then this is the Server's call ID. |
InitString |
An optional text value that will be sent to the modem as the final part of initializing it for use, just before it dials out. The string should include any terminating characters that the modem will require to complete the string, such as "\r". |
UserName |
An optional text value providing the user name for remote authentication of a PPP connection. |
Password |
An optional text value providing the password for remote authentication of a PPP connection. |
Domain |
The domain name, used for remote authentication of a PPP connection. |
PPPFlags |
An optional numeric value indicating parameters of the PPP connection. See PPPDial for a list of values and their meanings. |
Comments | Returns one if the call is successfully queued. If a zero is returned, the call has not been queued, and will not be queued. As soon as MakeCall() is called, the tag's DataPort variable is set to a valid value. This value will be changed many times subsequently, but will remain valid until the call is completed or canceled. Shortly after calling MakeCall(), DataPort will become a pointer to an array. This indicates that the call is queued. When call setup is initiated, DataPort will become an integer value >= "0". Should the call fail in any way, then DataPort will become negative. If the call setup completes successfully, then DataPort will change to a Stream value (ValueType(DataPort)==8). The call requestor may now read and write to that stream to communicate with the called party. To hang-up the call, call CloseStream(). If the other end hangs up or the call fails, then DataPort will go invalid. If the call setup fails, then the call will be retried according to the configured retry settings. If the call is retried, then DataPort will again become an array pointer while the call is queued. DataPort will not go Invalid until the call is abandoned. If the originator requires that a call be canceled before it is completed, then the CancelCall() method should be used. If the originator changes the DataPort value, the effect is undefined. |