SendFax Control

Description

This control provides the ability to send one or more faxes while performing voice processing on a channel in VBVoice.

The SendFax control is linked to a fax server integrated with a voice card, such as Dialogic. The faxes are sent on the same call that initiated them. VBVoice supports only same-call fax. The SendFax control has properties to configure the recipient and sender information, and a default document. Access to the underlying VBFax automation objects is provided for further customization.

Use of the SendFax Control

When a call enters through the Add input for the first time, a new VBFaxJob object is created, and a document added to that job. The document is specified by the properties in the Document property page. These fields may contain references to other VBVoice controls so that the document can be selected based on user input. The call then exits out of the Add output.

If the call loops back and re-enters the Add input, another document is added.

In order for the fax to be sent, the call must enter the Send input. At this point, the fax is sent to the fax server.

There is only one recipient who will now be expected to start the remote fax machine in order to receive the fax.

After the fax has been sent, the call exits out of the Sent output.

If an error occurs during either Add or Send operations, the call will exit out of the Error output.

Initial Setup Properties

DocumentFilename

(String)

The filename to the default document file to be transmitted by the SendFax control. This may also contain a VBVoice %..% property name referring to a property in another control. The acceptable file types are determined by the fax server in use. An unknown file type is assumed to be a text file.

Dialogic voicecards: The file can be a complete path or a path relative to the default faxout directory, set by the FaxPathOut INI setting, default is C:\Program Files\Pronexus\VBVoice\faxout.

DocumentName

(String)

A user assigned string describing the default document.

FaxCoverPage

(boolean)

Set to True to enable SendFax to generate a cover page when transmitting fax documents.

FaxCoverText

(String)

The text to be placed as free-form text on the cover page for the fax transmission. This field is made available as a variable in the cover page template.

FaxCoverAlternateFile

(String)

Set this to the filename of an image file to use in place of the default cover page. If only a filename is supplied with no path, the default directory for the cover page file will be assumed.

For same-call servers such as Dialogic, this should be a path name on the local machine. If a filename or relative path name is supplied, this will be relative to the VBVoice directory.

FaxResolution

(FaxResolutionConstants)

Specifies the preferred document resolution to be used when transmitting the fax document. This property is of type FaxResolutionConstants and has values:

FaxSubject

(String)

The subject text to be placed on the cover page of the fax.

FaxUserData

(Variant)

This property is assigned to the UserData property of the CurrentJob when sent. This property could be used, for example, to record which SendFax control on a form sent the fax. Note that the UserData value is not persistent and is not available from other fax client sessions.

RecipientFaxNumber

(String)

The fax number to transmit this fax to. This property is available on cover page templates as <To.Fax>.

RecipientName

(String)

The name of the person to receive the fax. This property is available on cover page templates as <To.Name>.

RecipientOrganization

(String)

The organization of the receiver to appear on the cover page. This field is optional. This property is available on cover page templates as <To.Company>.

RecipientPostalCode

(String)

The postal or zip code of the recipient. This field is optional. This property is available on cover page templates as <To.Postal>.

RecipientState

(String)

The state, province, or territory in which the recipients address resides. This field is optional. This property is available on cover page templates as <To.State>.

RecipientStationID

(String)

Returns the CSID of the recipient of a fax, when using same-call only. To retrieve the CSID of individual recipients of other faxes, use the Stationed property of each recipient after the fax has been received.

RecipientStreetAddress1

(String)

The first line of the street address of the recipient. This field is optional. This property is available on cover page templates as <To.Mail> in conjunction with RecipientStreetAddress2.

RecipientStreetAddress2

(String)

The second line of the street address of the recipient. This field is optional. This property is available on cover page templates as <To.Mail> in conjunction with RecipientStreetAddress1.

RecipientVoiceNumber

(String)

The voice telephone number of the recipient. This field is optional. This property is available on cover page templates as <To.Voice>.

SenderCity

(String)

The city of the senders address. This field is optional.

SenderCountry

(String)

The country of the senders address. This field is optional. This property is available on cover page templates as <From.Country>.

SenderDepartment

(String)

The department of the sender. This field is optional. This property is available on cover page templates as <From.Dept>.

SenderEmail

(String)

The email address of the sender. This field is optional. This property is available on cover page templates as <From.Email>.

SenderFaxNumber

(String)

The fax number of the sender. This field is optional. This property is available on cover page templates as <From.Fax>.

SenderName

(String)

The name of the sender to appear on the cover page. This field is optional. This property is available on cover page templates as <From.Name>.

SenderOrganization

(String)

The organization of the sender. This field is optional. This property is available on cover page templates as <From.Company>.

SenderPostalCode

(String)

The postal or zip code of the sender. This field is optional. This property is available on cover page templates as <From.Postal>.

SenderStationID

(String)

This property sets the CSID of the sending fax. See StationID of VBFaxJob.

SenderState

(String)

The state, province, or territory of the senders address. This field is optional.

SenderStreetAddress

(String)

The first line of the senders address. This field is optional. This property is available on cover page templates as <From.Mail> in conjunction with SenderStreetAddress2.

SenderStreetAddress2

(String)

The second line of the senders address. This field is optional. This property is available on cover page templates as <From.User1> in conjunction with SenderStreetAddress1.

SenderVoiceNumber

(String)

The voice telephone number of the sender. This field is optional, but highly recommended. This property is available on cover page templates as <From.Voice>.

Runtime Properties

All the runtime properties below are indexed by Channel unless otherwise specified.

CurrentJob

(Channel as Integer)

This property contains the current fax job for each channel. This is an array of VBFaxJob objects. See the Object Reference, VBFaxJob Object for details on using the object returned by this property. This property is available in either the Enter or EnterB event for this control. After the call terminates, the current job will be sent and a new (empty) job created and assigned as the new CurrentJob. To retain a reference to the job sent, assign the CurrentJob(channel) value to a variable during the Exit event. This job may be referred to through this variable after the call is completed.

DeliveryDuration

(Date)

Equivalent to the VBFaxjob DeliveryDate property.

Documents

(Channel as Integer)

This is an array of VBFaxDocuments collection objects indexed by channel, which contains the documents to be transmitted in the current job. See VBFaxDocuments Collection for details of using this collection.

IPFaxType (supported only on HMP)

(Channel as Integer) as vbvIPFaxTypeConstants

HMP is capable of originating and receiving a fax using a V.17 soft modem. This facility can be used for routing the V.17 PCM data over a G.711 coder in a "fax pass-through" mode. This is recommended only on local area networks or on specialized VoIP networks.

The default is T.38 fax (vbvIPFaxTypeT38). The type of the fax could be changed only in the Enter event.

Example:

Private Sub ReceiveFax1_Enter(ByVal channel As Integer)

SendFax1.IPFaxType(channel) = vbvIPFaxTypeG711

End Sub

JobStatus

(FaxStatusConstants, read-only)

The current state of the last job for each channel. Note that refreshing the Jobs collection has the effect of updating the status of every job and recipient in the collection. See FaxStatusConstants.

JobStatusText

(String, read-only)

An additional text description of the state of the last job for each channel. This property is used to provide informational messages back to the user.

JobStatusReason

(FaxStatusReasonConstants, read-only)

The StatusReason is used to determine the reason the last job for each channel. is in a particular status state. If the fax transmission failed, this property will give additional information on why the failure occurred. This property is only valid once all specified retries have been attempted. See FaxStatusReason.

JobStatusReasonText

(String, read-only)

An additional text description of the reason code.

PagesTotal

(Integer)

Equivalent to the VBFaxJob PagesTotal property - the total number of pages in the fax. Available at the end of transmission.

Recipients

(Channel as Integer)

The Recipients property is an array of VBFaxRecipients collection objects indexed by channel, which contains the recipients for the current job. The SendFax control will add one recipient for each job as defined in the property page. Other recipients can be added using this property. See VBFaxRecipients Collection for details. When using same-call servers, the first recipient object in the collection is used to generate the cover page.

TransmissionRate

(Integer)

The transmission rate negotiated between the fax server and the remote fax, in bits per second.

Events

Enter

Enter(ByVal Channel as Integer)

The Enter event is fired when the flow of control passes from another control to the topmost input node of the SendFax control. This is the Add node of the control and is used to add documents to the collection. The document specified in the variables of the initial setup properties will be used to set the filename, name and remote properties of a newly added document. Control flow will exit through the Add node unless changed by GotoNode or TakeCall.

The EnterB event is fired on entry to the control via the second input node of the SendFax control. This is the Send node. Use the EnterB event to change runtime properties prior to sending of the fax. Control will exit through either the Sent or Error output nodes of the control.

Exit

Exit(ByVal Channel as Integer, Node as Integer)

The Exit event is fired on exit from the control. The exitnode parameter will specify which node the call is exiting from. If this value is 0, then the call entered through the Add node, otherwise it entered via the Send node.

Cover Page Property Page (No Cover)

The Cover Page tab allows for configuring the generation of a fax cover page. If No cover page is selected, then faxes will be transmitted without a cover page.

See the FaxCoverPage property

Cover Page Property Page (Generate)

When Generate is selected, the fax server will generate a fax cover page based on the template set up in the fax server configuration. Subject will be available as the subject variable in the cover page template. The subject property may reference a property in another VBVoice control. This allows the subject text to be customized perhaps using a DataFind control.

The cover page text is placed verbatim on the cover page along with Sender and Recipient information if the appropriate template variables are used in the cover page template.

Use the %% button to find and insert properties of other controls to use in the subject field.

See the FaxCoverAlternateFile, CoverDate, FaxCoverPage and FaxCoverText properties

Cover Page Property Page (Use Image File)

The Use image file option tells the SendFax control to instruct the fax server not to generate a cover page but rather to use the image file specified in the Alt Image File field. This option is most useful in the case of single page broadcast of text documents. The cover information can be added to the top of the file and the file specified as the alternate image file. If the generated cover page does not meet your cover page requirements, set this option with a filename that includes the property %channel%. Including this field will make each file specific to a channel, to avoid file name conflicts.

See the FaxCoverAlternateFile property.

Document Property Page

The document property page is used to set up references to named files to be transmitted when the fax is sent. Both the filename and name fields may refer to properties in other VBVoice controls. One technique is to use the digit returned from GetDigits together with a fixed path and filename to allow the user to select from multiple documents.

The file information is used to set the document properties when control enters through the Add node to add a new document. When control enters through the Add node a new document object is created in the current job's Documents collection. The SendFax control then uses the properties in this page to set the document properties. VBVoice variables will be replaced with their runtime values at this time.

The default document resolution and file location may also be specified.

See the DocumentFilename, DocumentName, and FaxResolution properties.

Sender Property Page

Use this property page to set up information about the sender of the fax. All of these fields are available for use on generated cover pages to be used in identifying the sender.

See the following properties:

SenderCity

SenderCountry

SenderDepartment

SenderEmail

SenderFaxNumber

SenderName

SenderOrganization

SenderPostalCode

SenderStationID

SenderState

SenderStreetAddress

SenderStreetAddress2

SenderVoiceNumber

 

Destination Property Page

The destination property page is used to specify information about the recipient of the fax. SendFax will automatically send to one recipient. This page sets up the properties for the one default recipient for the fax. For sending group faxes, the Recipients property must be used at runtime to add additional recipients. Any field on this page may reference information in another VBVoice control.

See Recipient properties:

City

Country

Department

Email

RecipientFaxNumber

RecipientName

RecipientOrganization

RecipientPostalCode

RecipientState

RecipientStationID

RecipientStreetAddress1

RecipientStreetAddress2

RecipientVoiceNumber