Custom Application Requirements (Developer's Guide)

Parent Previous Next

The custom routing application, specified by the customer, is started by the Fax Voip T.38 Modem software when executing Custom Routing Method (Microsoft Fax), after sending a fax. The individual developer is responsible for developing this application, for creating graphical user interface (GUI) to configure the rules and other settings, and for storing the configuration. The application functions can include, but are not limited to: printing faxes, storing faxes, converting fax graphic images to text files, delivering faxes in electronic mail attachments etc.


Below are the general requirements that must be taken into account by the software vendor when writing the custom application.



Command-Line Arguments


The command line passed to an application is predefined and contains all the necessary information. The developer of the custom application can parse the command line in his application to obtain the path to the fax file and other important parameters, such as Recipient Fax Number, TSID, CSID etc.


The following is an example of the command-line arguments passed to your application:


/@@@FaxFileName=C:\Users\UserAccountName\AppData\Local\Temp\201d656bff5f86f_occ\FAX.pdf

/@@@RecipientFaxNumber=19012223344 /@@@RecipientName=John Smith

/@@@SenderName=Dan Black /@@@SenderFaxNumber=(631) 490-2023

/@@@SenderTSID=(631) 490-2023 FAX /@@@SenderEmail=Dan@t38faxvoip.com

/@@@SenderCompany=FaxVoip Software, LLC /@@@SenderDepartment=Sales

/@@@SenderTitle=Sales Manager /@@@SenderOfficeLocation=14

/@@@SenderHomePhone=(425) 686-1097 /@@@SenderOfficePhone=(631) 490-1288

/@@@SenderAddress=324 6th Avenue\n10014 New York\nUSA /@@@SenderBillingCode=015

/@@@DocumentName=invoice07_10_20_003.pdf;Information.txt /@@@HasCoverPage=1

/@@@Subject=This is the subject line on the cover page of the fax.

/@@@PagesTotal=4 /@@@TiffSize=132386

/@@@CSID=(901) 222-3344 /@@@TSID=Fax Voip T.38 Modem /@@@Priority=1

/@@@SubmissionTime=07.10.2020@01:28:18 /@@@OriginalScheduledTime=07.10.2020@01:28:18

/@@@StartTime=07.10.2020@01:32:49 /@@@EndTime=07.10.2020@01:36:14 /@@@Duration=00:03:25

/@@@Retries=0 /@@@PagesTransferred=4 /@@@DeviceName=Fax Voip 14.4K TAPI Voice-Fax Modem

/@@@Status=OK /@@@JobId=201d656bff5f86f /@@@BroadcastId=2001d656bff5f75e


Command line arguments match to the elements of the following objects: FaxOutgoingJob, FaxOutgoingMessage, FaxRecipient, FaxSender, see Fax Service Extended COM Reference documentation.


/@@@FaxFileName=

The temporary copy of the fax file (TIFF, PDF or SFF file depending on your choice) associated with outgoing fax document. This file and the temporary folder in which it is located (subfolder in the %temp% folder for the current user account or user account under which the Mail to Fax service (MS Fax) is running) should be deleted in custom routing application after applying necessary actions. If the Create temporary copy of the sent fax in the following format option is unchecked, this argument is missing in the command line. See also in the Custom routing for outgoing faxes (Microsoft Fax) chapter of this user manual.

/@@@RecipientFaxNumber=

The fax number of the recipient.

/@@@RecipientName=

The name of the recipient. Can be displayed on the cover page.

/@@@SenderName=

The name of the sender.

/@@@SenderFaxNumber=

The fax number associated with the sender.

/@@@SenderTSID=

The transmitting station identifier (TSID) for the sender's device, specified in the Sender Information. Displayed at the top of each faxed page. Note that depending on the fax server settings, it may be different from the actually transmitted TSID, see also in the Configure Fax Station ID and Fax Headline chapter of this user manual. See also the description of TSID command-line argument.

/@@@SenderEmail=

E-mail address associated with the sender. If the fax is generated by the Mail to Fax function, this is the sender's e-mail address extracted from the e-mail message.

/@@@SenderCompany=

The company name associated with the sender. Usually displayed at the top of each faxed page (Fax Headline).

/@@@SenderDepartment=

The department name associated with the sender.

/@@@SenderTitle=

The title associated with the sender.

/@@@SenderOfficeLocation=

The office location of the sender.

/@@@SenderHomePhone=

The home telephone number associated with the sender.

/@@@SenderOfficePhone=

The office telephone number associated with the sender.

/@@@SenderAddress=

The street address associated with the sender. Usually includes the city, state, zip code (postal code) and country/region for the sender. To indicate wrap lines, the '\n' character is used.

/@@@SenderBillingCode=

The billing code associated with the sender.

/@@@DocumentName=

The user-friendly name to display for the fax document. If the fax is generated by the Mail to Fax function, this is the original name of sender document including file extension. When sending multiple documents, they are separated by a semicolon. When sending a fax consisting only of a cover page, replaced with an empty string. When sending a fax in the usual way (from the Windows Fax and Scan software), can be constantly replaced by the pointless string (e. g. 'Test Fax'), due to errors in the Microsoft Fax software.

/@@@HasCoverPage=

Indicates whether the fax has a cover page. Can be one of the following values: 1 - has a cover page, 0 - no cover page.

/@@@Subject=

Contains the contents of the subject field on the cover page of the fax.

/@@@PagesTotal=

The total number of pages in the outbound fax.

/@@@TiffSize=

The size, in bytes, of the Tagged Image File Format Class F (TIFF Class F) file associated with the outbound fax.

/@@@CSID=

The Called Subscriber ID (CSID) received from the fax recipient. The CSID usually consists of the recipient's fax number and business name.

/@@@TSID=

The transmitting station identifier (TSID) that was actually transmitted to the recipient. Depending on the fax server settings, it can be the same as SenderTSID, or it is specified by the settings of the fax device that was used for fax transmission.

/@@@Priority=

Priority used when sending the fax. Can be one of the following values: 0 - low, 1 - normal, 2 - high.

/@@@SubmissionTime=

The time that the outgoing fax was submitted for processing. The format of this string is 'mm.dd.yyyy@hh:mm:ss'.

/@@@OriginalScheduledTime=

The time that the fax was originally scheduled for transmission. The format of this string is 'mm.dd.yyyy@hh:mm:ss'.

/@@@StartTime=

The time that the outgoing fax began transmitting. The format of this string is 'mm.dd.yyyy@hh:mm:ss'.

/@@@EndTime=

The time that the outgoing fax completed transmission. The format of this string is 'mm.dd.yyyy@hh:mm:ss'.

/@@@Duration=

Represents the total time that elapses between the beginning of fax transmission and the end of fax transmission. The format of this string is 'hh:mm:ss'.

/@@@Retries=

In the case of a successfully sent fax, the number of times that the fax service attempted to transmit an outgoing fax after the initial transmission attempt failed. In the case of failed fax delivery, the number of times that the fax service attempted to transmit an outgoing fax. The total number of possible retries depends on the limit set.

/@@@PagesTransferred=

The number of successfully sent fax pages.

/@@@DeviceName=

Specifies the name of the device on which the fax message was transmitted.

/@@@Status=

Operation completion code. Example: OK (in the case of a successful fax sending), NO_ANSWER, BUSY.

/@@@JobId=

The unique identifier for the outgoing fax.

/@@@BroadcastId=

The unique identifier assigned to the fax job during the submission process. When you submit a fax to be sent to more than one recipient, separate fax jobs will be created, but as part of the same fax broadcast, they will share the same Broadcast ID.



Temporary copy of the sent fax


If the Create temporary copy of the sent fax in the following format option is checked (see in the Custom routing for outgoing faxes (Microsoft Fax) chapter of this user manual), the Custom Routing Method (Microsoft Fax) creates a temporary folder and copies the outgoing fax (TIFF, PDF or SFF file depending on your choice) into this folder. The temporary folder is created in the %temp% folder for the current user account or user account under which the Mail to Fax service (MS Fax) is running (if Fax Voip T.38 Modem is running as a Windows service). The path to the temporary fax file is passed to the custom application via FaxFileName command-line argument, see above.


For example,

/@@@FaxFileName=C:\Users\UserAccountName\AppData\Local\Temp\201d656bff5f86f_occ\FAX.pdf

The path to the fax file (PDF format) is:

C:\Users\UserAccountName\AppData\Local\Temp\201d656bff5f86f_occ\FAX.pdf

The path to the temporary folder is:

C:\Users\UserAccountName\AppData\Local\Temp\201d656bff5f86f_occ\


The temporary folder in which fax file (FAX.tif, FAX.pdf or FAX.sff) is placed can be used by your custom routing application to store temporary files that your application generates.


The custom application is responsible for deleting the temporary fax file and the temporary folder in which this file is located. You must permanently delete the temporary folder in your application after you perform all the necessary actions.


If the Create temporary copy of the sent fax in the following format option is not checked, the Custom Routing Method (Microsoft Fax) does not create the copy of the outgoing fax, but the custom application can still access the outgoing fax by using Fax Service API functions (based on JobId parameter that is also passed via command line).



Running under current user account or user account under which the Mail to Fax service (MS Fax) is running


The custom application is started using the current user account or user account under which the Mail to Fax service (MS Fax) is running (if Fax Voip T.38 Modem is running as a Windows service), so the corresponding account must have necessary access to files, folders and other objects with which your application works.



Terminating the application


The Custom Routing Method (Microsoft Fax) executes the custom routing application in the separated thread by calling the CreateProcess function. The Fax Voip T.38 Modem does not monitor the application after it is started and does not guarantee its correct completion. The developer of the custom routing application is responsible for the correct automatic termination of the application after execution.