Skip to content

Architecture

Faxart separates media from intelligence. FreeSWITCH moves audio and pages; everything else (routing, directory access, email, filing) lives in the broker. The fax system dispatches. It does not make clinical decisions.

flowchart TD
  subgraph Inbound
    T[SIP trunk] -->|T.38 / G.711| FS[FreeSWITCH<br/>rxfax to TIFF]
    FS --> BK[Broker API]
    BK --> AD[(Active Directory<br/>read-only)]
    BK --> READ[On-prem OCR + LLM]
    READ --> RQ[Review queue]
    RQ -->|human approves| HL7[HL7 ORU / MDM]
    HL7 -->|SFTP| MT[(MEDITECH)]
    BK --> INBOX[Web inbox]
    BK --> MAIL[Mailbox delivery]
    BK --> PRINT[Printer]
  end

  subgraph Outbound
    SMTP[Email-to-fax intake] --> BK2[Broker]
    BK2 --> AD
    BK2 -->|PDF to TIFF, originate| FS2[FreeSWITCH<br/>txfax]
    FS2 -->|T.38 / G.711| T
  end

  WEB[Astro + React web app] --> BK
  BK --> PG[(PostgreSQL<br/>+ PHI-read audit floor)]

The media layer is pure. All routing intelligence, directory access, email, and filing logic live in the broker. This keeps the failure domains separate: a media issue cannot corrupt routing logic, and a broker outage cannot drop a call mid-page.

Rather than query the directory per call, a scheduled job batches one directory query, builds the inbound dialplan, and reinstalls it only if it changed. So:

  • Inbound keeps routing from the last good dialplan even if the directory or broker is down.
  • Only numbers in the directory are answered. An unknown number is rejected at the trunk, never answered and dropped.

Faxart offers T.38 and falls back to G.711 pass-through automatically. It is one configuration, not a fork: a fax starts as a voice call and tries to upgrade to T.38; if the far end declines, it rides the audio path. New T.38-capable carriers light up with no redeploy.

Slow or failure-prone jobs run on isolated queues so they never starve each other: outbound send, classification, MEDITECH filing, printing, mail delivery. A burst of inbound classification cannot block outbound transmission.