The UP.Link server allows your service to initiate faxes on behalf of a subscriber without having a billing relationship with the subscriber or the fax service. The UP.Link Fax Manager logs all the faxes sent by subscribers on an UP.Link server, allowing the UP.Link server operator to directly bill subscribers for the faxes. This arrangement makes it easy for you to provide fax services to UP.Link subscribers: you don't need to log faxes or bill subscribers.
Currently, the UP.Link server can recognize and package the following document formats as faxes:
application/postscript)
text/plain)
application/msword)
application/rtf)
application/pdf)
Figure 3-2 presents an overview of how the UP.Link Fax Manager works. The steps in the process are listed below.
FIGURE 3-2. Simplified view of Fax Manager operation
If the fax is invalid or too big, the UP.Link server does not send it to the fax service. Instead of sending the service-provided digest to the phone, the UP.Link server sends an error message indicating the fax could not be sent.
The UP.Link server logs the completed delivery of the fax.
The Acme employee directory sample application shipped with the UP.SDK provides an example of how to send a fax. The faxing module of the application is implemented in the faxDocument() function in the acme_emp.cgi file. The following sections briefly explain how to send a fax. However, it is recommended that you use the sample application as a starting point for your own service's fax module.
The UP.SDK provides a Perl class library in Fax.pm, which makes it easy to create and send a fax. For complete documentation of this library, see the UP.SDK Tools and APIs Reference.
The following are the general steps you follow in implementing fax capabilities in your HDML service:
For example, you can implement an HDML interface that prompts the user for the fax recipient's name and number.
When the UP.Link server generates an HTTP request to your service, it sets HTTP headers indicating the type of faxes it accepts. Specifically, it sets the x-up-fax-accepts, x-up-fax-limit and x-up-fax-encodings headers. For information on checking these headers, see Retrieving subscriber, device, and UP.Link information.
x-up-fax-limit HTTP header. If the fax exceeds the limit, display an error deck informing the user that the fax cannot be sent. If the x-up-fax-limit HTTP header is set to 0, the UP.Link server is not accepting any faxes at all.
Fax::New() method to create faxes.
The New() method allows you to specify the fax number, the fax content, and the fax content type ("application/postscript" or "text/plain").
For example, use setComment() to add a comment to the cover page, and setRecipientName() and setSenderName() to set the recipient and sender names. For a complete list of these methods, see the UP.SDK Tools and APIs Reference.
For information on creating digests and adding HDML decks to them, see Tuning performance with digests. To add a fax to a digest, use the FaxResponse::New() method. You can include multiple faxes in the same digest.
The following code sends a fax addressed to Mr. Joe Recipient at 415-555-5555. To keep the code simple, the fax number, recipient, and content are hardcoded. When you write your own code to send faxes, you will normally want to prompt the user for this information.
To test this code, save it as a CGI script, then request its URL. When you request the URL, the script returns a digest containing the fax and an HDML deck that confirms that the fax has been sent. The UP.Link server removes the fax from the digest and forwards it to the fax service; then it sends the digest to the UP.Phone which displays the confirmation deck. Note that you can test this code on the UP.Simulator only in UP.Link mode; it won't work in HTTP direct mode.
To test faxing capabilities, you must use a real UP.Phone or run the UP.Simulator in UP.Link mode. For more information on running the UP.Simulator in UP.Link mode, see the UP.Simulator chapter of the UP.SDK Tools and APIs Reference.
After you have sent a fax from an UP.Phone or UP.Simulator, you can check on its status. If the UP.Phone or UP.Simulator is registered on the Unwired Planet Developer UP.Link server (devgate2), check the status of faxes by doing the following:
If you are running the UP.Simulator, make sure it is running in UP.Link mode and is set to use devgate2.
The Fax Status screen appears. A letter appears in brackets next to each fax to indicate its status.
The following table shows status indicators and their meanings.
To see detailed information about a particular fax in the Fax Status list, choose the fax and press ACCEPT. To get updated status on all faxes, press SOFT1.
If you are checking fax status on an UP.Link server other than devgate2, the Fax Status item may be on a different menu. For example, in many installations, it may be on the Directory menu. For more information, see the documentation provided by the UP.Link provider.
You can also check fax status using the Web interface for the devgate2 UP.Link server. For instructions, see the UP.Simulator chapter of the UP.SDK Tools and APIs Reference.