Implementing a custom fax provider

The EngageOne™ server supports the ability to interface with any custom fax solution. If you have a fax provider that you wish to interface with, you can use a Java programming interface to supply the communication between the EngageOne™ server and your fax provider.

EngageOne™ comes with a sample custom provider implementation which e-mails attachments via SMTP. This sample merely serves as an example that a customer could use to implement their custom integration. The source code for the sample can be found in the jar located at

ENGAGEONE_HOME/samples/fax-delivery-channel/target/fax-sample.jar

The following steps outline how to implement and integrate your own custom solution.

To implement a custom fax provider:

  1. Implement the interface:

    com.pb.engageone.server.tds.core.delivery.fax.FaxFactory.

    The client library that contains the interface, which should be used for your development is located under ENGAGEONE_HOME/samples/fax-delivery-channel/target/fax-sample.jar.

    This interface has one method called getFax(), which is responsible for creating a new com.pb.engageone.server.tds.core.delivery.fax.Fax instance.

  2. Implement the com.pb.engageone.server.tds.core.delivery.fax.Fax interface.

    This class is the actual fax provider. There is a single method in this class, which is called when a document must be delivered via fax:

    void send( String faxNumber, String from, String to, String description, String documentName, InputStream documentStream, RequestChannel requestChannel) throws FaxException;
  3. Package your classes into a jar and place that new jar on the server in a location to which the EngageOne application has access. For example, you could place it under:

    ENGAGEONE_HOME/composition/conf/fax

  4. In order for the EngageOne server to load your custom fax factory, you must update the EngageOne configuration file located at:

    ENGAGEONE_HOME/composition/conf/config-settings/config-settings.xml.

The following shows an example of the com.pb.engageone.server.fax namespace:

<namespace name="com.pb.engageone.server.fax"> 
    <setting>
        <key>fax.factory</key>
        <value>com.pb.engageone.sample.fax.FaxFactoryImpl</value> 
    </setting>
    <setting> 
        <key>fax.factory.classpath</key> 
        <value>fax-sample.jar</value>    
    </setting> 
    <setting> 
        <key>fax.factory.classpath.basedir</key>
        <value>ENGAGEONE_HOME/composition/conf/fax</value> 
    </setting>
</namespace>

In the above example, the name of the custom fax factory class is: com.mycompany.engageone.fax.FaxFactoryImpl.

The jar containing the fax factory and fax implementation classes is:

fax-sample.jar

and the location of the fax-sample.jar is under:

ENGAGEONE_HOME/composition/conf/fax.

Sources for sample fax channel are available in build .zip file in the:

samples/fax-delivery-channel directory.

Note: if you require third-party dependent jars for your fax solution, you can include them in the fax.factory.classpath setting above, each separated by semi-colons (Windows) or colons (Unix). Alternatively, you can add them to the META-INF/MANIFEST.MF/Class-Path: setting in fax-sample.jar.