Ctrl K
ring2all.com

Fax Devices Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Fields Reference
  5. Device Types
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

---

1. Module Overview (Technical)

What Are Fax Devices?

Fax Devices are virtual or physical fax endpoints that handle inbound and outbound fax transmission using FreeSWITCH's fax engine (mod_spandsp). Received faxes are stored, optionally converted to PDF, and can be emailed to recipients.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                      Fax System Architecture                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Inbound Fax Call                                               │
│       │                                                         │
│       ▼                                                         │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        routing/fax.lua                                   │   │
│  │                                                          │   │
│  │  1. Detect call context (inbound/internal)               │   │
│  │  2. Get fax device number                                │   │
│  │  3. Route to fax_receive.lua                             │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼                                                         │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        fax/fax_receive.lua                               │   │
│  │                                                          │   │
│  │  1. Load fax device config from public.fax_devices       │   │
│  │  2. Configure T.38 / ECM settings                        │   │
│  │  3. Answer call, receive fax (rxfax)                     │   │
│  │  4. Store TIFF file                                      │   │
│  │  5. Convert to PDF (if enabled)                          │   │
│  │  6. Send email notification                              │   │
│  │  7. Log to public.fax_logs                               │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
│  Outbound Fax                                                   │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        fax/fax_send.lua                                  │   │
│  │                                                          │   │
│  │  1. Load document to send                                │   │
│  │  2. Configure T.38 / retry settings                      │   │
│  │  3. Originate call, send fax (txfax)                     │   │
│  │  4. Log result, send notification                        │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.fax_devicesFax device configurations
public.fax_logsFax transmission logs

Key Files

FileDescription
modules/faxDevices/FaxDevicesPage.tsxFrontend device management
modules/faxSending/FaxSendingPage.tsxOutbound fax UI
modules/faxViewer/FaxViewerPage.tsxFax log viewer
lua/main/xml_handlers/routing/fax.luaFax routing handler
lua/main/xml_handlers/fax/fax_receive.luaInbound fax handler
lua/main/xml_handlers/fax/fax_send.luaOutbound fax handler
---

2. Module Overview (Commercial/Business)

Business Value

Fax Devices provides virtual fax capability:

Without Fax ModuleWith Fax Module
Physical fax machinesVirtual software fax
Paper documentsPDF delivery
No email integrationEmail to recipient
Manual monitoringAutomatic logging

Use Cases

  1. Email-to-Fax
- Receive faxes as email attachments

- PDF format for easy viewing

  1. Inbound Fax Lines
- Dedicated fax DIDs

- Multiple departments

  1. Outbound Faxing
- Send from web interface

- Automatic retries

  1. Fax Archive
- Storage and logging

- Compliance records

Feature Highlights

FeatureBenefit
T.38 SupportReliable FoIP
ECMError correction
PDF ConversionEasy viewing
Email DeliveryPaperless fax
Auto RetryReliable sending
Resolution OptionsQuality control
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Configure virtual fax devices
  • Set up email delivery
  • Enable T.38 and ECM
  • Configure auto-retry
  • View fax logs
  • Send outbound faxes

Fax Device Configuration

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Create Fax Device                                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Tab: Basic                                                     │
│  ├─ Device Name: Main Office Fax                               │
│  ├─ Fax Number / DID: 4000                                     │
│  ├─ Device Type: [Virtual Fax (Software) ▼]                    │
│  ├─ Direction: [Both (Bidirectional)    ▼]                     │
│  └─ Enabled: ✓                                                 │
│                                                                 │
│  Section: Email Configuration                                   │
│  ├─ Destination Email: fax@company.com                         │
│  └─ From Email: noreply@company.com                            │
│                                                                 │
│  Tab: Technical Settings                                        │
│  ├─ T.38 Protocol: ✓                                           │
│  ├─ Error Correction Mode: ✓                                   │
│  ├─ Resolution: Fine (204×196 dpi)                             │
│  ├─ Paper Size: Letter                                         │
│  ├─ Convert to PDF: ✓                                          │
│  └─ Storage Path: /var/lib/ring2all/fax/                       │
│                                                                 │
│  Section: Retry Configuration                                   │
│  ├─ Max Retries: 3                                             │
│  └─ Retry Interval: 300 seconds                                │
│                                                                 │
│  Section: Notifications                                         │
│  ├─ Notify on Receive: ✓                                       │
│  ├─ Notify on Send: ✓                                          │
│  └─ Notify on Failure: ✓                                       │
│                                                                 │
│  [Save] [Cancel]                                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Enable T.38: T.38 provides more reliable fax over IP.
TIP
Convert to PDF: PDF is easier to view than TIFF.
CAUTION
Storage: Ensure adequate disk space for fax storage.

---

4. Configuration Fields Reference

Basic Information

FieldDescriptionExample
Device NameIdentifierMain Office Fax
Fax Number / DIDFax line number4000
Device TypeEndpoint typeVirtual, ATA, Trunk
DirectionInbound/Outbound/BothBoth
EnabledActive statusOn/Off

Email Configuration

FieldDescriptionExample
Destination EmailWhere to send faxesfax@company.com
From EmailSender addressnoreply@company.com

Technical Settings

FieldDescription
T.38 ProtocolEnable T.38 FoIP
ECMError Correction Mode
ResolutionStandard/Fine/SuperFine
Paper SizeLetter/A4/Legal
Convert to PDFAuto-convert TIFF to PDF
Storage PathFax file directory
Auto-delete AfterDays to keep files

Retry Configuration

FieldDescriptionDefault
Max RetriesRetry attempts3
Retry IntervalSeconds between retries300

Notifications

FieldDescription
Notify on ReceiveEmail when fax received
Notify on SendEmail on successful send
Notify on FailureEmail on failure
---

5. Device Types

Virtual Fax (Software)

PropertyDescription
EngineFreeSWITCH mod_spandsp
ProtocolT.38 or G.711 passthrough
Use CasePure software fax

ATA Device

PropertyDescription
EngineExternal ATA adapter
ConnectionSIP to ATA
Use CasePhysical fax machine

SIP Trunk

PropertyDescription
EngineExternal fax service
ConnectionSIP trunk
Use CaseCloud fax service

Resolutions

ResolutionDPIQuality
Standard204×98Fast, lower quality
Fine204×196Recommended
SuperFine300Highest quality
---

6. Common Scenarios & Examples

Scenario 1: Department Fax Line

Device:
SettingValue
NameSales Fax
Number4001
TypeVirtual
DirectionBoth
Email Tosales@company.com
T.38
PDF

Scenario 2: Receive-Only Fax

Device:
SettingValue
NameReception Fax
Number4000
DirectionInbound Only
Email Toreception@company.com
Notify Receive

Scenario 3: High-Volume Fax

Device:
SettingValue
NameHigh Volume
ResolutionStandard (faster)
Max Retries5
Auto-delete30 days
---

7. Limitations & Important Notes

Technical Notes

NOTE
T.38 Support: Both endpoints must support T.38 for FoIP mode.
NOTE
G.711 Fallback: Falls back to audio mode if T.38 fails.
WARNING
Network Quality: Fax is sensitive to packet loss and jitter.

Best Practices

  1. Enable T.38: More reliable than audio
  2. Enable ECM: Corrects transmission errors
  3. Use Fine Resolution: Good balance
  4. Enable PDF: Easier viewing
  5. Monitor Storage: Clean up old faxes

---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
Fax failsT.38 not supportedDisable T.38
Garbled pagesNo ECMEnable ECM
No emailEmail not configuredSet email_to
Slow transferHigh resolutionUse Standard
Storage fullNo cleanupSet auto-delete

Diagnostic SQL

List fax devices:

Sql
SELECT id, name, number, type, direction, email_to, enabled
FROM public.fax_devices
WHERE domain_id = [domain_id];

View fax logs:

Sql
SELECT direction, remote_number, pages, success, result_text, created_at
FROM public.fax_logs
WHERE fax_device_id = [device_id]
ORDER BY created_at DESC
LIMIT 20;

FreeSWITCH Logs

Bash
# Check fax operations
grep "INFO\] Fax" /var/log/freeswitch/freeswitch.log
grep "rxfax\|txfax" /var/log/freeswitch/freeswitch.log

---

9. Glossary

TermDefinition
T.38Fax over IP protocol
ECMError Correction Mode
FoIPFax over IP
TIFFTagged Image File Format
rxfaxFreeSWITCH receive fax
txfaxFreeSWITCH transmit fax
mod_spandspFreeSWITCH fax module
---

Lua Script Status ✅

Already Correct

ScriptStatus
routing/fax.lua✅ Routing handler (no DB queries)
fax/fax_receive.lua✅ Uses public.fax_devices, public.fax_logs
fax/fax_send.lua✅ Outbound fax handler
No Lua fixes needed!

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?