Click or drag to resize

ChannelResourceFaxResource Property

Gets the fax resource associated with this channel. To get a fax resource, call Get Fax Resource Method on this channel.

Namespace:  VoiceElements.Client
Assembly:  VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax
public FaxResource FaxResource { get; }

Property Value

Type: FaxResource
Remarks
Using Your Fax Resource

After calling this method, you may use the returned Fax Resource to Send or Receive faxes using your channel.

Also note that at any time you may query the Fax Resource Property of the Channel to get access to this object.

Make Sure You Have Fax Licenses

Note that Fax Resources are limited to the number of Fax licenses you have purchased. To obtain licenses, contact Inventive Labs sales. Email us with this link.

Use Tiff File Format - Best Practices

Voice Elements uses Tiff graphic files for transport. It is always a good idea to clean up a Tiff file for transport (get the resolution right and more). We have provided a simple way to do this using the Tiff to Tiff method. You should call this before transport as shown in the sample code below.

Don't Have Tiff Files? Convert Them

Voice Elements uses Tiff graphic files for transport. If you don't have Tiff files to send, we have created simple ways to convert files using the Jpeg to Tiff method and the Pdf to Tiff method. This is shown in the sample code below.

Examples
The example below shows using the returned Fax Resource to Send or Receive faxes using your channel.

Please note that in your production code, you will generally need to handle an New Inbound Call Event to receive a fax or place an oubopund call using a Dial Method call. What is shown below is simply to illustrate the use of the Fax Resource.

public static void SendReceiveFax()
{
  // To get a channel, you must first get a link to a Telephony Server.  You may need to pass a username password here.
  TelephonyServer m_TelephonyServer = new TelephonyServer();

  // Get your channel resource from the server
  ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();

  // Get a Fax Resource for the channel
  FaxResource m_FaxResource = m_ChannelResource.GetFaxResource();

  // Set a variable to send or recieve, you will want your code to deteremine this elsewhere
  string FaxCommand = "Send";

  // Note here:  If you have a jpg file, use this to convert it to a TIFF for transport.  If your file is already a TIFF, comment out the line that follows
  m_TelephonyServer.JpgToTif("test.jpg", "test.tif");
  // Note here:  It is always a good idea to clean up a raw graphic file for transport using the tif2tif function
  m_TelephonyServer.TifToTif("test.tif", "testfinal.tif");

  // Set variable for the file to send or receive, you will want your code to deteremine this elsewhere
  string FaxFile = @"C:\FaxFiles\testfinal.tif";

  switch (FaxCommand)
  {
    case "Send":
      m_FaxResource.Send(FaxFile);
      break;
    case "Receive":
      m_FaxResource.Receive(FaxFile);
      break;
  }
}
See Also