Skip to main content

Faxlib documentation

Will this ever be accurate again? FreeSWITCH uses v8 for Javascript now.

About

This is the documentation for faxlib.jm an object based approach to faxing for FreeSWITCH with Javascript ( mod_spidermonkey). faxlib exposes certain methods and properties available to the calling program. They are documented here.

All the text below was last edited in 2007, it is therefore likely out-of-date, inaccurate and in dire need of a refresh

Properties

  • socketaddr - STRING host host:ip eg "localhost:8084"
  • session - SESSION OBJECT the current session
  • faxDetect - BOOLEAN state of fax CNG detection
  • faxFilePrefix - STRING directory prefix to the fax (for tx or rx)
  • faxFile - STRING the filename in faxFilePrefix of the fax
  • gotFax - BOOLEAN whether or not a fax was received

Methods

  • stopFaxDetect - stops fax CNG detection, called automatically when receiving a fax
  • startFaxDetect - starts fax CNG detection
  • getFaxFile - returns a STRING of the full path to the fax file
  • rxFax - receives a fax
  • txFax - transmits a fax
  • fax2pdf - converts a fax tiff into a pdf, the fax object will point to that pdf from then on

Constructor

fax(session,socketaddr [, faxFilePrefix [, faxFile]])

Example:

var f = new fax(session,"localhost:8084","/tmp","myfax.tiff");

The last 2 arguments are optional and if not specified will be "/tmp" and the "<uuid>.tiff" where <uuid> is replaced by the current uuid of the call in progress.