Skip to content

High availability

Faxart can run two interchangeable FreeSWITCH instances so the loss of one doesn’t take fax down. This is distinct from the inbound dialplan cache (which protects routing config during an outage); HA protects the media layer itself. It is off by default and turns on only when you list two instances.

FreeSWITCH is nearly stateless here: the durable state lives in Postgres and the shared fax spool, not in the switch. So the HA model is simple, lose the in-flight call, the survivor takes the next one. Fax protocols already expect this: T.30/T.38 retransmit, and a sender redials. You don’t need to replicate call state; you need a second instance and a way to fail over to it.

flowchart TD
  T[SIP ingress] --> K[Kamailio proxy<br/>OPTIONS health-probe]
  K -->|active| A[FreeSWITCH A]
  K -.failover.-> B[FreeSWITCH B]
  BR[Broker outbound] -->|first reachable| A
  BR -.failover.-> B
  • Inbound is fronted by a SIP proxy that health-probes both instances and fails over on error or timeout. It pins a call’s follow-up signaling (the T.38 re-INVITE) to the instance that answered, so media negotiation completes on one box.
  • Outbound is broker-owned: it tries instances in order and advances only on a real connection failure, never on a normal “send failed” result, so an outbound fax is never double-sent. A mid-call death is recovered by the existing retry.

Both the proxy and the FreeSWITCH instances must advertise their real reachable address, not a wildcard or loopback. Advertising the wrong address lets signaling connect but then black-holes the media re-INVITE, so a call negotiates and then transfers zero pages. This is the most common way a fax HA setup looks healthy but moves nothing.

HA is config-only to turn on: list the two instances for the broker, point the proxy and your published SIP ingress at the real pool, and (across hosts) make the shared spool an NFS mount so both instances see the same files. On-wire encryption (SRTP / SIP-TLS) is a separate axis from HA.